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

Revision history [back]

You are using a static transform between /map and /amazon_warehouse_robot/odom and "world" as the odometrySource for the libgazebo_ros_diff_drive plugin.

Using "world" as the source for the odometry of your simulated robot will give you the perfect location of the robot in the simulated world. So when you set the static transform between /map and /amazon_warehouse_robot/odom to be 0 0 0 0 0 0 everything works. But if you shift the static transform, then nothing makes sense any more.

If you want to shit the starting pose of the robot you should do it by moving the robot inside the gazebo world, not by modifying the static transform.

Any way, in the Real World™ this will not work because the odometry is far (faaaaar, faaaaaaaaaaar, very faaaaaaaaaaaaaaaaar) from perfect. You should take a look at amcl to handle the transform between /map and /amazon_warehouse_robot/odom instead of using a static transform.