Ask Your Question

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/", line 55, in <module>
    import xacro
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/", line 42, in <module>
    from roslaunch import substitution_args
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/", 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/ '/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


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 image130s ( 2018-02-17 03:41:57 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


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

Seen: 2,630 times

Last updated: Feb 17 '18