Hi all,
I recently migrated to Fuerte and upon building a ros package that used to build in Electric, it throws the following error in Fuerte:
[rosbuild] Building package mapping.sa
[rosbuild] Error from syntax check of mapping.sa/manifest.xml
Traceback (most recent call last):
File "", line 1, in
File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/__init__.py", line 50, in
from roslib.launcher import load_manifest
File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in
import rospkg
ImportError: No module named rospkg
CMake Error at /opt/ros/fuerte/share/ros/core/rosbuild/private.cmake:78 (message):
[rosbuild] Syntax check of mapping.sa/manifest.xml failed; aborting
Call Stack (most recent call first):
/opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:174 (_rosbuild_check_manifest)
subarchitectures/mapping.sa/CMakeLists.txt:56 (rosbuild_init)
So the main problem is that rospkg is not found. This seems similar to these questions:
1. [Import Error](http://answers.ros.org/question/39657/importerror-no-module-named-rospkg/)
2. [Import Error 2](http://answers.ros.org/question/44356/importerror-no-module-named-rospkg/)
The solution there is to install rospkg. I already have it installed.
shanker@lt-pool-213:~$ sudo apt-get install python-rospkg
[sudo] password for shanker:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-rospkg is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I check my PYTHONPATH and it shows:
shanker@lt-pool-213:~$ echo $PYTHONPATH
/opt/ros/fuerte/share/ros/core/roslib/src:/opt/ros/fuerte/lib/python2.7/dist-packages:/opt/ros/fuerte/lib/python2.7/dist-packages:
1. The path '/opt/ros/fuerte/share/ros/core/roslib/src' doesn't even exist. roslib exists at : '/opt/ros/fuerte/share/roslib'. But there isn't an src folder there. So I'm not sure if that is the problem.
2. Alternatively, the problem is probably at /opt/ros/fuerte/lib/python2.7/dist-packages . That directory does not have the file rospkg. It has files roslib, rospy, rosnode, rosmsg etc., but not rospkg. Could that be the problem?
Update: Sep 28, 2012: According to Lorenz's suggestion, I have found that rospkg is in /usr/lib/pymodules/python2.7 . However, the problem persists.
Update: Sep 28, 2012: Upon adding '/usr/lib/pymodules/python2.7' to the pythonpath, the error does resolve. However, I am not removing this question as this is still unexpected behavior.
Thanks in advance for your help :)
Cheers
Shanker
↧