Cartographer ROS版的官方地址:https://github.com/googlecartographer/cartographer_ros
程序的安装运行,参考了官方安装教程(https://google-cartographer-ros.readthedocs.io/en/latest/)。
环境: i7 ubuntu 14.04 + ROS indigo
安装步骤(参考官方教程)
#Install wstool and rosdep
sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build
#Create a new workspace
mkdir catkin_ws
cd catkin_ws
wstool init src
#Merge the cartographer_ros. rosinstall file and fetch code for dependences
wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
wstool update -t src
#Install deb dependence.
rosdep init
rosdep update
rosdep rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
#Build and install
catkin_make_isolated --install --use-ninja
source install_isolated/setup.bash
谷歌给提供了几个数据包,下载并试运行。
# Download the 2D backpack example bag.
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
# Launch the 2D backpack demo.
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag
# Download the 3D backpack example bag.
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/b3-2016-04-05-14-14-00.bag
# Launch the 3D backpack demo.
roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${HOME}/Downloads/b3-2016-04-05-14-14-00.bag
# Download the Revo LDS example bag.
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/revo_lds/cartographer_paper_revo_lds.bag
# Launch the Revo LDS demo.
roslaunch cartographer_ros demo_revo_lds.launch bag_filename:=${HOME}/Downloads/cartographer_paper_revo_lds.bag
# Download the PR2 example bag.
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/pr2/2011-09-15-08-32-46.bag
# Launch the PR2 demo.
roslaunch cartographer_ros demo_pr2.launch bag_filename:=${HOME}/Downloads/2011-09-15-08-32-46.bag
# Download the Taurob Tracker example bag.
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/taurob_tracker/taurob_tracker_simulation.bag
# Launch the Taurob Tracker demo.
roslaunch cartographer_ros demo_taurob_tracker.launch bag_filename:=${HOME}/Downloads/taurob_tracker_simulation.bag
运行结果:
2D backpack example bag的效果:
实验机内存8G,随着代码的运行,内存占用越来越大,,切换界面会有明显的卡顿感。
以上主要记录了个人的操作步骤,请以官方教程为主。