Cartographer安装

官方安装教程:

https://google-cartographer-ros.readthedocs.io/en/latest/index.html

# Install wstool and rosdep.
sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build

# Create a new workspace in 'catkin_ws'.
mkdir catkin_ws
cd catkin_ws
wstool init src

# Merge the cartographer_ros.rosinstall file and fetch code for dependencies.
wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
wstool update -t src
//在这一步可能会显示无法下载cere-solver
/*
解决办法
1.手动下载cere-solver 然后放到src中 # Install proto3. src/cartographer/scripts/install_proto3.sh # Install deb dependencies. # The command 'sudo rosdep init' will print an error if you have already # executed it since installing ROS. This error can be ignored. sudo rosdep init rosdep update rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y //这里要修改ROS_DISTRO为自己的ros版本如kinetic或者indigo # 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/with_intensities/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

 运行结果如下所示:

 

猜你喜欢

转载自www.cnblogs.com/leon-FFF/p/9107568.html
今日推荐