ROS安装问题

ROS安装问题

上述指令执行完毕之后, ROS也就安装完成了。 当然, 紧接着还需要建立自己的工作空间。 执行下述代码:

[python]  view plain  copy
  1. mkdir -p ~/catkin_ws/src    
  2. cd ~/catkin_ws/src    
  3. catkin_init_workspace    
  4. cd ..    
  5. catkin_make    


roslaunch aubo_driver aubo_i5_bringup.launch robot_ip:=192.168.1.34

1.  关于"hardware_interface"

[python]  view plain  copy
  1. CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):  
  2.   Could not find a package configuration file provided by  
  3.   "hardware_interface" with any of the following names:  
  4.   
  5.     hardware_interfaceConfig.cmake  
  6.     hardware_interface-config.cmake  
  7.   
  8.   Add the installation prefix of "hardware_interface" to CMAKE_PREFIX_PATH or  
  9.   set "hardware_interface_DIR" to a directory containing one of the above  
  10.   files.  If "hardware_interface" provides a separate development package or  
  11.   SDK, be sure it has been installed.  
  12. Call Stack (most recent call first):  
  13.   aubo_robot/aubo_new_driver/CMakeLists.txt:9 (find_package)  
  14.   
  15.   
  16. -- 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.  
  17. CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):  
  18.   Could not find a package configuration file provided by  
  19.   "hardware_interface" with any of the following names:  
  20.   
  21.     hardware_interfaceConfig.cmake  
  22.     hardware_interface-config.cmake  
  23.   
  24.   Add the installation prefix of "hardware_interface" to CMAKE_PREFIX_PATH or  
  25.   set "hardware_interface_DIR" to a directory containing one of the above  
  26.   files.  If "hardware_interface" provides a separate development package or  
  27.   SDK, be sure it has been installed.  
  28. Call Stack (most recent call first):  
  29.   aubo_robot/aubo_new_driver/CMakeLists.txt:9 (find_package)  
  30.   
  31.   
  32. -- Configuring incomplete, errors occurred!  
  33. See also "/home/wgb/catkin_ws/build/CMakeFiles/CMakeOutput.log".  
  34. See also "/home/wgb/catkin_ws/build/CMakeFiles/CMakeError.log".  
  35. Makefile:1858: recipe for target 'cmake_check_build_system' failed  
  36. make: *** [cmake_check_build_system] Error 1  
  37. Invoking "make cmake_check_build_system" failed  

解决办法

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

2. 关于controller_manager

[python]  view plain  copy
  1. CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):  
  2.   Could not find a package configuration file provided by  
  3.   "controller_manager" with any of the following names:  
  4.   
  5.     controller_managerConfig.cmake  
  6.     controller_manager-config.cmake  
  7.   
  8.   Add the installation prefix of "controller_manager" to CMAKE_PREFIX_PATH or  
  9.   set "controller_manager_DIR" to a directory containing one of the above  
  10.   files.  If "controller_manager" provides a separate development package or  
  11.   SDK, be sure it has been installed.  
  12. Call Stack (most recent call first):  
  13.   aubo_robot/aubo_new_driver/CMakeLists.txt:9 (find_package)  
  14.   
  15.   
  16. -- Configuring incomplete, errors occurred!  
  17. See also "/home/wgb/catkin_ws/build/CMakeFiles/CMakeOutput.log".  
  18. See also "/home/wgb/catkin_ws/build/CMakeFiles/CMakeError.log".  
  19. Makefile:1858: recipe for target 'cmake_check_build_system' failed  
  20. make: *** [cmake_check_build_system] Error 1  
  21. Invoking "make cmake_check_build_system" failed  
解决办法 sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers 3. 与Python兼容问题 (No module catkin_dkg.package )
[python]  view plain  copy
  1. -- Using Python nosetests: /usr/bin/nosetests-2.7  
  2. ImportError: "from catkin_pkg.package import parse_package" failed: No module named catkin_pkg.package  
  3. Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.  
  4. CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):  
  5.   execute_process(/home/wgb/anaconda2/bin/python  
  6.   "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"  
  7.   "/opt/ros/kinetic/share/catkin/cmake/../package.xml"  
  8.   "/home/wgb/catkin_ws/build/catkin/catkin_generated/version/package.cmake")  
  9.   returned error code 1  
  10. Call Stack (most recent call first):  
  11.   /opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:63 (safe_execute_process)  
  12.   /opt/ros/kinetic/share/catkin/cmake/all.cmake:151 (_catkin_package_xml)  
  13.   /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)  
  14.   CMakeLists.txt:52 (find_package)  
  15.   
  16.   
  17. -- Configuring incomplete, errors occurred!  
  18. See also "/home/wgb/catkin_ws/build/CMakeFiles/CMakeOutput.log".  
  19. See also "/home/wgb/catkin_ws/build/CMakeFiles/CMakeError.log".  
  20. Invoking "cmake" failed  
