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

How to monitor all nodes works well ?

asked 2017-04-19 02:29:51 -0600

Tomas yuan gravatar image

There are some nodes work together ,I want to monitor all nodes . Avoid one or some of these nodes are broken or died,how to write a script or something to reach this goal ? Does ros have any mechanisms or solutions?

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2017-04-19 05:18:18 -0600

Then you need to use a bond, which allows processes, to know when the others have terminated, either cleanly or by crashing.

the official doc is here:

edit flag offensive delete link more


Thank you,I will have a try

Tomas yuan gravatar image Tomas yuan  ( 2017-04-19 08:24:24 -0600 )edit

answered 2017-04-19 18:09:51 -0600

Geoff gravatar image

If your nodes themselves do not need to know about the status of other nodes, but you just want to make sure that if one node dies then the whole system stops, then roslaunch will do what you want. For each node in your launch file, set the required attribute (see ) to true. Then, if any of your nodes die, roslaunch will kill all the others and stop your system.

edit flag offensive delete link more

answered 2017-04-20 01:44:16 -0600

Not sure if this is exactly what you are after but you could try using a watchdog (

edit flag offensive delete link more

Question Tools


Asked: 2017-04-19 02:29:51 -0600

Seen: 1,491 times

Last updated: Apr 20 '17