1 ubuntu18.04 cartographer 安装

参考了:

https://blog.csdn.net/jc15988821760/article/details/99731809

https://blog.csdn.net/mylovechao/article/details/83902951

在ubuntu18.04 Melodic下安装cartographer 

方法一、二进制包直接安装

sudo apt-get update
 
sudo apt-get install ros-melodic-cartographer*   //安装全部关于cartographer的包

 

 

 

方法二:

1、安装相关的依赖

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-melodic-tf2-eigen libatlas-base-dev libsuitesparse-dev liblapack-dev

2.install ceres solver,建议在home下创建个目录(cartographer)

(路径你可以自己随意,不过建议最好和和下面安装的放在一起;如: path:/home/chenub/cartographer)

从以下网址下载

http://distfiles.macports.org/ceres-solver/

 

tar zxf ceres-solver-1.14.0.tar.gz
cd ceres-solver-1.14.0/
mkdir ceres-bin
cd ceres-bin
cmake ..
make -j3
make test
# Optionally install Ceres, it can also be exported using CMake which
# allows Ceres to be used without requiring installation, see the documentation
# for the EXPORT_BUILD_DIR option for more information.
sudo make install


(err:check dependency 如果报错,请查看依赖项是否添加正确)

3.install cartographer

回到路径如: path:/home/chenub/cartographer)

git clone https://github.com/hitcm/cartographer.git
cd cartographer/
mkdir build
cd build
cmake .. -G Ninja
ninja
ninja test
sudo ninja install

4.install cartographer_ros

$  sudo apt-get update
$  sudo apt-get install -y python-wstool python-rosdep ninja-build
$  mkdir catkin_ws
$  cd catkin_ws
$  wstool init src
$  cd src
$  git clone https://github.com/hitcm/cartographer_ros.git
$  cd
$  cd catkin_ws
$  catkin_make

最后为了避免每次都要加工作空间麻烦,所以可以执行下面的直接写好即可.
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值