记录在学习古月的《ROS机器人开发实践》的相关问题

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/sunstarss/article/details/88886426

记录在学习古月的《ROS机器人开发实践》的相关问题
我的版本 ubuntu16.04 kinetic
直接克隆或下载到你的工作空间

git clone https://github.com/huchunxu/ros_exploring.git

编译
catkin_make
报错

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

缺少ecto组件,安装即可

sudo apt-get install ros-kinetic-ecto 

报错

Could not find the required component 'manipulation_msgs'. 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 "manipulation_msgs"

  with any of the following names:
    manipulation_msgsConfig.cmake
    manipulation_msgs-config.cmake

缺少manipulation_msgs这个包,安装

sudo apt install ros-kinetic-manipulation-msgs 

报错

Could not find the required component 'moveit_ros_perception'. 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
  "moveit_ros_perception" with any of the following names:

    moveit_ros_perceptionConfig.cmake
    moveit_ros_perception-config.cmake

同理,缺少moveit_ros_perception这个组件,安装,3秒完事

sudo apt-get install ros-kinetic-moveit-ros-planning-interface

报错

Could not find the required component 'move_base_msgs'. 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 "move_base_msgs"
  with any of the following names:

    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake

缺少move_base_msgs,在导航包navigation里面

sudo apt-get install ros-kinetic-navigation

报错

 Could not find a package configuration file provided by
  "gazebo_ros_control" with any of the following names:

    gazebo_ros_controlConfig.cmake
    gazebo_ros_control-config.cmake

安装

sudo apt-get install ros-indigo-gazebo-ros-control

持续编译,出错

/usr/bin/ld: 找不到 -lmsc
collect2: error: ld returned 1 exit status
robot_perception/robot_voice/CMakeFiles/tts_subscribe.dir/build.make:113: recipe for target '/home/zyh/gy_ws/devel/lib/robot_voice/tts_subscribe' failed

缺少链接库,根据《ROS机器人开发实践》书中介绍(科大讯飞那一块207页),将科大讯飞库文件拷贝到系统目录下,进入SDK根目录下的libs文件夹,选择相应的架构平台x64/x86,使用命令拷贝。

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

心态崩了,还有问题

/home/zyh/gy_ws/build/ros_advanced/dynamic_tutorials/setup_custom_pythonpath.sh: 5: exec: /home/zyh/gy_ws/src/ros_advanced/dynamic_tutorials/cfg/Tutorials.cfg: Permission denied
ros_advanced/dynamic_tutorials/CMakeFiles/dynamic_tutorials_gencfg.dir/build.make:63: recipe for target '/home/zyh/gy_ws/devel/include/dynamic_tutorials/TutorialsConfig.h' failed
make[2]: *** [/home/zyh/gy_ws/devel/include/dynamic_tutorials/TutorialsConfig.h] Error 126
CMakeFiles/Makefile2:3232: recipe for target 'ros_advanced/dynamic_tutorials/CMakeFiles/dynamic_tutorials_gencfg.dir/all' failed
make[1]: *** [ros_advanced/dynamic_tutorials/CMakeFiles/dynamic_tutorials_gencfg.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....

这是权限问题,根据问题找原因。
进入 ros_exploring/ros_advanced/dynamic_tutorials/cfg 文件夹,打开终端。

chmod +x Tutorials.cfg

catkin_make

[100%] Linking CXX executable /home/zyh/gy_ws/devel/lib/action_tutorials/DoDishes_client
[100%] Built target DoDishes_client

开心

展开阅读全文

没有更多推荐了,返回首页