File Exchange

image thumbnail

Getting Started with Robot Operating System (ROS)

MATLAB and Simulink templates and examples for connecting to the Robot Operating System (ROS)

54 Downloads

Updated 05 Dec 2017

View License

This entry contains files for the "Getting Started with MATLAB and ROS", "Getting Started with Simulink and ROS", "Deploying Algorithms to ROS", and "Designing Distributed Systems with ROS" episodes of the MATLAB and Simulink Robotics Arena.
You will find MATLAB and Simulink templates to help you get started with common programming and modeling practices for connecting MATLAB and Simulink to the Robot Operating System (ROS).
In addition, this entry contains an object tracking example implemented using several of the templates above. You can try this example with your webcam, the Gazebo simulator, or ROS enabled robot hardware.
For more information, refer to the README.md file included.

To try ROS and Gazebo, download a virtual machine at http://www.mathworks.com/supportfiles/robotics/ros/virtual_machines/v3/installation_instructions.htm

Comments and Ratings (5)

Multiplexer

Multiplexer

Hello,

I'm having issue with the "Designing Distributed Systems with ROS" examples. I already registered custom messages within MATLAB and they are showing up all right but when I'm trying to deploy gazeboExamplePerceptionCustom and gazeboExampleControlCustom to my virtual machine i get errors:

"The following error occurred during deployment to your hardware board:
Build unsuccessful for model 'gazeboExampleStateflow'. Check the build log in the diagnostics viewer for error messages."

and

"CMake Warning at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by "custom_robot_msgs"
with any of the following names:
custom_robot_msgsConfig.cmake
custom_robot_msgs-config.cmake"

In ROS custom message documentation i found this:
"Code Generation with Custom messages

Custom message and service types can be used with ROS Simulink blocks for generating C++ code for a standalone ROS node. The generated code (.tgz archive) will include Simulink definitions for the custom messages, but it will not include the ROS custom message packages. When the generated code is built in the destination Linux System, it expects the custom message packages to be available in the catkin workspace or on the ROS_PACKAGE_PATH. Please ensure that you either install or copy the custom message package to your Linux system before building the generated code."

So, apparently there is an extra step to be done here and the "Designing Distributed Systems with ROS" episode completely skipped it over. So here is my question. What else do i have to do on my virtual machine so that I'll be able to deploy code with custom messages on it? What should i copy and where?

Swarooph

Updates

1.2.0.0

Added multitasking object tracking models.

1.1.0.0

Added updates from the new "Designing Distributed Systems with ROS" video, including partitioned algorithm models and ROS custom messages.

Updated sample time settings in blocks to follow Simulink best practices.

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor