gramaziokohler / roslibpy

Python ROS Bridge library
MIT License
273 stars 56 forks source link

Subscription reconnection does not work if a Topic instance is used for both publication and subscrtiption #114

Open daisukes opened 1 year ago

daisukes commented 1 year ago

Description Re-connection of subscription of a Topic instance does not work if the instance is also used for publication.

To Reproduce Reproduction code https://github.com/daisukes/rosbridge-bug/blob/main/bridge/test_ng.py

  1. connect
  2. make a Topic
  3. subscribe to the Topic
  4. publish to the Topic as well
  5. reconnect

Expected behavior

subscription to the Topic is connected automatically

Note https://github.com/gramaziokohler/roslibpy/blob/82442226d8b20f132a07dba7ced285945ce1c238/src/roslibpy/core.py#L300 self._connect_message is shared by publish/subscribe, so re-connection may not work as expected