Ubuntu18.04 环境下 ROS melodic 版map_server、gmapping 等包的源代码安装方法

版权声明:转载请注明出处,谢谢。 https://blog.csdn.net/wsc820508/article/details/81561304

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
  file for openslam_gmapping.  The file will have one of the following names:

    openslam_gmappingConfig.cmake
    openslam_gmapping-config.cmake

上面的报错实际意思指的是缺少 openslam_gmapping 包,解决方法是 git clone相关源码一起编译,至于 包的源码地址可以在

http://wiki.ros.org 网站上查找,相关包的信息页有包 git 地址。

猜你喜欢

转载自blog.csdn.net/wsc820508/article/details/81561304
今日推荐