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

It is possible! I am using something like the following code in my rostests to setup the node environment if necessary.

import roslaunch
package = 'PACKACKE_NAME'
executable = 'YOUR_SCRIPT.py'
node_name = 'YOUR_NODE_NAME'
node = roslaunch.core.Node(package=package, node_type=executable, name=node_name)
launch = roslaunch.scriptapi.ROSLaunch()
launch.start() 
process = launch.launch(node)