-
Notifications
You must be signed in to change notification settings - Fork 506
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
Handling latched topic #1
Comments
Another suggestion is having a rosbridge configuration file or parameter which we can specify which topics to be latched. As a ros system admin or back-end maintainer, they should know which topics have to be latched. In this case, we don't have to cage every topic but the configured ones. |
Hi, This is quite a limitation in rosbridge. Is there any particular reason why MultiSubscriber is required in the first place? If there's no way to know if a topic is latched, I'd just drop it. An alternative would be having subscribe() create a second subscription to see if it receives a latched topic, and removing it again once it receives a message or a timeout is reached (possibly with some handling to create only one second subscription if there's several clients subscribing before a message is received). I'd be happy to write the code for this if it sounds like a reasonable solution, but I'd like to know first what benefit there is in avoiding subscribers. Thanks. |
I've submitted #58 which finally fixes this (by basically adding two lines of code). It's using some private API from rospy but it's the easiest fix. The same could also be achieved without directly using the internal API by creating a second Subscriber instance (as I proposed in my previous commit). However, that'd probably still rely on the knowledge that the callback will be invoked immediately (from the same thread), so I'd rather just explicitly use the internal API. Alternatively I'd just remove all this MultiSubscriber stuff, since rospy already does pretty much the same internally (but with proper support for latched topics; see https://github.com/ros/ros_comm/blob/hydro-devel/clients/rospy/src/rospy/topics.py). The only difference would be that the JSON encoding would happen multiple times. |
Awesome!!! |
Implement multiple subscriptions to latched topics (fixes #1).
Added Tornado websocket client
migrating issue from rosjs. https://github.com/RobotWebTools/rosjs/issues/23
In current implementation rosbridge are not aware of latched topic. It causes a problem when there are multiple rosbridge clients.(e.g only first subscriber receives the latched topic and the follower would not get any message).
I would like to suggest to have latchted:true option parsing handling in rosbridge. Though, this also require some changes in rosjs, it would be the quick way to fix the issue.
It is open question so please feed me any suggestion.
The text was updated successfully, but these errors were encountered: