机器人开发实践源码编译报错问题解决方法

ubuntu:16.04.7

ros:kinetic

vmware: vmware15.5

移植《机器人开发实践》源码包 ros_exploring,出现的问题都包含于以下内容中。

 

书中提到,如果将源码包 ros_exploring 直接放到 catkin 工作空间中,需要将 ros2 文件夹移出到工作空间之外,否则编译失败。

    将 ros2 文件夹移出之后仍然报错,具体信息如下:

    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/kinetic/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)

    – Configuring incomplete, errors occurred!
    See also “/home/qinpeiwang/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
    See also “/home/qinpeiwang/catkin_ws/build/CMakeFiles/CMakeError.log”.
    Invoking “cmake” failed

出错原因为缺少 ecto 这个包,使用如下命令安装再重新编译即可解决问题:

$ sudo apt-get install ros-kinetic-ecto

    1

同理,若缺少 manipulation-msgs 包则如下命令安装:

$ sudo apt install ros-kinetic-manipulation-msgs

    1

gazebo_ros_control 包:

$ sudo apt install ros-kinetic-gazebo-ros-control

    1

    缺少链接库报错:

    /usr/bin/ld: cannot find -lmsc
    collect2: error: ld returned 1 exit status

解决方法:参考书中207页说明,将科大讯飞的SDK库文件拷贝到系统目录下:

注:先进入库文件所在文件夹 ros_exploring/robot_perception/robot_voice/libs/x64(32位系统最后选择x86文件夹) 再执行如下命令

$ sudo cp libmsc.so /usr/lib/libmsc.so

    1

    权限错误:

    /home/jyk/catkin_ws/build/ros_exploring/ros_advanced/dynamic_tutorials/setup_custom_pythonpath.sh: 5:exec: /home/jyk/catkin_ws/src/ros_exploring/ros_advanced/dynamic_tutorials/cfg/Tutorials.cfg: Permission denied
    ros_exploring/ros_advanced/dynamic_tutorials/CMakeFiles/dynamic_tutorials_gencfg.dir/build.make:63: recipe for target ‘/home/jyk/catkin_ws/devel/include/dynamic_tutorials/TutorialsConfig.h’ failed

进入 ros_exploring/ros_advanced/dynamic_tutorials/cfg 文件夹,执行如下命令:

$ chmod +x Tutorials.cfg

    1

    pocketsphinx 语音包安装报错:

    ImportError: No module named pygst

错误原因为缺少 python-gst 依赖,执行如下命令即可解决问题:

  $ sudo apt install python-gst0.10

 

原文链接:

https://blog.csdn.net/YiKangJ/article/details/82024809

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值