Simulink + ROS + Arduino code generation

조회 수: 8 (최근 30일)
Multiplexer
Multiplexer 2017년 12월 4일
댓글: Madhu Govindarajan 2018년 12월 5일
Hello,
I'm working with Simulink on my main computer and ROS Kinetic running on separate computer under Ubuntu 16. There is also an arduino Uno board.
Now i know that i can use Simulink to deploy standalone nodes on ROS computer. I can also install Arduino IDE on ROS computer and program Arduino connected to it to use ROS serial to publish/subscribe to messages.
But can i somehow use Simulink to deploy code to Arduino so it can communicate with ros?
  댓글 수: 1
MathWorks Robotics and Autonomous Systems Team
The Simulink ROS code deployment relies on target machine to have: - Linux - ROS installed - catkin_make installed
As these are not available on Arduino, you will have to work with Raspberry Pi (which has a Linux operating system).
You can use the same steps for code deployment from Simulink ROS when connected to a Raspberry Pi, but as the Pi needs to be configured (i.e., ROS installed) we have a image available for Raspi, read more here:
https://www.mathworks.com/help/supportpkg/raspberrypi/examples/getting-started-with-robot-operating-system-ros-on-raspberry-pi-r.html

댓글을 달려면 로그인하십시오.

답변 (2개)

MathWorks Robotics and Autonomous Systems Team
The Simulink ROS code deployment relies on target machine to have: - Linux - ROS installed - catkin_make installed
As these are not available on Arduino, you will have to work with Raspberry Pi (which has a Linux operating system).
You can use the same steps for code deployment from Simulink ROS when connected to a Raspberry Pi, but as the Pi needs to be configured (i.e., ROS installed) we have a image available for Raspi, read more here:
https://www.mathworks.com/help/supportpkg/raspberrypi/examples/getting-started-with-robot-operating-system-ros-on-raspberry-pi-r.html
  댓글 수: 1
Multiplexer
Multiplexer 2017년 12월 6일
With ROS deployed on Raspberry Pi, will I be able to use "Raspberry Pi Support from Simulink" blocks for GPIO/PWM/I2C/SPI simultaneously with "Robotics System Toolbox" blocks for ROS publish/subscribe to say have a node read ADC and publish it to topic?

댓글을 달려면 로그인하십시오.


SMEAC
SMEAC 2018년 11월 29일
It can actually be achieved using rosserial_arduino, a ROS package. It does require a little bit of modification to get working, but for this reason I have uploaded a demonstration model, showing a publisher, two subscribers working together with a stateflow block and working in external mode:
Regards
Gavin
  댓글 수: 1
Madhu Govindarajan
Madhu Govindarajan 2018년 12월 5일
This is really cool. It will be great if you can record a simple video showing these in action so that it is easy for users to understand what to expect.
You can embed YouTube video links on the description so that users can see all of it in one page.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by