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

Rosbridge - isConnected() ?

asked 2013-12-04 16:43:14 -0500

Chengarda gravatar image

Hi,

I'm working with Rosbridge at the moment, and trying to determine from the ROS side (server) whether the websocket connection is ok. Is there a isConnected() or ping() type function that will enable me to determine the connection status? I need a test that determines the current connection reliability for use with wireless/3G/4G connected ROS devices, which will frequently drop messages without disconnecting from the socket. (They stay 'sort of' connected).

I'm trying to do something like:

if (isConnected()) { - Send messages from subscribed topics - } else { - Save the messages, instead - }

I tried using a service, but it seems I'm using rosbridge a little bit backwards; since a service initiated from the web-side wouldn't help.

'My apologies in advance for being completely wrong about everything ever.'

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-12-12 15:40:43 -0500

Chengarda gravatar image

Having found no reasonable alternative, I've gone with a combination of a service and a topic to achieve this. The devices post the number of stored messages on a topic, and the web server calls a data-fetching service this number of times. It's working, but seems very heavy handed for such a simple problem.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-12-04 16:43:14 -0500

Seen: 694 times

Last updated: Dec 12 '13