Ask Your Question
0

Rosserial arduino: How to check on device if in sync with host?

asked 2014-01-29 22:25:24 -0600

Wolf gravatar image

updated 2014-01-31 03:28:29 -0600

Is it possible to check on a device if it is still in sync with the the host pc which is connected via rosserial_python serial_node.py?

The problem is that the device keeps on doing what it was told to last before loosing sync. Is it possible to check on device if it is in sync or is setting up my own watch dog the strait forward solution?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-01-31 11:30:54 -0600

fergs gravatar image

You can query the NodeHandle using the "connected" function:

  if (nh.connected())
  {
     // do something here
  }

It returns a bool as to whether the connection is still active, but be aware there is a timeout before we "break" the connection.

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

2 followers

Stats

Asked: 2014-01-29 22:25:24 -0600

Seen: 735 times

Last updated: Jan 31 '14