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

Revision history [back]

As of now the internal roslaunch python API is unstable, but that doesn't mean you can't use it, it just means that there's no guarantee your code is going to continue to work.

Stu Glaser wrote a simple qt-based roslaunch frontend which can be found here: https://kforge.ros.org/rxlaunch/hg/file/9456528dd14c/rxlaunch.py and this gives a simple example of how to do what roslaunch does via Python. (it also has some code taken from roslaunch itself)

If you want to start a node from Python, and want to be able to expect that it will continue to work, you could call out to rosrun with the Python subprocess module

Also, "rosrun" is just a bash script.