Open Edouard-ZHOU-fr opened 2 months ago
Generally, the problem revolves around the fact that ros2 topic echo creates a new node every time it is run. The consequence of that is that it needs to "join" the DDS graph, and doing so can take some time. If that takes too long, then when it goes to get the available topic names and types, it can't find the one requested and prints that error.
I'll note that the problem is particularly bad with Connext, as Connext takes a really long time for new nodes to join the graph.
We've talked a bit about changing this to use the ros2 daemon as well. That is, when it first started, ros2 topic echo would attempt to contact the daemon and ask it for its list of topics and types. If it gets a response, then it would go looking for the correct one. If it doesn't get a response, then it can fall back to the old method of creating a node and joining the graph itself.
We just haven't had the time to implement this idea. If anyone has time and would like to open a PR for this, we would happily review it.
Could not determine the type for the passed topic