How can I use user defined type message in rossubscriber?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I want to connect a topic with rossubscriber in MATLAB. But there is a problem. While the basic form of a message(std_msgs, sensor_msgs etc.) was connected, I couldn't connect the type of message which is defined by my .msg files. For example, if The topic name is '/right_arm_status' and the MessageType is 'com_pkg/MotionStatus') , the following error appears: Failed to create a subscriber with topic name /right_arm_status and type com_pkg/MotionStatus.
What can I do?
if true
sub = rossubscriber('/right_arm_status', 'com_pkg/MotionStatus')
end
0 件のコメント
回答 (1 件)
Cam Salzberger
2019 年 3 月 14 日
Hello Yun,
For any non-standard (non-built-in) message types, you can make them available for use in MATLAB by using the Custom Message workflow. This will involve installing the support package for Custom Messages, and then generating the files required by MATLAB to use the custom messages. Once you do that, you should be able to create publishers and subscribers that use the message types you built.
-Cam
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Specialized Messages についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!