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

Rosbridge 2.0 with raw sockets

asked 2012-09-06 09:03:55 -0500

freed gravatar image

updated 2014-01-28 17:13:35 -0500

ngrennan gravatar image

Hello everyone,

i was using the Rosbrigde ( in version 1.0 to connect to a custom robot framework (written in c++) through a raw TCP Socket (and that worked). Now i wanted to switch to version 2.0. The documentation of rosbridge 2.0 however does not state the option of using a raw tcp socket anymore.

Do you know if it is still possible to use a raw tcp socket? If so is there some kind of documentation or could you provide a simple example? When testing it with my previous setup the messages could not be received and the rosbridge gave no useful output as to what happened.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-11-04 07:02:49 -0500

odestcj gravatar image

Jon Mace and I had several discussions about whether to include raw sockets along with websockets for v2. Jon had convincing arguments to just stick with websockets for now:

  1. rosbridge v1 tried to detect when an incoming connection was a raw socket or a websocket, causing additional (unnecessary) complexity for the server. The v2 design assumes a rosbridge port can be open with either form of socket, but not both.
  2. rosbridge_library (in v2) can be wrapped to use a raw socket. The default v2 server essentially wraps around this library
  3. Jon posited that creating a raw socket version of rosbridge v2 would be "trivial". We would welcome addition of a raw socket version of the v2 server to the stack

Although this response is a bit late, I hope it is helpful.

edit flag offensive delete link more


We would like to use rosbridge to remotely operate a robot over a wireless connection. Therefore UDP is desirable and I wondered if anything had ever come of this topic??? I guess I can constantly check s.send(joystickmsg) status and try to reconnect when it breaks??? rosbridge has "inactive" cli

salsalam gravatar image salsalam  ( 2016-04-01 12:03:50 -0500 )edit

rosbridge on the server ends up with lots of "inactive" clients as the clients die because the connect gets too flaky. I'm testing by pulling the network cable and then reconnecting if after various lengths of time.

salsalam gravatar image salsalam  ( 2016-04-01 12:05:06 -0500 )edit

Question Tools


Asked: 2012-09-06 09:03:55 -0500

Seen: 1,838 times

Last updated: Nov 04 '12