introlab / opentera-webrtc-ros

ROS package for OpenTera WebRTC signaling server.
Apache License 2.0
16 stars 9 forks source link

Evaluate the replacement of custom JSON and websockets with rosbridge and roslibjs #32

Open philippewarren opened 2 years ago

philippewarren commented 2 years ago

Custom JSON and WebSockets could benefit from being replaced by a standardized rosbridge + roslibjs to facilitate the communication with ROS for any kind of message and any topic. We need to evaluate if that helps the frontend code be more easy to understand and flexible.

philippewarren commented 2 years ago

The rosbridge should be reimplemented using OpenTera WebRTC's data channels. The idea is to add a rosbridge implementation node that subscribes to the json data published by the data channel bridge ROS node, replacing the json_data_handler node.

This is to prevent re-implementing the ROS data channel bridge node in Python to add rosbridge functionnalities to it (the rosbridge_library is only available in Python).

A Web implementation using WebRTC will also be needed.

philippewarren commented 2 years ago

The roslibjs side could use a slightly modified version of the Ros.js file, where we add a new if to support OpenTera WebRTC in connect. Or, we use the standard Ros.js, but we reassign the constructor before creating an instance so that it takes a proxy to an OpenTera WebRTC DataChannelClient to create the connection. We could then wrap it in an equivalent of the SockerAdapter.js.

philippewarren commented 2 years ago

The ROS side of things is implemented as described above, in the rosbridge branch. The Web side of things is partly implemented, as described in here: https://github.com/introlab/opentera-webrtc-teleop-frontend/issues/33