Directly Read sensor_msgs from rosbag and save them in .txt. Then plot it. This tool is very convenient to plot the SLAM, GPS or other trajectories from rosbag.
The usage is very simple, you just need to use rosbag record node to record the /SLAM/pose or /GPS sensor_msgs, then :
- rosbag record /slam/pose /gps/fix
- set the file path in the loadtxt("/path") in extract_topics_from_rosbag.py
- python extract_topics_from_rosbag.py
- python plotTrajectory.py
Then, you can see the trajectory like this:
P.S. If you want to obtain the RMSE, STD, MAE and other error items, I recommend you the evo tool. In addition, I have transfered the KITTI groudtruth file into a general format for MSF error evaluation, namely kitti_00_groudtruth.tum. Note: I recommed you use this groudtruth file, in case you spend lots of time to do the same work as I have done.