解决catkin_make出现的问题

解决catkin_make出现的问题

  1. 关于"hardware_interface"

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by
“hardware_interface” with any of the following names:

hardware_interfaceConfig.cmake
hardware_interface-config.cmake

Add the installation prefix of “hardware_interface” to CMAKE_PREFIX_PATH or
set “hardware_interface_DIR” to a directory containing one of the above
files. If “hardware_interface” provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
aubo_robot/aubo_new_driver/CMakeLists.txt:9 (find_package)

– Could not find the required component ‘hardware_interface’. 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
“hardware_interface” with any of the following names:

hardware_interfaceConfig.cmake
hardware_interface-config.cmake

Add the installation prefix of “hardware_interface” to CMAKE_PREFIX_PATH or
set “hardware_interface_DIR” to a directory containing one of the above
files. If “hardware_interface” provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
aubo_robot/aubo_new_driver/CMakeLists.txt:9 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/wgb/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/wgb/catkin_ws/build/CMakeFiles/CMakeError.log”.
Makefile:1858: recipe for target ‘cmake_check_build_system’ failed
make: *** [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed
解决办法

sudo apt-get install ros-kinetic-effort-controllers
sudo apt-get install ros-kinetic-joint-state-controller

  1. 关于controller_manager

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

controller_managerConfig.cmake
controller_manager-config.cmake

Add the installation prefix of “controller_manager” to CMAKE_PREFIX_PATH or
set “controller_manager_DIR” to a directory containing one of the above
files. If “controller_manager” provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
aubo_robot/aubo_new_driver/CMakeLists.txt:9 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/wgb/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/wgb/catkin_ws/build/CMakeFiles/CMakeError.log”.
Makefile:1858: recipe for target ‘cmake_check_build_system’ failed
make: *** [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed

解决办法
sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers

  1. 与Python兼容问题(No module catkin_dkg.package)
    – Using Python nosetests: /usr/bin/nosetests-2.7
    ImportError: “from catkin_pkg.package import parse_package” failed: No module named catkin_pkg.package
    Make sure that you have installed “catkin_pkg”, it is up to date and on the PYTHONPATH.
    CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
    execute_process(/home/wgb/anaconda2/bin/python
    “/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py”
    “/opt/ros/kinetic/share/catkin/cmake/…/package.xml”
    “/home/wgb/catkin_ws/build/catkin/catkin_generated/version/package.cmake”)
    returned error code 1
    Call Stack (most recent call first):
    /opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:63 (safe_execute_process)
    /opt/ros/kinetic/share/catkin/cmake/all.cmake:151 (_catkin_package_xml)
    /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
    CMakeLists.txt:52 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/wgb/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/wgb/catkin_ws/build/CMakeFiles/CMakeError.log”.
Invoking “cmake” failed
解决办法
检查一下Python的版本: wgb@wgb:~$ python -V
检查一下catkin依赖的Python版本: wgb@wgb:~$ dpkg -L python-catkin-pkg
如果Python的版本和catkin依赖的版本不一样,说明Python依赖包有问题,解决办法:
conda install setuptools

pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools

4 No module named em 的问题
ImportError: No module named em
gazebo_ros_pkgs/gazebo_msgs/CMakeFiles/gazebo_msgs_generate_messages_cpp.dir/build.make:117: recipe for target ‘/home/wgb/catkin_ws/devel/include/gazebo_msgs/ContactState.h’ failed
make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/ContactState.h] Error 1
Traceback (most recent call last):
File “/opt/ros/kinetic/share/gencpp/cmake/…/…/…/lib/gencpp/gen_cpp.py”, line 41, in
import genmsg.template_tools
File “/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py”, line 39, in
import em
ImportError: No module named em
gazebo_ros_pkgs/gazebo_msgs/CMakeFiles/gazebo_msgs_generate_messages_cpp.dir/build.make:139: recipe for target ‘/home/wgb/catkin_ws/devel/include/gazebo_msgs/LinkStates.h’ failed
make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/LinkStates.h] Error 1
Traceback (most recent call last):
File “/opt/ros/kinetic/share/gencpp/cmake/…/…/…/lib/gencpp/gen_cpp.py”, line 41, in
import genmsg.template_tools
File “/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py”, line 39, in
import em
ImportError: No module named em
Traceback (most recent call last):
File “/opt/ros/kinetic/share/gencpp/cmake/…/…/…/lib/gencpp/gen_cpp.py”, line 41, in
import genmsg.template_tools
File “/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py”, line 39, in
import em
ImportError: No module named em
gazebo_ros_pkgs/gazebo_msgs/CMakeFiles/gazebo_msgs_generate_messages_cpp.dir/build.make:128: recipe for target ‘/home/wgb/catkin_ws/devel/include/gazebo_msgs/LinkState.h’ failed
make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/LinkState.h] Error 1
gazebo_ros_pkgs/gazebo_msgs/CMakeFiles/gazebo_msgs_generate_messages_cpp.dir/build.make:161: recipe for target ‘/home/wgb/catkin_ws/devel/include/gazebo_msgs/ModelStates.h’ failed
make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/ModelStates.h] Error 1
Traceback (most recent call last):
File “/opt/ros/kinetic/share/gencpp/cmake/…/…/…/lib/gencpp/gen_cpp.py”, line 41, in
import genmsg.template_tools
File “/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py”, line 39, in
import em
ImportError: No module named em
gazebo_ros_pkgs/gazebo_msgs/CMakeFiles/gazebo_msgs_generate_messages_cpp.dir/build.make:174: recipe for target ‘/home/wgb/catkin_ws/devel/include/gazebo_msgs/WorldState.h’ failed
make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/WorldState.h] Error 1
CMakeFiles/Makefile2:1511: recipe for target ‘gazebo_ros_pkgs/gazebo_msgs/CMakeFiles/gazebo_msgs_generate_messages_cpp.dir/all’ failed
make[1]: *** [gazebo_ros_pkgs/gazebo_msgs/CMakeFiles/gazebo_msgs_generate_messages_cpp.dir/all] Error 2
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2
Invoking “make -j12 -l12” failed
解决办法:
wgb@wgb:~/catkin_ws$ pip install empy

  1. defusedxml.xmlrpc
    Traceback (most recent call last):
    File “/opt/ros/kinetic/lib/xacro/xacro”, line 32, in
    import xacro
    File “/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/init.py”, line 42, in
    from roslaunch import substitution_args
    File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/init.py”, line 56, in
    from .launch import ROSLaunchRunner
    File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py”, line 55, in
    from roslaunch.nodeprocess import create_master_process, create_node_process
    File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py”, line 52, in
    from rosmaster.master_api import NUM_WORKERS
    File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/init.py”, line 35, in
    from .main import rosmaster_main
    File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/main.py”, line 43, in
    import rosmaster.master
    File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master.py”, line 47, in
    import rosmaster.master_api
    File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master_api.py”, line 72, in
    from rosmaster.util import xmlrpcapi
    File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/util.py”, line 48, in
    from defusedxml.xmlrpc import monkey_patch
    ImportError: No module named defusedxml.xmlrpc
    while processing /home/wgb/catkin_ws/src/aubo_robot/aubo_description/launch/aubo_i5_upload.launch:
    Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/lib/xacro/xacro --inorder ‘/home/wgb/catkin_ws/src/aubo_robot/aubo_description/urdf/aubo_i5_robot.urdf.xacro’] returned with code [1].

