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

Revision history [back]

click to hide/show revision 1
initial version

If the python code was written by you and is part of one of your own ROS package then sourcing the ros workspace's devel/setup.bash will make all the python libraries available for import just like virtualenv does. These links should give enough info to set up a ros package to do so.

http://docs.ros.org/jade/api/catkin/html/howto/format2/installing_python.html

https://github.com/ros-infrastructure/rep/blob/master/rep-0008.rst

AFAIK there isn't any special configuration needed to use a virtualenv when developing Python nodes. I sourced devel/setup.bash in my ros workspace first, then sourced bin/activate in a virtualenv and found I was able to import modules from both the ros packages and the libraries installed in just the virtualenv.