Evaluate SLAM localization with ROS and Cartographer

asked 2022-09-03 06:49:22 -0500

Hi,

I want to evaluate the quality of localization as reported by Cartographer. I have the Turtlebot3 robot set up in Gazebo.

I found two Github issues that specify how one might evaluate localization produced by Cartographer:

First issue has information on how to use compare_localization_to_offline_trajectory.sh script to evaluate optimized and unoptimized trajectories in Cartographer. Theoretically, it should be possible to use that script to compare unoptimized localization to ground truth obtained from Gazebo.

Second issue mentions that we can "compare the TFs in a bag file (pure localization evaluatee) against a trajectory in pbstream (ground truth)" by using cartographer_dev_trajectory_comparison node found in trajectory_comparison_main.cc.

Another part of the puzzle is collecting the ground truth localization data from Gazebo. I know that Gazebo published the ground truth poses of the robot. But I don't know how to use this data to evaluate the localization quality and how to ensure the temporal correspondence of poses reported by Gazebo and Cartographer.

TLDR: How do I evaluate localization quality (e.g. average squared deviation from the ground truth) using Gazebo, Cartographer SLAM in pure localization mode, and ROS?

edit retag flag offensive close merge delete