Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send message from client to server #38

Closed
0wu opened this issue Jan 7, 2022 · 9 comments · Fixed by #250
Closed

send message from client to server #38

0wu opened this issue Jan 7, 2022 · 9 comments · Fixed by #250
Assignees
Labels
feature New feature or request

Comments

@0wu
Copy link

0wu commented Jan 7, 2022

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.

@0wu 0wu added the feature New feature or request label Jan 7, 2022
@jtbandes
Copy link
Member

jtbandes commented Jan 8, 2022

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.

@0wu
Copy link
Author

0wu commented Jan 8, 2022

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.

@sionyx
Copy link

sionyx commented Jan 19, 2022

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.

@sionyx
Copy link

sionyx commented Feb 7, 2022

Hey guys! Are there any news regarding this feature?

@jtbandes
Copy link
Member

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.

@sionyx
Copy link

sionyx commented Mar 21, 2022

Hey guys! Still waiting for any news

@yjmade
Copy link

yjmade commented Mar 25, 2022

I'm urgent to use this feature too.

@yjmade
Copy link

yjmade commented Apr 11, 2022

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

@cody-sheff
Copy link

cody-sheff commented Sep 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Development

Successfully merging a pull request may close this issue.

5 participants