之前博客《ROS学习笔记之——EVO工具的使用》采用了EVO来衡量误差,本博文试试rpg_trajectory_evaluation
首先编译
mkdir catkin_ws cd catkin_ws mkdir src cd src git clone https://github.com/uzh-rpg/rpg_trajectory_evaluation.git git clone https://github.com/catkin/catkin_simple.git cd .. catkin_make
安装依赖库
pip install numpy pip install matplotlib pip install colorama pip install ruamel.yaml sudo apt install texlive-fonts-recommended texlive-fonts-extra sudo apt install dvipng
首先将rosbag转换为需要的文件,通过bag_to_pose.py
python2 /home/kwanwaipang/catkin_ws/src/rpg_trajectory_evaluation/scripts/dataset_tools/bag_to_pose.py /home/kwanwaipang/dataset/gwphku/amcl_vicon_2021-11-04-11-18-50.bag /amcl_pose --msg_type PoseWithCovarianceStamped --output stamped_traj_estimate.txt python2 /home/kwanwaipang/catkin_ws/src/rpg_trajectory_evaluation/scripts/dataset_tools/bag_to_pose.py /home/kwanwaipang/dataset/gwphku/amcl_vicon_2021-11-04-11-18-50.bag /turtlebot2/viconros/mocap/pos --msg_type PoseStamped --output stamped_groundtruth.txt 通过rostopic info即可查看topic类型
然后运行(plots: plots of absolute errors, relative (odometry) errors and the trajectories.)
python2 scripts/analyze_trajectory_single.py /home/kwanwaipang/dataset/gwphku/amcl
参考资料
https://github.com/uzh-rpg/rpg_trajectory_evaluation
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)