安装环境: Ubuntu22.04 ros2 humble
# 下载源文件
git clone https://github.com/ros2/cartographer.git -b ros2
git clone https://github.com/ros2/cartographer_ros.git -b ros2
# 使用小鱼一键配置rosdep
wget http://fishros.com/install -O fishros && . fishros
#选编号3
rosdepc update
rosdepc install -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y
# 开始编译
colcon build --packages-up-to cartographer_ros
报错,未安装absl
进入cartographer/scripts,运行install_abseil.sh
继续报错
解决方案
如果之前有安装abseil,需要到/usr文件夹中搜索”absl“删除相关文件
abseil安装完成后即可重新开始编译
colcon build --packages-up-to cartographer_ros
#检查是否安装成功
ros2 pkg list | grep cartographer