在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

  • 12
    点赞
  • 50
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值