foxglove / ws-protocol

Foxglove Studio WebSocket protocol specification and libraries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

send message from client to server

0wu opened this issue · comments

At the moment data flow is purely from server to client.
However, in actual robotics environment, user may want to send control signals from the UI to server.
Such feature (eg. Publish) is supported only when using native ROS.
I would like to see this happening on ws-protocol as well.

Thanks for your interest! I agree this would be valuable. The rosbridge server has this feature already so we can look there for inspiration.

Here are some notes and thoughts on how we might implement it. Let me know if you have any feedback.

  • Add "advertise" (or "clientAdvertise"? name TBD) to server capabilites
  • Allow clients to send Advertise / Unadvertise / Message Data ops to server
    • Would Message Data still have to be binary, or do we allow clients to send JSON?
  • Should the server explicitly Subscribe / Unsubscribe from client messages, or should the client send them whenever it wants to?
    • The use cases I'm familiar with are low-frequency messages sent from the client, such as sending a message when a user clicks a button. So there's not much benefit to reducing traffic by only sending messages if the server explicitly subscribed. (The goal of the Foxglove WebSocket protocol is not to be a full-featured symmetrical pub/sub middleware.) We would need to understand some motivating use cases in order to justify requiring the server to subscribe/unsubscribe.

Our use-cases

  • some keyboard based teleoperation controlling a robot arm or vehicle, 10Hz
  • start/stop experiment, one-off

So json is definitely suitable.

Our server side system does not rely on ROS for IPC but we use ROS message format for SerDes. Foxglove plays the visualization/ui role here. That's why we can't use native ROS interface. Maybe implementing our own rosbridge-like is one way to go. However, this web-socket protocol seems rather light weight.

Looking forward for this feature as well. My system not based on ROS, but I wrote rosbridge protocol based bridge to control the system. At this time I have the bridge migrated to foxglove ws-protocol and realized that I cannot send any data back.

It doesn't matter for my bridge to have or not Subscribe / Unsubscribe operations, it can receive messages from client at any time. Json format is ok as well.

Hey guys! Are there any news regarding this feature?

No updates yet — we are currently hard at work on our new MCAP file format. That work should be stabilizing in the next week or two and then we can take a look at this feature.

Hey guys! Still waiting for any news

I'm urgent to use this feature too.

Any update? This is so important for us to make full use of Foxglove.

This would also be a helpful feature for our use of Foxglove! We are currently using protobuf with MCAP for the logging, but should be able to use either that or JSON for published messages.

All we need is to send some sort of basic message that will be interpreted to trigger specific behaviors; not much more than sending specific IDs.