How to get robot's pose estimation data from SLAM algorithm?

I would like to do an evaluation of the localization of the robot which is pose estimation between the SLAM algorithm (gmapping package) and the ground truth. I’ve acquired the ground truth data from the /ground_truth/state topic and I got the data like this. I got pose.position.xyz and orientation.xyzw for the ground truth data.

Screenshot from 2021-09-30 16-40-33

But now I dont know how to get the pose estimation data (robot location in the map) from the gmapping package. Where I can get the data? Is it in the /tf topic? If in the /tf topic which frame (base_link , base_scan , caster_back_link or imu_link ) is the estimation data from the gmapping package? And how can I echo the data in the terminal same as the ground truth data? Thank you! Figure below is the frame data from the rviz application.

Screenshot from 2021-09-30 16-57-08

Hi,

After getting the environment map with slam_gmapping and launching amcl localization, you can get the estimated position of the robot from /amcl_pose topic.

Hope this helps.

1 Like

thank you for your answer