-
Notifications
You must be signed in to change notification settings - Fork 297
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
Bridge does not work without --bridge-all-topics #200
Comments
Actually, no, this isn't going to work. Since the dynamic bridge only bridges topics which have a publisher on one side and a subscriber on the other it doesn't bridge the topic since there is no subscriber yet. |
Hmm, let me try it with an actual subscriber. |
Verified this works when a ROS 1 subscriber is started - the subscriber works right away; I'll add this point to the ros1_bridge documentation PR. A weird behavior in both direction though, is that if I just run and kill the subscriber repeatedly, it still does not get the messages intermittently. This is true even for built-in messages like The fact that |
Please create a separate PR for this unrelated change. |
I think we should open a separate issue to track this problem and try to figure out a way to improve it. The first thing people will do when trying out the bridge is to do a |
I think a new ticket only makes sense if you have a proposal how it could be improved. |
I see, we already have #132 tracking this problem. |
Bug report
The issue basically means that selective bridging doesn't work.
Required Info:
This is an older hash from Apr 28, which builds with Crystal. I have not been able to run the latest bridge in Dashing with custom types (Gives error
Failed to load entry point 'info'
which was resolvable before by careful workspace setup in Crystal, but the same steps did not fix it in Dashing). When I'm able to run it in Dashing, I'll update this bug report.Steps to reproduce issue
This will check out a simple custom message containing only a
float64
field, in a ROS 1 package and a ROS 2 package, and buildros1_bridge
from source.Expected behavior
Even without
--bridge-all-topics
, we should be able to echo in a ROS 1 shell (which establishes a subscriber to) the ROS 2 message/joint_command
, which is being continuously published in Shell 2:Actual behavior
It cannot be echoed. The selective bridge is not established for the matching subscriber.
ROS 2 topic
/joint_command
can only be echoed in ROS 1 if--bridge-all-topics
is specified:Additionally, if the bridge is killed and restarted without
--bridge-all-topics
, the it can still be echoed in ROS 1, which is correct behavior, but this could not be done in the first try above. This is the case even if the ROS 1 subscriber and the ROS 2 publisher are also killed and restarted.The fact that this happens might be because once
--bridge-all-topics
establishes the mapping in ROS 1 master, it persists after the ROS 1 node and ROS 2 node are killed.Additional information
Bug is reflected by printing
payload
printout indynamic_bridge.cpp
, after it is populated by this line:Even without
--bridge-all-topics
,/joint_command
should be listed as subscriber whenrostopic echo /joint_command
is running, but it is never listed:With
--bridge-all-topics
,/joint_command
is listed as subscriber by rostopic echo:The text was updated successfully, but these errors were encountered: