Fail to create ROS Publisher and ROS subscriber

3 ビュー (過去 30 日間)
Ignacio Arriscado
Ignacio Arriscado 2019 年 6 月 15 日
回答済み: Cam Salzberger 2019 年 6 月 17 日
Hi all,
I am creating subscriber and publishers for the turtle bot robot. For most topics, after using rosinit, I can create properly
publishers and subscribers. However, I fail to create a publisher for the /sound topic.
For instance, for topic cmd_vel I get:
r1=rospublisher('/cmd_vel')
r1 = Publisher with properties:
TopicName: '/cmd_vel'
IsLatching: 1
NumSubscribers: 0
MessageType: 'geometry_msgs/Twist'
It works perfect, but for topic sound I get:
r1=rospublisher('/sound')
Failed to create a publisher with topic name /sound and type turtlebot3_msgs/Sound.
Can anyone give me any hint about why this behaviour?
Thank you very much in advance,
Regards,
Ignacio

採用された回答

Cam Salzberger
Cam Salzberger 2019 年 6 月 17 日
Hello Ignacio,
The message type "geometry_msgs/Twist" is one of the standard, built-in ROS message types. However, the message type "turtlebot3_msgs/Sound" is a custom message type specific to the TurtleBot3. You'll need to make that message type available to MATLAB by building the "turtlebot3_msgs" package with the MATLAB Support Package for ROS Custom Messages.
-Cam

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeROS Network Connection and Exploration についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by