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

Is launch file asynchronous or synchronous

asked 2023-04-21 13:54:53 -0500

akumar3.1428 gravatar image

updated 2023-06-18 09:43:07 -0500

lucasw gravatar image

Hi, I would like to know is the launch file is asynchronous or synchronous ? How can I make it asynchronous or synchronous according to my need? I am using ros noetic

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-04-22 03:01:04 -0500

130s gravatar image

For ROS1, this old wiki page still gives useful hint: roslaunch tips for large projects stating:

Some of the 2d navigation nodes require that the calibration already have finished before they start. Roslaunch intentionally does not provide any control on the order or timing of node start up. The ideal solution would be to make nodes work gracefully by waiting till calibration is done, but pending that, putting things in two launch files allows us to launch the robot, wait until calibration is complete, then launch 2dnav.

(My interpretation included in the following) Idea is rooted in distributed nature ROS applied; nodes being loosely-coupled where each node should be self-contained to do its own work, without depending on external resource/file (launch file in this case) to define the order of actions to be taken. Instead, if a node needs an output from another node, it should "wait" for such an output to arrive.

For ROS2, I'm not yet super familiar but quick Google doesn't return anything changed, so I assume the principle stays the same.

edit flag offensive delete link more

Question Tools



Asked: 2023-04-21 13:54:53 -0500

Seen: 141 times

Last updated: Apr 22 '23