依赖
sudo apt-get update
sudo apt-get install -y python3-wstool python3-rosdep ninja-build stow
创建工作空间并下载源码
mkdir catkin_ws
cd catkin_ws
wstool init src
cd src && git clone http://www.aigrantli.com:1080/cartographer/cartographer_ros.git
编译
cd catkin_ws
catkin_make_isolated --install --use-ninja
Demo
Deutsches Museum
2D demo
- 启动demo
cd catkin_ws
source install_isolated/setup.bash
wget -P ~/catkin_ws/install_isolated/share/cartographer_ros/bag https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
roslaunch cartographer_ros demo_backpack_2d.launch
- 保存地图
rosrun map_server map_saver -f ~/catkin_ws/install_isolated/share/cartographer_ros/maps/DM_2Dmap
3D demo
- 启动demo
cd catkin_ws
source install_isolated/setup.bash
wget -P ~/catkin_ws/install_isolated/share/cartographer_ros/bag 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
- 保存地图
rosrun map_server map_saver -f ~/catkin_ws/install_isolated/share/cartographer_ros/maps/DM_3Dmap
Pure localization
2D demo
- 启动demo
wget -P ~/catkin_ws/install_isolated/share/cartographer_ros/bag https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/b2-2016-04-05-14-44-52.bag
wget -P ~/catkin_ws/install_isolated/share/cartographer_ros/bag https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/b2-2016-04-27-12-31-41.bag
cd catkin_ws
source install_isolated/setup.bash
roslaunch cartographer_ros offline_backpack_2d.launch
roslaunch cartographer_ros demo_backpack_2d_localization.launch
- 保存地图
rosrun map_server map_saver -f ~/catkin_ws/install_isolated/share/cartographer_ros/maps/PL_2Dmap
3D demo
- 启动demo
wget -P ~/catkin_ws/install_isolated/share/cartographer_ros/bag https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/b3-2016-04-05-13-54-42.bag
wget -P ~/catkin_ws/install_isolated/share/cartographer_ros/bag https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/b3-2016-04-05-15-52-20.bag
cd catkin_ws
source install_isolated/setup.bash
roslaunch cartographer_ros offline_backpack_3d.launch
roslaunch cartographer_ros demo_backpack_3d_localization.launch
- 保存地图
rosrun map_server map_saver -f ~/catkin_ws/install_isolated/share/cartographer_ros/maps/PL_3Dmap
Revo LDS
- 启动demo
wget -P ~/catkin_ws/install_isolated/share/cartographer_ros/bag https://storage.googleapis.com/cartographer-public-data/bags/revo_lds/cartographer_paper_revo_lds.bag
cd catkin_ws
source install_isolated/setup.bash
roslaunch cartographer_ros demo_revo_lds.launch
- 保存地图
rosrun map_server map_saver -f ~/catkin_ws/install_isolated/share/cartographer_ros/maps/RLmap
PR2
- 启动demo
wget -P ~/catkin_ws/install_isolated/share/cartographer_ros/bag https://storage.googleapis.com/cartographer-public-data/bags/pr2/2011-09-15-08-32-46.bag
cd catkin_ws
source install_isolated/setup.bash
roslaunch cartographer_ros demo_pr2.launch
- 保存地图
rosrun map_server map_saver -f ~/catkin_ws/install_isolated/share/cartographer_ros/maps/PR2map
Taurob Tracker
- 启动demo
wget -P ~/catkin_ws/install_isolated/share/cartographer_ros/bag https://storage.googleapis.com/cartographer-public-data/bags/taurob_tracker/taurob_tracker_simulation.bag
cd catkin_ws
source install_isolated/setup.bash
roslaunch cartographer_ros demo_taurob_tracker.launch
- 保存地图
rosrun map_server map_saver -f ~/catkin_ws/install_isolated/share/cartographer_ros/maps/TTmap
Cartographer ROS for TurtleBots
- 启动demo
wget -P ~/catkin_ws/install_isolated/share/cartographer_turtlebot/bag https://storage.googleapis.com/cartographer-public-data/bags/turtlebot/cartographer_turtlebot_demo.bag
cd catkin_ws
source install_isolated/setup.bash
# Launch the 2D LIDAR demo.
roslaunch cartographer_turtlebot demo_lidar_2d.launch
# Launch the 2D depth camera demo.
roslaunch cartographer_turtlebot demo_depth_camera_2d.launch
# Launch the 3D depth camera demo.
roslaunch cartographer_turtlebot demo_depth_camera_3d.launch
- 保存地图
rosrun map_server map_saver -f ~/catkin_ws/install_isolated/share/cartographer_ros/maps/CRTmap
参考链接
1. Cartographer ROS Integration
2. Cartographer ROS for TurtleBots
评论区