Ubuntu18.04 环境下 ROS melodic 版 中很多包没有提供sudo apt install的安装方式,需要通过源代码安装,安装方法如下:
1、安装libsdl1.2-dev 、 libsdl-image1.2-dev 否则会报 “Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR)”等的错。
sudo apt-get install libsdl1.2-dev
sudo apt install libsdl-image1.2-dev
2、进入工作空间,git clone以下源代码编译安装:
cd ~/catkin_ws/src/
git clone https://github.com/ros-perception/openslam_gmapping
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
cd ~/catkin_ws && catkin_make
3、注意安装时如果系统缺少相关的依赖包会报错,如:
Could not find a configuration file for package openslam_gmapping.
Set openslam_gmapping_DIR to the directory containing a CMake configuration
fil