0
$\begingroup$

Rosanswers logo

Hi All,

I have two nodes: A and B implemented in C++. Now I want Node A to be launched (by the program, not by users' input in the terminal) within the execution of Node B that is launched by users in the terminal. Is there a ROS way to do this? Or should I just encode a shell command in B's source code to launch A, like executing a shell command in C++ programs?

Thanks,


Originally posted by HZ on ROS Answers with karma: 76 on 2011-09-09

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The usual ROS way is running them both from a roslaunch script.


Originally posted by joq with karma: 25443 on 2011-09-09

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by tfoote on 2011-09-10:
This will bring up A and B at the beginning, and then B can designed to idle until it is contacted, thus not providing significant overhead. This also has the advantage that it decreases issues like latency at startup.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.