ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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.
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, roslib.rospack modulefind the directory for you. rospack find FOO
) will get it Note that you'll need to get all of your environment variables right; see python's subprocess, particularly the "shell" parameter.