ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Rosbridge - isConnected() ?

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

Chengarda gravatar image


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

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

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

Your Answer

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

Add Answer

Question Tools


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

Seen: 601 times

Last updated: Dec 12 '13