Ask Your Question
1

How to find out if Rosmaster is running yet?

asked 2013-06-21 05:05:27 -0600

Toletum gravatar image

updated 2013-06-21 05:11:54 -0600

I am trying to debug a node that is supposed to publish a "shutdown message" to a topic. Since I am running rostests on my nodes, this message is supposed to get published fairly early after I launch my nodes.

Unfortunately, sometimes the message-sending happens and sometimes it doesn't. I am even using the "latch" option on my publisher (so that a subscriber can still receive a message that was sent before the subscriber started).

My current suspicion is that the Rosmaster sometimes doesn't have time to initialize. I've been hunting around for a way to check on the Master's status, but I can't seem to find it. Is there a way to make sure the Rosmaster is running?

(as an addendum: I'm not looking for a terminal command. I'm looking for some kind of code that would let my node know that rosmaster is reachable.)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-06-21 06:15:41 -0600

130s gravatar image

updated 2013-07-14 22:12:33 -0600

In python there's a way. See this thread.

edit flag offensive delete link more

Comments

If the master did not start running, would the other nodes actually start? (I get a socket error when I try)..

SL Remy gravatar imageSL Remy ( 2013-07-15 03:37:06 -0600 )edit

@trinighost I think a node tries to connect Master upon booting, and fails if Master not running with specified URI. That's probably the error you're seeing.

130s gravatar image130s ( 2013-07-15 13:27:50 -0600 )edit

@trinighost and be sure not to ask new questions in comment area ;)

130s gravatar image130s ( 2013-07-15 13:28:23 -0600 )edit
1

I was trying to clarify that this was a solution to the same problem.. because I wasn't clear on how the OP was able to avoid the error that I saw. I promise that I wasn't trying to ask a new question :)

SL Remy gravatar imageSL Remy ( 2013-07-16 06:47:48 -0600 )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: 2013-06-21 05:05:27 -0600

Seen: 835 times

Last updated: Jul 14 '13