-
Notifications
You must be signed in to change notification settings - Fork 519
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
Subscriber unable to receive messages #399
Comments
@leviathan747 I think you're bumping into a pretty old issue that has been mitigated but not totally resolved. The thread of the issue can be followed from this one: The problem is basically how the reconnects are handled, internally there's a 10 second timeout to reconnect a client. The timeout was designed to deal with fast reconnects coming from |
@gonzalocasas yeah, I saw that thread and others. I actually had the same problem on the publish side and used the timeout configuration capability introduced by this PR. But this problem has to do with topics being unregistered when there are no subscribers. For now, I just changed a few lines in my fork to make sure that they do not get unregistered (see here). I don't understand the design... Why must topics get unregistered at all? |
This is a good question, and I don't have a good answer. Today I'm finding that clients have issues when reconnecting after their topics have been unregistered. Never unregistering topics fixes it. This could be a problem in rospy, I'm curious if the ROS2 edition has the same quirk. |
This issue has been marked as stale because it has been open for 180 days with no activity. Please remove the stale label or add a comment to keep it open. |
Behavior
I'm not sure if this is the expected behavior or not...
I have an application using roslibpy (https://github.com/gramaziokohler/roslibpy) to connect to a rosbridge server and communicate. It needs to publish and subscribe to topics. The flow goes something like this:
It works the first time the client application runs, but the second time, it is able to publish messages but it is not able to receive messages it subscribes to. I was looking at the code and saw in
subscribers.py
line 217 that when a topic no longer has any subscribers, rosbridge unregisters the topic. I commented out these lines and my application now works.Why is this behavior there? Is there a workaround for something like this? I cannot guarantee that there will always be at least one subscriber for the topic and I want to be able to connect a new client and subscribe to messages.
Specifications
echo $ROS_DISTRO
): melodicgrep DISTRIB_CODENAME /etc/lsb-release
): bionicroscat rosbridge_server package.xml | grep '<version>'
): 0.11.0python -c 'import tornado; print tornado.version'
): 4.5.3The text was updated successfully, but these errors were encountered: