How To: Get ground truth pose data in ROS Gazebo

Sometimes you might need to get the robot’s actual position to compare your state estimation code. Copy paste the contents of this file (plugin_code) into your urdf description file. It should publish the ground truth to “/ground_truth/state”.

This tag basically tells gazebo to publish an additional topic using the p3d plugin.

*Note: For ROS kinetic, the script needs to be updated to say ‘Offset’ instead of ‘Offsets’.  (thank to Devon below for bringing this to notice)

 

 

5 Comments

  1. Ramana said:

    Thanks!! I got the right thing at the right time

    July 26, 2017
    Reply
  2. Devon Morris said:

    For ROS kinetic, your script needs to be updated to say ‘Offset’ instead of ‘Offsets’

    July 5, 2018
    Reply
    • sauravagarwal said:

      Thanks Devon!

      July 5, 2018
      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *