ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ImportError: No module named rospkg

asked 2017-06-08 11:17:38 -0600

Yuki gravatar image

updated 2018-02-17 03:15:16 -0600

130s gravatar image

I am using ROS kinetic on Ubuntu 16.04. When I typed this command, "roslaunch turtlebot_gazebo turtlebot_world.launch", the following error occurred. Please teach me how to solve it....

 ... logging to /home/yuki/.ros/log/fafca31c-4c63-11e7-a590-ac2b6eec753e/roslaunch-yuki-Inspiron-13-7368-13183.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
  File "/opt/ros/kinetic/share/xacro/xacro.py", line 55, in <module>
    import xacro
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/__init__.py", line 42, in <module>
    from roslaunch import substitution_args
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 48, in <module>
    import rospkg
ImportError: No module named rospkg
while processing /opt/ros/kinetic/share/turtlebot_gazebo/launch/includes/kobuki.launch.xml:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/share/xacro/xacro.py '/opt/ros/kinetic/share/turtlebot_description/robots/kobuki_hexagons_asus_xtion_pro.urdf.xacro'] returned with code [1]. 

Param xml is <param command="$(arg urdf_file)" name="robot_description"/>
The traceback for the exception was written to the log file
edit retag flag offensive close merge delete

Comments

As this is FAQ, you should be able to find many other threads that are already answered.

While the accepted answer should work around your issue, I've asked #q282982 as a more fundamental question.

130s gravatar image 130s  ( 2018-02-17 03:41:57 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-15 09:27:51 -0600

angeltop gravatar image

try to install the package

sudo apt-get install python-rospkg
edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-06-08 11:17:38 -0600

Seen: 3,292 times

Last updated: Feb 17 '18