ubuntu18.04 安装 ros cartographer

1.安装依赖sudo apt-get updatesudo apt-get install -y python-wstool python-rosdep ninja-buildsudo apt-get install cmakesudo apt-get install build-essentialsudo apt-get install libgoogle-glog-devsudo apt-get install libatlas-base-dev2.安装Eigen3sudo a

1.安装依赖

sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build
sudo apt-get install cmake
sudo apt-get install build-essential
sudo apt-get install libgoogle-glog-dev
sudo apt-get install libatlas-base-dev

2.安装Eigen3

sudo apt-get install libeigen3-dev
#构建ceres作为一个静态的库
sudo apt-get install libsuitesparse-dev

3.安装lua5.2

sudo apt install lua5.2

4.获取源代码

        获取源代码的方法有很多种,有采用git clone的方法。但是国内的如果没有一些方法的话访问github非常慢,非常容易导致git clone失败。所以这里直接从网盘直接下载好代码。cartographer.zip – 蓝奏云【参考:】备用链接百度云:链接:https://pan.baidu.com/s/1gWaSSftWyDQ-U2MxxdEEwA 提取码:1234 

ubuntu18.04 安装 ros cartographer

         这里可以把版本信息去掉。

5.安装protobuf 3.0.0

        直接将下载好的protobuf放在cartographer/scripts/目录下,注意cartographer_ros不用放。放好之后如图所示:

ubuntu18.04 安装 ros cartographer

        执行下面命令安装:

cd protobuf
mkdir build
cd build
cmake -G Ninja \
  -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
  -DCMAKE_BUILD_TYPE=Release \
  -Dprotobuf_BUILD_TESTS=OFF \
  ../cmake
 
ninja
sudo ninja install

6.安装ceres-solver

make -j 8 这个根据硬件选,我的RK3566选8挂了

cd ceres-solver
mkdir build
cd build
cmake ..
make -j 8 
#make test  # 此选项可选
sudo make install

7.编译安装

cd cartographer_ws
rosdep update
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

8.运行DEMO 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

9.效果图

ubuntu18.04 安装 ros cartographer

参考:

[1] ubuntu18.04 安装测试ros cartographer_足迹-CSDN博客

[2] ubuntu18.04 安装cartographer教程_缘来17的博客-CSDN博客_ubuntu 安装cartographer

版权声明:本文为博主log_zhan原创文章,版权归属原作者,如果侵权,请联系我们删除!

原文链接:https://blog.csdn.net/log_zhan/article/details/122572556

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2022年1月19日 上午11:53
下一篇 2022年1月19日 下午2:21

相关推荐