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

Publish "client_count" topic #38

Open
jhurliman opened this issue Nov 11, 2022 · 3 comments
Open

Publish "client_count" topic #38

jhurliman opened this issue Nov 11, 2022 · 3 comments
Labels
feature New feature or request

Comments

@jhurliman
Copy link
Contributor

Taken from rosbridge:

# Publisher for number of connected clients
# QoS profile with transient local durability (latched topic in ROS 1).
client_count_qos_profile = QoSProfile(
    depth=10,
    durability=DurabilityPolicy.TRANSIENT_LOCAL,
)

RosbridgeWebSocket.client_count_pub = self.create_publisher(
    Int32, "client_count", qos_profile=client_count_qos_profile
)
RosbridgeWebSocket.client_count_pub.publish(Int32(data=0))
@jhurliman jhurliman added the feature New feature or request label Nov 11, 2022
@achim-k
Copy link
Collaborator

achim-k commented Nov 21, 2022

The main motivation behind the client_count topic was to let a client see that they might not be the only one that is making changes to the server configuration (e.g. through setting parameters or calling other kind of ros services).

Having this is useful, but I wonder if we should not add it directly to the ws-protocol spec instead of having it a separate ROS topic

@jhurliman
Copy link
Contributor Author

One side effect of publishing a ROS topic is that /client_count can end up in a recording. I'm not sure if that is useful though, it does seem like something only WebSocket-connected clients would care about.

To support this in ws-protocol, we would need something like the status op that servers can push to clients at will, but with more structure perhaps like a key/value pair and using client_count as the key?

@achim-k
Copy link
Collaborator

achim-k commented Nov 21, 2022

To support this in ws-protocol, we would need something like the status op that servers can push to clients at will, but with more structure perhaps like a key/value pair and using client_count as the key?

Or maybe we just add client_count as an optional field to the status message?

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

No branches or pull requests

2 participants