解决办法 检查一下Python的版本: wgb@wgb:~$ python -V 检查一下catkin依赖的Python版本: wgb@wgb:~$ dpkg -L python-catkin-pkg 如果Python的版本和catkin依赖的版本不一样,说明Python依赖包有问题,解决办法:
[python]  view plain  copy
  1. conda install setuptools  
  2.   
  3. pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools  
4 No module named em 的问题
[python]  view plain  copy
  1. ImportError: No module named em  
  2. 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  
  3. make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/ContactState.h] Error 1  
  4. Traceback (most recent call last):  
  5.   File "/opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py", line 41in   
  6.     import genmsg.template_tools  
  7.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py", line 39in   
  8.     import em  
  9. ImportError: No module named em  
  10. 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  
  11. make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/LinkStates.h] Error 1  
  12. Traceback (most recent call last):  
  13.   File "/opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py", line 41in   
  14.     import genmsg.template_tools  
  15.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py", line 39in   
  16.     import em  
  17. ImportError: No module named em  
  18. Traceback (most recent call last):  
  19.   File "/opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py", line 41in   
  20.     import genmsg.template_tools  
  21.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py", line 39in   
  22.     import em  
  23. ImportError: No module named em  
  24. 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  
  25. make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/LinkState.h] Error 1  
  26. 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  
  27. make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/ModelStates.h] Error 1  
  28. Traceback (most recent call last):  
  29.   File "/opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py", line 41in   
  30.     import genmsg.template_tools  
  31.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py", line 39in   
  32.     import em  
  33. ImportError: No module named em  
  34. 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  
  35. make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_msgs/WorldState.h] Error 1  
  36. CMakeFiles/Makefile2:1511: recipe for target 'gazebo_ros_pkgs/gazebo_msgs/CMakeFiles/gazebo_msgs_generate_messages_cpp.dir/all' failed  
  37. make[1]: *** [gazebo_ros_pkgs/gazebo_msgs/CMakeFiles/gazebo_msgs_generate_messages_cpp.dir/all] Error 2  
  38. Makefile:138: recipe for target 'all' failed  
  39. make: *** [all] Error 2  
  40. Invoking "make -j12 -l12" failed  
解决办法: wgb@wgb:~/catkin_ws$ pip install empy 5. defusedxml.xmlrpc
[python]  view plain  copy
  1. Traceback (most recent call last):  
  2.   File "/opt/ros/kinetic/lib/xacro/xacro", line 32in   
  3.     import xacro  
  4.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/__init__.py", line 42in   
  5.     from roslaunch import substitution_args  
  6.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 56in   
  7.     from .launch import ROSLaunchRunner  
  8.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 55in   
  9.     from roslaunch.nodeprocess import create_master_process, create_node_process  
  10.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py", line 52in   
  11.     from rosmaster.master_api import NUM_WORKERS  
  12.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/__init__.py", line 35in   
  13.     from .main import rosmaster_main  
  14.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/main.py", line 43in   
  15.     import rosmaster.master  
  16.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master.py", line 47in   
  17.     import rosmaster.master_api  
  18.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master_api.py", line 72in   
  19.     from rosmaster.util import xmlrpcapi  
  20.   File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/util.py", line 48in   
  21.     from defusedxml.xmlrpc import monkey_patch  
  22. ImportError: No module named defusedxml.xmlrpc  
  23. while processing /home/wgb/catkin_ws/src/aubo_robot/aubo_description/launch/aubo_i5_upload.launch:  
  24. 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].   
  25.   
  26. Param xml is "$(find xacro)/xacro --inorder '$(find aubo_description)/urdf/aubo_i5_robot.urdf.xacro'" name="robot_description"/>  
  27. The traceback for the exception was written to the log file  
solving method wgb@wgb:~$ conda install -c conda-forge defusedxml 6
[python]  view plain  copy
  1. wgb@wgb:~$ roslaunch aubo_driver aubo_i5_bringup.launch robot_ip:=192.168.1.34  
  2. [aubo_i5_bringup.launch] is neither a launch file in package [aubo_driver] nor is [aubo_driver] a launch file name  
  3. The traceback for the exception was written to the log file  
solving mehtod
[python]  view plain  copy
  1. 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?  
  2.   
  3. What does rospack find tb_tables output?  
  4.   
  5. 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

7.

[python]  view plain  copy
  1. -- Found gtest sources under '/usr/src/gtest': gtests will be built  
  2. -- Using Python nosetests: /usr/bin/nosetests-2.7  
  3. CMake Error at /opt/ros/kinetic/share/catkin/cmake/assert.cmake:17 (message):  
  4.     
  5.   
  6.   Assertion failed: check for file existence, but filename  
  7.   (RT_LIBRARY-NOTFOUND) unset.  Message: RT Library  
  8.   
  9. Call Stack (most recent call first):  
  10.   /opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake:42 (assert_file_exists)  
  11.   /opt/ros/kinetic/share/catkin/cmake/all.cmake:147 (include)  
  12.   /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)  
  13.   CMakeLists.txt:52 (find_package)  
  14.   
  15.   
  16. -- Configuring incomplete, errors occurred!  
  17. See also "/home/wgb/catkin_ws/build/CMakeFiles/CMakeOutput.log".  
  18. See also "/home/wgb/catkin_ws/build/CMakeFiles/CMakeError.log".  
  19. Invoking "cmake" failed  
solving

ubuntu 文件夹/usr/lib/x86_64-linux-gnu/  shangmian you ge cha, xiang fa chuqu

8. /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

[python]  view plain  copy
  1. /home/wgb/catkin_ws/build/gazebo_ros_pkgs/gazebo_plugins/setup_custom_pythonpath.sh: 4exec: /home/wgb/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/cfg/CameraSynchronizer.cfg: Permission denied  
  2. 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  
  3. make[2]: *** [/home/wgb/catkin_ws/devel/include/gazebo_plugins/CameraSynchronizerConfig.h] Error 126  
  4. CMakeFiles/Makefile2:6310: recipe for target 'gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_plugins_gencfg.dir/all' failed  
  5. make[1]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_plugins_gencfg.dir/all] Error 2  
  6. make[1]: *** 正在等待未完成的任务....  
  7. 86%] Linking CXX shared library /home/wgb/catkin_ws/devel/lib/libgazebo_ros_joint_trajectory.so  
  8. 86%] Built target gazebo_ros_joint_trajectory  
  9. 86%] Linking CXX shared library /home/wgb/catkin_ws/devel/lib/libgazebo_ros_joint_state_publisher.so  
  10. 86%] Linking CXX shared library /home/wgb/catkin_ws/devel/lib/libgazebo_ros_api_plugin.so  
  11. 86%] Built target gazebo_ros_joint_state_publisher  
  12. 86%] Built target gazebo_ros_api_plugin  
  13. Makefile:138: recipe for target 'all' failed  
  14. make: *** [all] Error 2  
  15. Invoking "make -j4 -l4" failed  

解决办法:

[python]  view plain  copy
  1. wgb@wgb:~/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/cfg$ cd /home/wgb/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/cfg  
  2. wgb@wgb:~/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/cfg$ chmod +x CameraSynchronizer.cfg  

或者

[python]  view plain  copy
  1. wgb@wgb:~/catkin_ws/src$ sudo chown -R wgb /home/wgb/catkin_ws/  
  2. [sudo] wgb 的密码:   
  3. 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/

9. "moveit_ros_planning"

    moveit_ros_planningConfig.cmake
    moveit_ros_planning-config.cmake

问题

[python]  view plain  copy
  1. CMake Warning at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package):  
  2.   Could not find a package configuration file provided by  
  3.   "moveit_ros_planning" with any of the following names:  
  4.   
  5.     moveit_ros_planningConfig.cmake  
  6.     moveit_ros_planning-config.cmake  
  7.   
  8.   Add the installation prefix of "moveit_ros_planning" to CMAKE_PREFIX_PATH  
  9.   or set "moveit_ros_planning_DIR" to a directory containing one of the above  
  10.   files.  If "moveit_ros_planning" provides a separate development package or  
  11.   SDK, be sure it has been installed.  
  12. Call Stack (most recent call first):  
  13.   aubo_robot-indigo-devel/aubo_trajectory_filters/CMakeLists.txt:5 (find_package)  
  14.   
  15.   
  16. -- 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.  
  17. CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):  
  18.   Could not find a package configuration file provided by  
  19.   "moveit_ros_planning" with any of the following names:  
  20.   
  21.     moveit_ros_planningConfig.cmake  
  22.     moveit_ros_planning-config.cmake  
  23.   
  24.   Add the installation prefix of "moveit_ros_planning" to CMAKE_PREFIX_PATH  
  25.   or set "moveit_ros_planning_DIR" to a directory containing one of the above  
  26.   files.  If "moveit_ros_planning" provides a separate development package or  
  27.   SDK, be sure it has been installed.  
  28. Call Stack (most recent call first):  
  29.   aubo_robot-indigo-devel/aubo_trajectory_filters/CMakeLists.txt:5 (find_package)  
  30.   
  31.   
  32. -- Configuring incomplete, errors occurred!  
  33. See also "/home/sensetime/catkin_ws/build/CMakeFiles/CMakeOutput.log".  
  34. See also "/home/sensetime/catkin_ws/build/CMakeFiles/CMakeError.log".  
  35. make: *** [cmake_check_build_system] Error 1  
  36. 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
  1. source /opt/ros/indigo/setup.bash
  2. 对于kinetic
sudo apt-get install ros-kinetic-moveit
source /opt/ros/kinetic/setup.bash

你可能感兴趣的:(ROS)