[ros-users] how to run a node from another node?

Tim Niemueller niemueller at kbsg.rwth-aachen.de
Wed Feb 16 17:30:09 UTC 2011


On 06.02.2011 21:41, safdar_zaman wrote:
> 
> Hi all,
> How can one run a node from inside another node's code. I mean I want to run
> a node when a specific condition is true, and then shutdown it. normally we
> run a node from terminal using "rosrun pakg node" but how to run this node
> in c/python code?
> thanks in advance.

You might want to have a look at http://www.ros.org/wiki/rosspawn. It
might just do what you need, i.e. start and stop a node, without setting
parameters from a launch file. Code is at
https://github.com/timn/rosspawn and patches to improve its
functionality are welcome.

	Tim

-- 
KBSG - Knowledge-Based Systems Group            AllemaniACs RoboCup Team
========================================================================
http://robocup.rwth-aachen.de                     RWTH Aachen University
http://kbsg.rwth-aachen.de                               Ahornstrasse 55
http://www.fawkesrobotics.org                             D-52056 Aachen



More information about the ros-users mailing list