How to subscribe topic from gazebo by using the "gazebo subscribe block" in simulink
2 次查看(过去 30 天)
显示 更早的评论
Gazebo (Ubuntu 18.04, gazebo-9) connect Simulink(matlab2020b) correctly!
then i used "gz topic -l", i could see all the topic in gazebo, means the topic have been published.
Connectin between ubuntu and matlab correctly, then i try to follow the tutorial: use "gazebo read block" to read GazeboPlugin msgs, that ok!
but if i use "gazebo subscribe block" , there was no topic that i could choose, when i clic on "select", it shows no topic could subscribe...?
very urgent, please help meto figure out this question!!! Is it the issues of version of ubuntu or gazebo? or code? used google protobuf 3.0.0
thanks in advance !
回答(1 个)
Gaurav Bhosale
2021-3-15
Hi shengqi,
The Gazebo Subscribe block is designed for Custom Message Support. Basically, other than built-in support ( Read Block ), you can subscribe other topic from Gazebo to Simulink. To do that, you need to first define your own message or use Gazebo Msgs support provided in gazebogenmsg support
>> help gazebogenmsg
Once, you build required dependecies with 'gazebogenmsg' for specific cutom message, then you need to create plugin .zip with generated custom source path. Further, you need to copy and build plugin on VM.
In similar way, Gazebo Publish block, publish message on Gazebo from Simulink.
Thanks.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Gazebo Co-Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!