-
Notifications
You must be signed in to change notification settings - Fork 0
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
rmw_zenoh_cpp
starts slowly due to the router connection during initialization
#12
Comments
By reducing the retry interval from 1s to 100ms, the total time of rmw_zenoh_cpp becomes 15s. I think the remaining questions are
[ RUN ] NodeGraphMultiNodeFixture.test_node_info_clients
2024-08-29T07:46:06.402460Z INFO ThreadId(02) zenoh::net::runtime: Using ZID: 3d6a93f9c6e11ecd03c40baae8eac912
2024-08-29T07:46:06.403313Z INFO ThreadId(02) zenoh::net::runtime::orchestrator: Zenoh can be reached at: tcp/[::1]:35069
2024-08-29T07:46:06.405611Z WARN ThreadId(02) zenoh::net::runtime::orchestrator: Scouting delay elapsed before start conditions are met.
[INFO] [1724917566.405698472] [rmw_zenoh_cpp]: Successfully connected to a Zenoh router with id fa7db30090db9561f56a0c63cb77f13f.
2024-08-29T07:46:06.514480Z INFO ThreadId(02) zenoh::net::runtime: Using ZID: efd3a5891210cbe8f4f266dccac1ed48
2024-08-29T07:46:06.515690Z INFO ThreadId(02) zenoh::net::runtime::orchestrator: Zenoh can be reached at: tcp/[::1]:39389
2024-08-29T07:46:06.517990Z WARN ThreadId(02) zenoh::net::runtime::orchestrator: Scouting delay elapsed before start conditions are met.
[INFO] [1724917566.518090345] [rmw_zenoh_cpp]: Successfully connected to a Zenoh router with id fa7db30090db9561f56a0c63cb77f13f.
2024-08-29T07:46:06.651655Z INFO ThreadId(02) zenoh::net::runtime: Using ZID: a147e25ec3ac45235be75d4014f9a059
2024-08-29T07:46:06.654292Z INFO ThreadId(02) zenoh::net::runtime::orchestrator: Zenoh can be reached at: tcp/[::1]:37989
2024-08-29T07:46:06.657196Z WARN ThreadId(02) zenoh::net::runtime::orchestrator: Scouting delay elapsed before start conditions are met.
[ERROR] [1724917566.657438032] [rmw_zenoh_cpp]: Unable to connect to a Zenoh router. Have you started a router with `ros2 run rmw_zenoh_cpp rmw_zenohd`?
[INFO] [1724917566.757634370] [rmw_zenoh_cpp]: Successfully connected to a Zenoh router with id fa7db30090db9561f56a0c63cb77f13f.
[ERROR] [1724917567.865398794] [rmw_zenoh_cpp]: topic name /test_service not found in topic_map. Report this.
[ERROR] [1724917567.865425930] [rmw_zenoh_cpp]: topic name /test_service not found in topic_map. Report this.
[WARN] [1724917567.865651105] [rmw_zenoh_cpp]: Received liveliness token to remove unknown node /old_node_name from the graph. Ignoring...
[WARN] [1724917567.865866689] [rmw_zenoh_cpp]: Received liveliness token to remove unknown node /old_node_name from the graph. Ignoring...
2024-08-29T07:46:07.867399Z ERROR rx-2 ThreadId(10) zenoh::net::routing::dispatcher::resource: Face{2, 3d6a93f9c6e11ecd03c40baae8eac912} Resource 1 remapped. Remapping unsupported!
[ERROR] [1724917567.870917627] [rmw_zenoh_cpp]: topic name /rosout not found in topic_map. Report this.
[WARN] [1724917567.871392931] [rmw_zenoh_cpp]: Received liveliness token to remove unknown node /test_graph_node from the graph. Ignoring... |
I tried this patch: eclipse-zenoh/zenoh@926208c In the complete test, most of the complain "Unable to connect to a Zenoh router" disappear now. However, it still takes time to run the test.
Here is the log: rmw_zenoh_cpp(with patch):
rmw_cyclonedds_cpp:
If update the sleep time here rmw_zenoh/rmw_zenoh_cpp/src/rmw_init.cpp Line 216 in 7dba674
I thought the sleep should only occur if unable to connect to Zenoh router. However, some tests fail if doing so. Still investigating it. |
There are 3 issues here:
|
With this patch https://github.com/eclipse-zenoh/zenoh-c/tree/dev/liveliness_subscriber_history, using liveliness subscriber with history works well and we can move the unnecessary sleep into if-condition. This will solve the remaining two issues. |
I think this can be closed now |
Taking rcl/test/test_graph as an example,
The text was updated successfully, but these errors were encountered: