Ask Your Question
1

rospy Reaction to ROSCore Shutdown

asked 2014-03-02 10:47:54 -0500

orion gravatar image

updated 2014-03-03 05:42:04 -0500

When running a node in python (or C++), is there a way to detect the loss of ROSCore or the ROSMaster? I understand how to detect shutdown of the node itself, but need to be able to handle, in my own way, loss of ROSCore.

edit retag flag offensive close merge delete

Comments

Are you asking how to handle something like that or how to detect that this happened to be able to handle it?

dornhege gravatar imagedornhege ( 2014-03-03 04:27:26 -0500 )edit

Sorry, asking how to detect the loss.

orion gravatar imageorion ( 2014-03-03 05:42:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-03-03 06:06:52 -0500

dornhege gravatar image

In case that it's lost there is obviously nothing left to ask if it's gone. The simplest way might be to perform some xmlrpc call like getUri or similar and see if there is a reply.

The negative behavior (i.e. not reply) would be the same that a node sees that tries to interact with a non-existing master.

edit flag offensive delete link more

Comments

Thanks. That is what I expected, but I wasn't sure if there was some unknown function that I have not found. I currently have a thread that does the "getUri" call and it works.

orion gravatar imageorion ( 2014-03-08 04:59:47 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-03-02 10:47:54 -0500

Seen: 324 times

Last updated: Mar 03 '14