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

Revision history [back]

The information you want is not in the odom->base_link transform, as amcl provides the map->odom transform.

There are at least two ways of doing what you want:

1- Through the /initialpose topic, which can be set using rviz "2D Pose Estimation" tool or directly publishing that topic through a terminal.

2- Load the parameters with your initial pose when launching AMCL (initial_pose_x, initial_pose_y, initial_pose_a). In this case you will need a different launch file for each bag if the robot does not start at the same position.

If you do not know the initial pose, you will have to play the bag a couple of times and do a bit of a guesswork using rviz "2D Pose Estimation" until you find approximately the initial pose. AMCL will output the received info on a terminal, so once you are satisfied, you can use those values in the AMCL launch file.