基于ROS的服务机器人移植过程编译问题汇总

为方便后续工作,写下博客汇总服务机器人v1.0代码移植到笔记本上遇到的一些编译错误问题。

1、工作空间包含的src如下

基于ROS的服务机器人移植过程编译问题汇总_第1张图片

2、编译

   1)初次编译错误:

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "move_base_msgs"
  with any of the following names:

    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake

  Add the installation prefix of "move_base_msgs" to CMAKE_PREFIX_PATH or set
  "move_base_msgs_DIR" to a directory containing one of the above files.  If
  "move_base_msgs" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  navigation_send_goals/CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jk/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/jk/catkin_ws/build/CMakeFiles/CMakeError.log".

    分析:笔记本未安装move_base包

    措施:

sudo apt-get install ros-kinetic-navigation

再次编译出现:

基于ROS的服务机器人移植过程编译问题汇总_第2张图片

sudo apt-get install libbullet-dev

如果存在依赖问题,需要修复

sudo apt-get -f install

注:如果出现依赖问题解决不了,可以考虑降级安装包:

首先安装:

sudo apt-get install aptitude
如果是: Could NOT find SDL (missing: SDL_LIBRARYSDL_INCLUDE_DIR)
sudo aptitude install libsdl1.2-dev

先选择no,后选择yes,降级安装

sdl_image问题也如此

sudo apt-get install libsdl-image1.2-dev 

或者

sudo aptitude install libsdl-image1.2-dev 

2)再次编译

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "turtlebot_navigation" with any of the following names:

    turtlebot_navigationConfig.cmake
    turtlebot_navigation-config.cmake

  Add the installation prefix of "turtlebot_navigation" to CMAKE_PREFIX_PATH
  or set "turtlebot_navigation_DIR" to a directory containing one of the
  above files.  If "turtlebot_navigation" provides a separate development
  package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  kelai_robot/CMakeLists.txt:6 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jk/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/jk/catkin_ws/build/CMakeFiles/CMakeError.log".

分析:机器人使用了turtlebot的键盘控制以及gmapping,安装turtlebot包

措施:

 sudo apt-get install ros-kinetic-turtlebot
 sudo apt-get install ros-kinetic-turtlebot-navigation

3)再编译

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "serial" with any
  of the following names:

    serialConfig.cmake
    serial-config.cmake

  Add the installation prefix of "serial" to CMAKE_PREFIX_PATH or set
  "serial_DIR" to a directory containing one of the above files.  If "serial"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  kelai_robot/CMakeLists.txt:6 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jk/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/jk/catkin_ws/build/CMakeFiles/CMakeError.log".

分析:缺少ros的串口包

措施:

sudo apt-get install ros-kinnetic-serial

4)继续编译出现:

/usr/bin/ld: 找不到 -lmsc

分析:讯飞语音SDk提供的动态链接库没有放在/usr/lib下

措施:

cd ~/catkin_ws/src/xf_voice/lib/
ls

显示:

libmsc.so

措施:

sudo cp libmsc.so /usr/lib

5)继续编译

编译成功





你可能感兴趣的:(移动机器人/ROS)