Ubuntu18.04 环境下melodic中很多包没有提供sudo apt install的安装方式,需要通过源代码安装,安装方法如下:
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.gi
4.编译安装
cd ..
catkin_make
5.之后可能会出现报错,试试下面这个
catkin_make_isolated