Ask Your Question
0

ImportError: No module named rospkg

asked 2016-12-24 13:47:55 -0500

Morpheus gravatar image

updated 2018-02-09 21:56:27 -0500

130s gravatar image

I am trying to run fake_turtlebot.launch. I keep getting:

Traceback (most recent call last):
  File "/opt/ros/indigo/share/xacro/xacro.py", line 60, in <module>
    import xacro
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 45, in <module>
    from roslaunch import substitution_args
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 48, in <module>
    import rospkg
ImportError: No module named rospkg
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py '/home/brent/catkin_ws/src/rbx1/rbx1_description/urdf/turtlebot.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
brent@brent-Dell-DM051:~$

I thing that my pythonpath is set wrong, but I am not sure how to fix it. Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-02-09 22:41:36 -0500

130s gravatar image
ImportError: No module named rospkg

I thing that my pythonpath is set wrong, but I am not sure how to fix it.

A bit too little info is provided so I can only assume that you don't have python-rospkg installed. It's a non-ROS, standalone pkg that gets installed under /usr/lib instead of under /opt as other ROS packages, which means Python can find it without extra PYTHONPATH (maybe a good read).

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

2 followers

Stats

Asked: 2016-12-24 13:47:55 -0500

Seen: 751 times

Last updated: Feb 09 '18