上一节我们介绍了在linux中快速安装集成ros环境的cartographer。
本节我们会来跑一些官方demo,用于测试cartographer是否正确安装,顺便看看cartographer的建图与定位效果。
这里建议如果和作者一样用的是VMware虚拟机,最好给系统分配4G以上的内存。
官方用例
https://google-cartographer-ros.readthedocs.io/en/latest/demos.html
目录
1:德国博物馆
通过雷达LaserScan和陀螺仪IMU建图的案例
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag
过程:
结果:
2:纯定位
纯定位使用 2 个不同的包。第一个用于建图,第二个用于定位。
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/b2-2016-04-05-14-44-52.bag
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/b2-2016-04-27-12-31-41.bag
建图:
roslaunch cartographer_ros offline_backpack_2d.launch bag_filenames:=${HOME}/Downloads/b2-2016-04-05-14-44-52.bag
定位:
roslaunch cartographer_ros demo_backpack_2d_localization.launch \
load_state_filename:=${HOME}/Downloads/b2-2016-04-05-14-44-52.bag.pbstream \
bag_filename:=${HOME}/Downloads/b2-2016-04-27-12-31-41.bag
过程:
3:静态地标
此案例在建图过程中加入了landmark数据作为辅助。
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/mir/landmarks_demo_uncalibrated.bag
roslaunch cartographer_mir offline_mir_100_rviz.launch bag_filenames:=${HOME}/Downloads/landmarks_demo_uncalibrated.bag
过程
过程:
结果:
4:Revo LDS
从 Neato Robotics 真空吸尘器的低成本 Revo 激光距离传感器采集的Ros包,纯雷达建图。
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/revo_lds/cartographer_paper_revo_lds.bag
roslaunch cartographer_ros demo_revo_lds.launch bag_filename:=${HOME}/Downloads/cartographer_paper_revo_lds.bag
过程:
结果:
5:PR2
从 Willow Garage 的 PR2 研发机器人采集的Ros包。(这个包有3.7个G,不是必要的话可以不跑该示例)
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/pr2/2011-09-15-08-32-46.bag
roslaunch cartographer_ros demo_pr2.launch bag_filename:=${HOME}/Downloads/2011-09-15-08-32-46.bag
过程:
结果:
6:Taurob Tracker
从 Taurob Tracker 远程操作机器人采集的Ros包
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/taurob_tracker/taurob_tracker_simulation.bag
roslaunch cartographer_ros demo_taurob_tracker.launch bag_filename:=${HOME}/Downloads/taurob_tracker_simulation.bag
过程:
结果:
【完】
下一节我们将介绍在ros系统中,根据自己的需求发布和订阅传感器消息,给cartographer算法使用。