roslaunch changes my PYTHONPATH
Hello all, I am running a python script from a callback. When I run my test code from my shell, I have my environment variables (from my bashrc), more specifically my PYTHONPATH. However, when I do a roslaunch, PYTHONPATH is only pointing to the ros python modules. Could anyone offer any suggestions? Do I need to use the <env> tags in the launch file? Is roslaunch overwriting environment variables or is it running in a different shell? Thank you
Constantin
Edit: I am getting this runtime error as well. If you notice, there is a missing symbol _Py_ZeroStruct. I have seen similar error messages and they've always been related to me not linking a library correctly. In this case it seems the python library may not be linking correctly. In my example program, I simply use:
-lpython2.6In the CMakeList.txt, I use:
target_link_libraries(ExtractionController python2.6)I have a feeling, ROS is forcing a bad link somewhere though. Has anyone experienced this? Thank you. Here is a print out of the runtime error:
Traceback (most recent call last): File "/usr/lib/python2.6/dist-packages/numpy/__init__.py", line 130, in <module> import add_newdocs File "/usr/lib/python2.6/dist-packages/numpy/add_newdocs.py", line 9, in <module> from lib import add_newdoc File "/usr/lib/python2.6/dist-packages/numpy/lib/__init__.py", line 4, in <module> from type_check import * File "/usr/lib/python2.6/dist-packages/numpy/lib/type_check.py", line 8, in <module> import numpy.core.numeric as _nx File "/usr/lib/python2.6/dist-packages/numpy/core/__init__.py", line 5, in <module> import multiarray ImportError: /usr/lib/python2.6/dist-packages/numpy/core/multiarray.so: undefined symbol: _Py_ZeroStruct Traceback (most recent call last): File "/home/constantin/workspace/OpenRAVE/src/grasp_behavior_2.py", line 3, in <module> from openravepy import * File "/home/constantin/workspace/rospackages/openrave/lib/python2.6/site-packages/openravepy/__init__.py", line 35, in <module> openravepy_currentversion = loadlatest() File "/home/constantin/workspace/rospackages/openrave/lib/python2.6/site-packages/openravepy/__init__.py", line 16, in loadlatest return _loadversion('_openravepy_') File "/home/constantin/workspace/rospackages/openrave/lib/python2.6/site-packages/openravepy/__init__.py", line 19, in _loadversion mainpackage = __import__("openravepy", globals(), locals(), [targetname]) File "/home/constantin/workspace/rospackages/openrave/lib/python2.6/site-packages/openravepy/_openravepy_/__init__.py", line 29, in <module> from openravepy_int import * ImportError: numpy.core.multiarray failed to import