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

simple method to detect node crashes

asked 2015-05-30 06:23:58 -0600

Marcus gravatar image

Hey guys,

I am searching for a simple way to detect a node crash. I saw this already and the answer looks pretty simple to implement. However, the project I am working on has around 15+ nodes running at the same time and it looks like I would have to set a watchdog for each one of them.

Since the master does provide a message in the terminal whenever a node has crashed I was wondering if there is not an even more simple way to achieve my goal. Preferably even something that is only sending me a message when a node has crashed and therefore does not "clog" up the communication. Apparently (have not tested it yet) $rosnode list$ provides a list of all active nodes. I was wondering if I could periodically call this from within my .cpp-file (if I set the sampling rate low enough it should not interfere with other communication). I have seen that it is possible to do so for several other ROS commands that I usually only use in the terminal (find package path etc.).

What do you guys think?

Thanks, Marcus

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-30 07:02:16 -0600

gvdhoorn gravatar image

I think this is what the bond pkg is for.

edit flag offensive delete link more


Thank you, I will check that out right away

Marcus gravatar image Marcus  ( 2015-05-30 07:22:26 -0600 )edit

Question Tools

1 follower


Asked: 2015-05-30 06:23:58 -0600

Seen: 1,701 times

Last updated: May 30 '15