Multiple rosbridge clients that have their "own copy" of nodes
I've some nodes that can communicated with though rosbridge_websocket
. I've got everything set up for one user, and now I'd like to scale this up to multiple users. I'd like each user (or client) to have their own copy of the nodes, such that the state of the nodes for one client doesn't interfere with another's.
Let's say I've got a node some_node
. And the users are User1
, User2
, ... UserN
. Shown below is a "pseudo" rqt_graph to explain what I want:
There could be any number of users. That's why I cannot simply create a launch file that'd launch a pre-defined number of anonymous copies. I've already looked at #q361809, which doesn't yet have any answer and the comment is something specific to that question which doesn't apply to my case.
For every new user that connects to rosbridge_websocket
, a copy of some_node
should get created dynamically. Can anyone advise how to proceed with this? This is for work where my colleagues need to do their work with the nodes I created, without their work interfering with one another. I've got ROS Melodic.
Asked by abhishek47 on 2021-05-25 01:25:40 UTC
Comments
Do you have a requirement to only have a single instance of
rosbridge
running?Asked by gvdhoorn on 2021-05-25 01:56:33 UTC
No, there is no such requirement.
Asked by abhishek47 on 2021-05-25 02:48:30 UTC
the "pseudo rqt_graph" seems to suggest otherwise though.
Would it work to start a new instance of everything, including
rosbridge
and make each client connect to their own private "session"?Have you also looked at commercial/existing solutions? Scaling these kinds of things is non-trivial, and I seem to remember there are some companies specialising in these kinds of things.
Asked by gvdhoorn on 2021-05-25 02:56:19 UTC
I meant to show that
rosbridge_websocket
is a gateway, but now I totally get how that diagram is ambiguous and could lead one to think there's a one-instance-of-rosbridge-only requirement.Hm I think this approach should be fine. I'm running this on a Raspberry Pi so I'll have to find out what limits might that pose but in theory at least multiple sessions sounds like an idea worth exploring. Are you aware of a resource that shows how to create such sessions? I'm curious what constitutes a session and what piece of information distinguishes one session from another.
Haven't found much out there, turned to ROS Answers first thing in case there is a ROS feature specifically for this which I didn't know.
Asked by abhishek47 on 2021-05-25 06:58:58 UTC