What is this error in Gazebo Co-Simulator?
Show older comments
When I request to read a customized topic I get this error.
MATLAB System block 'Gazebo_Interface/Gazebo Subscribe/SourceBlock' error occurred when invoking 'resetImpl' method of 'robotics.slgazebo.internal.GazeboSubscribeBlk'. The error was thrown from '
'C:\Polyspace\toolbox\robotics\robotsimulink\robotslgazebo\+robotics\+slgazebo\+internal\GazeboSubscribeBlk.m' at line 60'.
Caused by:
Failed to subscribe to topic "/gazebo/default/state". The topic must be published by Gazebo simulator.
4 Comments
Gaurav Bhosale
on 5 Jan 2021
Hi Fabricio,
To subscribe "/gazebo/default/state" topic, it should be first published from Gazebo or with Gazebo publish block.
Is "/gazebo/default/state" topic published ? Can you see that in Gazebo topic list?
Thanks.
Cornelius
on 8 Jan 2021
Cornelius
on 9 Jan 2021
Gaurav Bhosale
on 2 Feb 2021
Edited: Gaurav Bhosale
on 2 Feb 2021
The error message shows "/gazebo/default/state" topic is not publish while the published topic is "gazebo/default/cessna_c172/state". Is anything is missing?
Also, how you are publishing message on "gazebo/default/cessna_c172/state" topic from Gazebo ? Do you have plugin?
Also, are you using shipped VM from here https://www.mathworks.com/support/product/robotics/ros2-vm-installation-instructions-v3.html ?
If yes, then I will recommend you to re-intsall plugin by calling packageGazeboPlugin
You can check following example for latest plugin installation
https://www.mathworks.com/help/robotics/ug/perform-co-simulation-between-simulink-and-gazebo.html
Accepted Answer
More Answers (0)
Categories
Find more on Gazebo Co-Simulation 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!

