Ask Your Question
1

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
2

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: http://wiki.ros.org/bond

edit flag offensive delete link more

Comments

Thank you,I will have a try

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

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 http://wiki.ros.org/roslaunch/XML/nod... ) 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
1

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 (http://wiki.ros.org/watchdog_timer).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 493 times

Last updated: Apr 20 '17