Error in ROS Custom Message

1 回表示 (過去 30 日間)
Shlok Goel
Shlok Goel 2019 年 7 月 15 日
回答済み: Cam Salzberger 2019 年 7 月 25 日
When trying to use custom messages with ROS, rosmsg list shows the custom messages, but blank message block/ ROS publish block in simulink does not show those messages.

回答 (1 件)

Cam Salzberger
Cam Salzberger 2019 年 7 月 25 日
Hey Shlok,
I believe that the Simulink message type selection drop-down should use the same functionality as rosmsg("list"). I'm not sure why it would show different results. Did you restart MATLAB after generating the custom messages?
As a possible workaround for now, if you create a MATLAB publisher or subscriber using that message, can you use "Select from the network" to pick the right topic and message type? As another workaround, you should be able to use set_param on the blank message and publisher/subscriber blocks to change the message type to the desired custom message.
-Cam

カテゴリ

Help Center および File ExchangeROS 2 Network Access in Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by