官方文档:
Running Cartographer ROS on a demo bag — Cartographer ROS documentation
Running Cartographer ROS on a demo bag
Now that Cartographer and Cartographer’s ROS integration are installed, you can download example bags (e.g. 2D and 3D backpack collections of the Deutsches Museum) to a known location, in this case ~/Downloads
, and use roslaunch
to bring up the demo.
The launch files will bring up roscore
and rviz
automatically.
Warning:
When you want to run cartographer_ros, you might need to source your ROS environment by running source install_isolated/setup.bash
first (replace bash with zsh if your shell is zsh)
这个很重要!一定要先运行,不然就报错啦!
source install_isolated/setup.bash
Deutsches Museum
2D:
Download and launch the 2D backpack demo:
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
注意下载 bag 保存的路径~
结果展示如下:
此时活跃的话题:
3D:
Download and launch the 3D backpack demo:
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/with_intensities/b3-2016-04-05-14-14-00.bag
roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${HOME}/Downloads/b3-2016-04-05-14-14-00.bag
结果展示如下:
此时活跃的话题: