MATLAB Answers

How can I use custom ROS messages with Robotics System Toolbox?

80 views (last 30 days)
I want to create a ROS message of type atlas_msgs/AtlasCommand, but rosmessage doesn't work with it. I get the following error:
>> rosmessage('atlas_msgs/AtlasCommand')
Cannot find a MATLAB message class for type atlas_msgs/AtlasCommand.
How do I use custom ROS messages that aren't included with Robotics System Toolbox?

  0 Comments

Sign in to comment.

Accepted Answer

MathWorks Robotics Team
MathWorks Robotics Team on 12 Mar 2015
Hi Gautam,
You can add the support for custom ROS messages by installing the Robotics System Toolbox Interface for ROS Custom Messages . You can define your own custom ROS message and service types, and use them in MATLAB and Simulink to communicate with other nodes in the ROS network.
There are two ways to install this interface:
  • In MATLAB, call roboticsSupportPackages, select the "ROS Custom Messages" entry, and follow the installation instructions.
  • Go to the FileExchange entry for the custom message interface and follow the installation instructions listed there.
After the installation finishes, you can take a look at the documentation and see examples on how to use custom messages in MATLAB and Simulink.
You should be able to communicate with the ATLAS robot in no time!

  5 Comments

Show 2 older comments
lily liu
lily liu on 21 Jun 2018
I had created a rosmsg and the custom msg can be found in the rosmsg list,but can't be selected in simulink,.How come like this?How am I supposed to do?thank you!
Jakob Klein
Jakob Klein on 23 Jan 2019
I have the same issue as lily liu.
Is there any way to deal with this?

Sign in to comment.

More Answers (0)

Sign in to answer this question.