ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to run multiple nodes in sequence?

asked 2022-08-16 16:50:51 -0500

JasonJo gravatar image

Hi all, I have one CPP node and one python node, so I want to run cpp one first and the python one the next. How to combine together? I want to run the first node and run the next node after the first one is done.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-08-16 17:28:52 -0500

ljaniec gravatar image

updated 2022-08-16 17:29:22 -0500

Overall, roslaunch won't provide it to you:

roslaunch does not provide any guarantees about what order nodes start in. This is intentional: there is no way to externally know when a node is fully initialized, so all code that is launched must be robust to launching in any order.

It highlights the correct approach to the implementation of robust code, that is easy to reuse later.

There are still some workarounds to it, mentioned in these questions:

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2022-08-16 16:50:51 -0500

Seen: 51 times

Last updated: Aug 16 '22