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

type introspection not working in dynamic_bridge and ros2 topic echo #28

Open
ghost opened this issue Oct 10, 2018 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Oct 10, 2018

This has been a problem since before the bouncy release. Coredx seems to know the types of messages that it sees, but when it needs to use that type on the fly it doesn't seem to work. The easiest example of that is with ros2 topic echo. I should be able to do the following and see the messages echoed out.

  • ros2 run demo_nodes_cpp talker in one terminal
  • ros2 topic echo chatter in another terminal
    ros2 topic list -t does seem to correctly show the types, but for some reason we have to specify the when we call ros2 topic echo. ros2 topic echo chatter std_msgs/String`. This works on other middlewares and used to work on coredx.

We experience the same kind of issue with the dynamic bridge. I'm not sure if they're related. If you run ros2 run ros1_bridge dynamic_bridge, it should be able to dynamically bridge topics into ros1 only if a ros1 node is trying to subscribe to them. Instead, nothing gets through. We have to run ros2 run ros1_bridge dynamic_bridge -- --bridge-all-topics in order to get anything across. The problem with using that method, is that we get more traffic than we actually wanted going across the bridge.

@ClarkTucker
Copy link
Contributor

It looks like the test (ros2 topic echo chatter) doesn't wait long enough for discovery to complete. By adding a short delay (I tried 1 second) after creating the node, allowing discovery to complete, it then works as expected.

Because discovery is asynchronous and can be impacted by network speed, network load, number of peers, etc, the test should be written so that it waits until the requested topic is discovered, rather than exiting immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant