ROS执行rosrun rqt_graph报错No module named 'catkin_pkg'

环境:Ubuntu 16.04+ ROS ROS kinetic,在这里我执行命令:

rosrun rqt_graph rqt_graph

时候报错,信息如下:

raceback (most recent call last):
  File "/opt/ros/kinetic/lib/rqt_graph/rqt_graph", line 5, in <module>
    from rqt_gui.main import Main
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui/main.py", line 38, in <module>
    import rospy
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/client.py", line 52, in <module>
    import roslib
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/__init__.py", line 54, in <module>
    import roslib.stacks
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/stacks.py", line 46, in <module>
    import roslib.packages
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/packages.py", line 49, in <module>
    from catkin.find_in_workspaces import find_in_workspaces as catkin_find
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/find_in_workspaces.py", line 36, in <module>
    from catkin_pkg.packages import find_packages
ModuleNotFoundError: No module named 'catkin_pkg'

解决方法:

pip install catkin_pkg
pip install rosdep rosinstall_generator wstool rosinstall six vcstools
pip install pydot

执行完上面三条命令,最开始的报错就被解决了。

你可能感兴趣的:(ros,无人机,机器人)