ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I would do what @NEngelhard suggests, but just to answer your question: you need to run your Python script in an environment that has been setup with the ROS environment variables.
Two ways to do that:
source
d the right setup.bash
os.system(..)
with the needed environment variablesIf you do want to continue starting ROS command line utilities, I'd recommend you use subprocess
or popen
instead of os.system(..)
.