在ROS-Melodic版本上编译书籍机器人开发实践源码及报错问题解决方法

简介

最近在拜读ROS大神胡春旭的书籍《机器人开发实践》,随把源代码从仓库clone下来,进行编译和学习。仓库代码主要是基于Kinetic版本的,而目前我们主要使用Melodic版本,所以很多地方问题不一样现记录如下,希望后来者可以参考学习。

问题1:书中所说的ROS2的问题

解决方案:

该问题属于ROS和ROS2的不兼容造成,直接把ROS2移除即可。

问题2:关于ECTO的报错报错信息如下

Could not find the required component ‘ecto’. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. 

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): 
Could not find a package configuration file provided by “ecto” with any of 
the following names: 
ectoConfig.cmake 
ecto-config.cmake 

Add the installation prefix of “ecto” to CMAKE_PREFIX_PATH or set 
“ecto_DIR” to a directory containing one of the above files. If “ecto” 
provides a separate development package or SDK, be sure it has been 
installed. 
Call Stack (most recent call first): 
ros_exploring-master/robot_perception/ork_tutorials/CMakeLists.txt:4 (find_package) 

解决方案:

1,若是Kinetic可直接使用如下命令安装

$ sudo apt-get install ros-kinetic-ecto 

2,若是Melodic可以用下面这篇博客解决

https://blog.csdn.net/ckkboy/article/details/99584987

问题3:缺少 manipulation-msgs

1,若是Kinetic可直接使用如下命令安装

$ sudo apt install ros-kinetic-manipulation-msgs 

2,若melodic版本如下解决,在src目录下git clone 仓库编译即可

$ cd your_path/src
$ git clone https://github.com/ros-interactive-manipulation/manipulation_msgs.git

问题4:在编译讯飞语音库的时候报错,这个书籍给出解决方案

$ sudo cp ros_exploring/robot_perception/robot_voice/libs/x64/libmsc.so /usr/lib/libmsc.so

问题5:关于Tutorials.cfg的报错

/ros_exploring/ros_advanced/dynamic_tutorials/cfg/Tutorials.cfg: Permission denied 

解决方法:

加上权限即可
sudo chmod +x Tutorials.cfg

问题5:缺少household msgs,该问题解决方案和问题3一样,下载链接如下

https://github.com/ros-interactive-manipulation/household_objects_database_msgs.git

总结:

编译过程中可能还会遇到诸如gazebo等等这些库缺失可以直接使用ros-melodic-你要找的进行安装即可。欢迎大家学习交流。

[1]https://blog.csdn.net/YiKangJ/article/details/82024809
[2]https://blog.csdn.net/ckkboy/article/details/99584987

你可能感兴趣的:(Ros,ROS,机器人开发实践,Melodic版本)