Param xml is
The traceback for the exception was written to the log file
solving method
wgb@wgb:~$ conda install -c conda-forge defusedxml

6
wgb@wgb:~$ roslaunch aubo_driver aubo_i5_bringup.launch robot_ip:=192.168.1.34
[aubo_i5_bringup.launch] is neither a launch file in package [aubo_driver] nor is [aubo_driver] a launch file name
The traceback for the exception was written to the log file

solving mehtod
Without any further information or poitners to the source of that package it is hard to tell what is going on. Does the file tb_tables.launch actually exist? Did you source the setup.bash file?

What does rospack find tb_tables output?

If that gives an error, try executing source /home/gabriel/catkin_ws/devel/setup.bash and then try the roslaunch again.

解决办法:
source /home/wgb/catkin_ws/devel/setup.bash

– Found gtest sources under ‘/usr/src/gtest’: gtests will be built
– Using Python nosetests: /usr/bin/nosetests-2.7
CMake Error at /opt/ros/kinetic/share/catkin/cmake/assert.cmake:17 (message):

Assertion failed: check for file existence, but filename
(RT_LIBRARY-NOTFOUND) unset. Message: RT Library

Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake:42 (assert_file_exists)
/opt/ros/kinetic/share/catkin/cmake/all.cmake:147 (include)
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:52 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/wgb/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/wgb/catkin_ws/build/CMakeFiles/CMakeError.log”.
Invoking “cmake” failed
solving
ubuntu 文件夹/usr/lib/x86_64-linux-gnu/ shangmian you ge cha, xiang fa chuqu

  1. /home/wgb/catkin_ws/build/gazebo_ros_pkgs/gazebo_plugins/setup_custom_pythonpath.sh: 4: exec: /home/wgb/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/cfg/CameraSynchronizer.cfg: Permission denied

/home/wgb/catkin_ws/build/gazebo_ros_pkgs/gazebo_plugins/setup_custom_pythonpath.sh: 4: exec: /home/wgb/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/cfg/CameraSynchronizer.cfg: Permission denied
gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_plugins_gencfg.dir/build.make:69: recipe for target ‘/home/wgb/catkin_ws/devel/include/gazebo_plugins/CameraSynchronizerConfig.h’ failed
make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_plugins/CameraSynchronizerConfig.h] Error 126
CMakeFiles/Makefile2:6310: recipe for target ‘gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_plugins_gencfg.dir/all’ failed
make[1]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_plugins_gencfg.dir/all] Error 2
make[1]: *** 正在等待未完成的任务…
[ 86%] Linking CXX shared library /home/wgb/catkin_ws/devel/lib/libgazebo_ros_joint_trajectory.so
[ 86%] Built target gazebo_ros_joint_trajectory
[ 86%] Linking CXX shared library /home/wgb/catkin_ws/devel/lib/libgazebo_ros_joint_state_publisher.so
[ 86%] Linking CXX shared library /home/wgb/catkin_ws/devel/lib/libgazebo_ros_api_plugin.so
[ 86%] Built target gazebo_ros_joint_state_publisher
[ 86%] Built target gazebo_ros_api_plugin
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2
Invoking “make -j4 -l4” failed
解决办法:

