#安装gmapping
1.安装依赖项
sudo apt-get install libsdl1.2-dev
sudo apt install libsdl-image1.2-dev
2.进入工作空间
cd ~/catkin_ws/src/
3.使用git clone源码
git clone https://github.com/ros-perception/openslam_gmapping.git
git clone https://github.com/ros-perception/slam_gmapping.git
git clone https://github.com/ros-planning/navigation.git
git clone https://github.com/ros/geometry2.git
git clone https://github.com/ros-planning/navigation_msgs.git
4.在工作空间中编译
catkin_make
#报错及解决
报错1:CMake Error at geometry2/tf2_bullet/CMakeLists.txt:11 (find_package): By not providing "Findbullet.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "bullet", but CMake did not find one.
解决:安装依赖项
sudo apt-get install libbullet-dev
报错2:关于c++11标准
解决:在src/文件下的CmakeLists.txt文件中加入关于c++11标
set( CMAKE_CXX_FLAGS "-std=c++11 -O3" )
再次catkin_make,即编译成功