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

Minolo minolo3ds at gmail.com
Tue Feb 8 01:54:51 UTC 2011


Hello there!

I don't know if I'm in time to help, but I'll still try!

The only way of doing it that comes to mind right now is using the system
call from C (I guess there must be a similar function in python too, sorry
I'm not much of a python guy as of now :p)

So I think you can do what you say with something like:

if(condition)
   system("rosrun package node");

Then the node itself should do the work it has to do, then finish. From your
message I don't know if what you want is that the program that ran the
system call should also be the one that kills that new node.

As for a particular ROS function that runs a node itself, I've been looking
for one too but I can't seem to find it. If there's one I would very much
like to hear from it :D

Hope to have helped you. Cheers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110208/2161afc2/attachment-0003.html>


More information about the ros-users mailing list