Cannot find a MATLAB message class for type geometry_msgs/Twist
Show older comments
Hello!
I follow the official steps to create custom ros messages and when I use " rosmsg list " to check it, my custom message is right here.
However, it didn't work when I use rosmessage('geometry_msgs/Twist'),
and it shows "Cannot find a MATLAB message class for type geometry_msgs/Twist".
Also, if I use the command " msginfo=rosmsg("show",'geometry_msgs/Twist') ",
it shows "Could not find definition of message type geometry_msgs/Twist. Check the spelling of the type, or use "rosmsg list" to retrieve a list of available message types."
Answers (1)
鼎 钟
on 20 Apr 2022
0 votes
I have the same question with you. But finally, I find the problem is just because your path contains chinese.
You can try command 'javaclasspath' to check if the path of your custom ros message contains strange characters. Maybe it's java's fault.
Categories
Find more on ROS 2 Network Access in MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!