安装karto SLAM

karto有多个版本,我们这里选择了一个ROS官方集成的版本。
首先,kartoSLAM有3个包。
先git到工作空间中

git clone https://github.com/ros-perception/slam_karto
git clone https://github.com/ros-perception/open_karto
git clone https://github.com/ros-perception/sparse_bundle_adjustment

如果此时直接catkin_make,会报如下error:

/home/y/ros_ws/slam_karto_ws/src/sparse_bundle_adjustment/include/sparse_bundle_adjustment/csparse.h:55:10: fatal error: suitesparse/cs.h: No such file or directory
 #include "suitesparse/cs.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
sparse_bundle_adjustment/CMakeFiles/sba.dir/build.make:86: recipe for target 'sparse_bundle_adjustment/CMakeFiles/sba.dir/src/spa.cpp.o' failed
make[2]: *** [sparse_bundle_adjustment/CMakeFiles/sba.dir/src/spa.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/y/ros_ws/slam_karto_ws/src/sparse_bundle_adjustment/src/csparse.cpp:40:0:
/home/y/ros_ws/slam_karto_ws/src/sparse_bundle_adjustment/include/sparse_bundle_adjustment/csparse.h:55:10: fatal error: suitesparse/cs.h: No such file or directory
 #include "suitesparse/cs.h"
compilation terminated.
sparse_bundle_adjustment/CMakeFiles/sba.dir/build.make:110: recipe for target 'sparse_bundle_adjustment/CMakeFiles/sba.dir/src/spa2d.cpp.o' failed
make[2]: *** [sparse_bundle_adjustment/CMakeFiles/sba.dir/src/spa2d.cpp.o] Error 1
CMakeFiles/Makefile2:757: recipe for target 'sparse_bundle_adjustment/CMakeFiles/sba.dir/all' failed
make[1]: *** [sparse_bundle_adjustment/CMakeFiles/sba.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

首先需要安装这里缺的东西

sudo apt-get install libsuitesparse-dev

然后就可以正常运行了。
请添加图片描述

请添加图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值