Turtlebot3中级教程-Cartographer-turtlebot 安装

Turtlebot3中级教程-Cartographer-turtlebot安装

说明

来自官方的安装方法

  • 修改ceres-solver地址:
  • github地址:https://github.com/ceres-solver/ceres-solver.git

**0. 准备**

1. 库安装

 - 在ubuntu 16.04 + Kinetic 测试运行。

  • 我们推荐使用wstoolrosdep.但更快安装推荐使用Ninja.

  • 安装依赖:

sudo apt-get install -y google-mock libboost-all-dev  libeigen3-dev libgflags-dev libgoogle-glog-dev liblua5.2-dev libprotobuf-dev  libsuitesparse-dev libwebp-dev ninja-build protobuf-compiler python-sphinx  ros-kinetic-tf2-eigen libatlas-base-dev libsuitesparse-dev liblapack-dev
  • 安装步骤:
# 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_turtlebot.rosinstall file and fetch code for dependencies.

wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_turtlebot/master/cartographer_turtlebot.rosinstall

#vim src/.rosinstall
#更改ceres-solver中地址改为下面的地址:
#>>uri: https://github.com/ceres-solver/ceres-solver.git

wstool update -t src

# Install deb dependencies.
rosdep update

# install proto3
src/cartographer/scripts/install_proto3.sh
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y

# Build and install.
catkin_make_isolated --install --use-ninja -j1
source install_isolated/setup.bash
  • 添加到.bashrc
echo "source ~/catkin_ws/install_isolated/setup.bash" >> ~/.bashrc

问题:

  • 问题1:
cartographer/mapping/proto/submap.proto:15:10: Unrecognized syntax identifier "proto3".  This parser only recognizes "proto2".
  • 解决:可能同时安装了proto2,优先找了/usr/bin/protoc的版本, 新安装的proto3放在/usr/local/bin/protoc下,建立一个软连接。
mv /usr/bin/protoc  /usr/bin/protoc.bk 
ln -s /usr/local/bin/protoc /usr/bin/protoc
  • 问题2:出现卡死在编译map_builder_bridge.cc.o
  • 解决:扩展卡大小至少16G以上,并扩展swap2G以上

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: cartographer, turtlebot3-burger, turtlebot3中级教程