0
$\begingroup$

Rosanswers logo

The subject looks weird and difficult to understand so I am going to explain what I mean here. I want to know if it is possible to run a node inside another node. For example, when you have written a ROS node A and what you want A to do is to run other several ROS nodes B, C, D and etc. How to implement that? I don't want to use roslaunch to run several nodes in this case because after node A has run other nodes, it also has to do other stuff.

To go further, I want to write a ROS server and what it is supposed to do is waiting for "node request", that is , when a client calls this service, the server tries to run a node instantaneously. That is to say, how to run nodes in a service server? I think this case is essentially the same as the former one.

Any suggestions are appreciated very much.


Originally posted by Winston on ROS Answers with karma: 180 on 2015-11-04

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

How about using nodelets? You can load multiple nodelets in a node at runtime and each nodelet runs in it's own thread.

http://wiki.ros.org/nodelet


Originally posted by Dimitri Schachmann with karma: 789 on 2015-11-10

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Winston on 2017-04-21:
Thank you. Could you provide with me some sample codes?

$\endgroup$

Your Answer

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