方法一、Google---cartographer源码安装
——>若还未安装ROS与cartographer
>则运行如下代码,选择安装ROS与cartographer:
wget http://fishros.com/install -O fishros && . fishros
>接着进行cartographer的依赖环境和依赖库的安装及编译:
cd src/同级目录
catkin_make
若报错:Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR)
则运行:sudo apt-get install libsdl-image1.2-dev
若报错:Could not find a package configuration file provided by "move_base_msgs"
则运行:sudo apt-get install ros-noetic-move-base-msgs
若报错:muparser library not found
则运行:sudo apt install libmuparser-dev
若报错:Could not find a package configuration file provided by "cartographer" with
any of the following names
/*
sudo apt-get install -y python3-wstool python3-rosdep ninja-build stow
2、安装protobuf
#git clone -b v3.6.0 https://github.com/protocolbuffers/protobuf.git
sudo vi /etc/hosts
line3 ++: 185.199.109.133 raw.githubusercontent.com
sudo rosdep init
rosdep update
报错:因未翻墙,修改国内源
sudo vi /usr/lib/python3/dist-packages/rosdep2/sources_list.py
DEFAULT_SOURCES_LIST_URL='https://gitee.com/ssonic/rosdistro/raw/master/rosdep/sources.list.d/20-default.list'
sudo vi /usr/lib/python3/dist-packages/rosdep2/gbpdistro_support.py
FUERTE_GBPDISTRO_URL = 'https://gitee.com/ssonic/rosdistro/raw/master/releases/fuerte.yaml'
sudo vi /usr/lib/python3/dist-packages/rosdep2/rep3.py
REP3_TARGETS_URL ='https://gitee.com/ssonic/rosdistro/raw/master/releases/targets.yaml'
sudo vi /usr/lib/python3/dist-packages/rosdistro/__init__.py
DEFAULT_INDEX_URL = 'https://gitee.com/ssonic/rosdistro/raw/master/index-v4.yaml'
sudo rosdep init
报错:rm –rf /etc/ros/rosdep/sources.list.d/20-default.list
sudo rosdep init
rosdep update
*/
安装cartographer:
sudo apt-get install -y \
cmake \
g++ \
git \
stow \
google-mock \
libboost-all-de