看着像你的ros环境不完整
你是ros1 还是ros2
重要提示
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
catalpa 发布的最新帖子
-
RE: cartographer用catkin_make_isolated --install --use-ninja编译报错
-
RE: 众筹重金悬赏:给一键安装添加一键装cartographer(小鱼免费提供技术支持)
把命令给整理了,亲测18没问题
使用方法:
新建cartographer.sh脚本
把下面的内容粘贴进去保存
然后打开终端运行 ./cartographer.sh即可
下面的图是安装编译后的cartographer正确目录结构
sudo apt-get update
#ROS 如果是20要用这个命令
#sudo apt-get install -y python3-rosdep ninja-build stow git
#ROS 如果是16/18用这个
sudo apt-get install -y python-rosdep ninja-build stow gitmkdir -p ~/cartographer_ws/src
cd cartographer_ws/src
git clone https://gitee.com/yuzi99url/cartographer_ros.git
git clone https://gitee.com/yuzi99url/cartographer.git
cd ../
rosdep init
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
git clone https://gitee.com/yuzi99url/abseil-cpp.git
cd abseil-cpp
git checkout d902eb869bcfacc1bad14933ed9af4bed006d481
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/usr/local/stow/absl ..
ninja
sudo ninja install
cd /usr/local/stow
sudo stow absl
cd ~/cartographer_wsset -o errexit
set -o verboseVERSION="v3.4.1"
#Build and install proto3.
git clone https://gitee.com/yuzi99url/protobuf.git
cd protobuf
git checkout tags/${VERSION}
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
sudo mv /usr/bin/protoc /usr/bin/protoc.bk
sudo ln -s /usr/local/bin/protoc /usr/bin/protoc
cd ~/cartographer_ws
catkin_make_isolated --install --use-ninja