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

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

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

Wolf gravatar image

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

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

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

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

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

Question Tools



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

Seen: 1,289 times

Last updated: Jan 31 '14