ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Last time I looked into this, you could either get all model states via the "/gazebo/model_states" topic (as you suggested) or use the "/gazebo/get_model_state" service as described here, if you need information for a specific model. This service-based method probably isn't the nicest option if you have to retrieve the state at high updates rates, though.

If you're using the hector_quadrotor stack for simulation you're in luck though, as the ground truth pose is already provided on the "/ground_truth/state" topic through the use of the "libgazebo_ros_p3d.so" plugin. Corresponding gazebo xacro file here (at the bottom).