其他分享
首页 > 其他分享> > cartographer安装

cartographer安装

作者:互联网

参考链接:https://blog.csdn.net/qq_26482237/article/details/92676267
ROS版本为kinetic 系统为Ubuntu16.04 工作空间名称为carto_ws

  1. 安装工具
sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build
  1. 初始化工作空间
cd carto_ws
wstool init src
  1. 加入cartographer_ros.rosinstall并更新依赖
wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
输入完第一个命令后需要改文件的下载地址,另起终端输入:
gedit carto_ws/src/.rosinstall
将最后一个git来源网址由https://ceres-solver.googlesource.com/ceres-solver.git改为https://github.com/ceres-solver/ceres-solver.git,,如该果可以挂VPN可以不改。
wstool update -t src
  1. 工作空间下安装proto否则编译会出错
src/cartographer/scripts/install_proto3.sh
  1. 安装依赖并下载cartographer相关功能包
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
(我默认版本为kinetic,若是其他ROS版本相应替换)
  1. 编译并安装
catkin_make_isolated --install --use-ninja
source install_isolated/setup.bash
可以将这个命令放到bashrc文件中,否则每次运行demo都需要输入一遍,否则找不到launch文件
  1. 测试
2D包 .
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
如果下载速度慢,直接去网页下载。
3D 包
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
  1. 我遇到的问题
    编译时候rviz报错,错误原因是自动依赖了的pcl-1.9,应该依赖pcl-1.7。这个版本需要指定在cmake中,路径为:~/carto_ws/src/cartographer_ros/cartographer_ros/CMakeLists.txt
    在这里插入图片描述
xiaoooli 发布了21 篇原创文章 · 获赞 0 · 访问量 9478 私信 关注

标签:src,cartographer,com,bag,https,ros,安装
来源: https://blog.csdn.net/qq_40230900/article/details/104580161