wgb@wgb:~/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/cfg$ cd /home/wgb/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/cfg
wgb@wgb:~/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/cfg$ chmod +x CameraSynchronizer.cfg
或者

wgb@wgb:~/catkin_ws/src$ sudo chown -R wgb /home/wgb/catkin_ws/
[sudo] wgb 的密码:
wgb@wgb:~/catkin_ws/src$ sudo chmod -R +x /home/wgb/catkin_ws/
参考:

https://answers.ros.org/question/206860/error-when-calling-catkin_make-invoking-make-failed/

  1. “moveit_ros_planning”

    moveit_ros_planningConfig.cmake
    moveit_ros_planning-config.cmake

问题

CMake Warning at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by
“moveit_ros_planning” with any of the following names:

moveit_ros_planningConfig.cmake
moveit_ros_planning-config.cmake

Add the installation prefix of “moveit_ros_planning” to CMAKE_PREFIX_PATH
or set “moveit_ros_planning_DIR” to a directory containing one of the above
files. If “moveit_ros_planning” provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
aubo_robot-indigo-devel/aubo_trajectory_filters/CMakeLists.txt:5 (find_package)

– Could not find the required component ‘moveit_ros_planning’. 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/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
“moveit_ros_planning” with any of the following names:

moveit_ros_planningConfig.cmake
moveit_ros_planning-config.cmake

Add the installation prefix of “moveit_ros_planning” to CMAKE_PREFIX_PATH
or set “moveit_ros_planning_DIR” to a directory containing one of the above
files. If “moveit_ros_planning” provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
aubo_robot-indigo-devel/aubo_trajectory_filters/CMakeLists.txt:5 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/sensetime/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/sensetime/catkin_ws/build/CMakeFiles/CMakeError.log”.
make: *** [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed

解决办法: 安装moveit,安装方法参考http://moveit.ros.org/install/

对于indigo

sudo apt-get install ros-indigo-moveit
sudo apt-get install ros-indigo-moveit-full-pr2
source /opt/ros/indigo/setup.bash

对于kinetic
sudo apt-get install ros-kinetic-moveit
source /opt/ros/kinetic/setup.bash

问题
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

Add the installation prefix of “manipulation_msgs” to CMAKE_PREFIX_PATH or
set “manipulation_msgs_DIR” to a directory containing one of the above
files. If “manipulation_msgs” provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
marm_planning/CMakeLists.txt:10 (find_package)

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

这是由于少了manipulation_msgs这个包
我们在这里安装这个包就好了
在终端中输入 sudo apt-get install ros-kinetic-manipulation-msgs

  • 3
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
catkin是一个为ROS(机器人操作系统)设计定制的编译系统。catkin系统的目的是为了使开发人员更高效地构建ROS包,解决ROS中依赖项管理、构建文件管理、可重用二进制文件等问题catkin_makecatkin的一个命令行工具,用于编译和构建ROS包。 catkin主要有三个概念:包、工作区和catkin。包是ROS中的基本单元,它包含必要的文件和代码来实现某些功能。工作区是一个包含多个包的目录。catkin是一组工具和代码库,用于构建和维护ROS代码库。 catkin_make是一个可用于构建catkin工作区的命令行工具。这个工具可以在ROS包的顶级目录下运行,使得它扫描工作区目录树,构建包中的可执行文件、库和测试等,方便用户管理ROS软件包之间的依赖关系。catkin_make插件还可以自动处理C++库的依赖关系,方便项目管理者在不同的项目之间共享可重用的代码,并在需要时更改依赖库的版本。 在使用catkin_make之前,使用catkin_init_workspace命令创建工作区目录。这个命令会在当前目录下创建一个“catkin_ws”目录,该目录是工作区的根目录。使用catkin_create_pkg命令在这个目录中创建一个ROS包,该命令会自动创建catkin包的基本文件结构。在包中添加源文件、配置文件、启动文件等后,修改CMakeLists.txt文件来配置包的编译选项,包括编译类型、编译输出路径、编译源文件所需的库等。 总之,catkin是ROS中的编译系统,catkin_makecatkin工具集的一部分,可以用来编译ROS软件包。catkin提供了一些工具和代码库,用于构建和维护ROS代码库,并使得能够轻松地管理ROS软件包之间的依赖关系。在使用catkin_make之前,需要创建ROS工作区,并使用catkin_create_pkg命令创建ROS包,然后对包的CMakeLists.txt文件进行配置,使用catkin_make进行编译和构建。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值