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

Revision history [back]

The Best Way To Do This (tm) is probably to use a rosparam to set the path to the file, and then load it that way.

If you really just want the path to the file, a proper call to rospack (say, rospack find FOO) will get it for you. Note that you'll need to get all of your environment variables right; see python's subprocess, particularly the "shell" parameter.

click to hide/show revision 2
use roslib.rospack

The Best Way To Do This (tm) is probably to use a rosparam to set the path to the file, and then load it that way.

If you really just want the path to the file, a proper call to rospack (say, rospack find FOO) will get it roslib.rospack modulefind the directory for you. Note that you'll need to get all of your environment variables right; see python's subprocess, particularly the "shell" parameter.