Skip to content

Commit

Permalink
Bump Zenoh to commit id e4ea6f0 (1.2.0 + few commits) (#446) (#449)
Browse files Browse the repository at this point in the history
* Bump: zenoh-cpp=bd4d741 zenoh-c=15d56e1 zenoh=e17de41

* Config: add new gossip target setting (eclipse-zenoh/zenoh#1678)

* Config: add new interests timeout setting (eclipse-zenoh/zenoh#1710)

* Config: copy updates from eclipse-zenoh/zenoh#1712

* Config: copy updates from eclipse-zenoh/zenoh#1722

* Config: copy updates from eclipse-zenoh/zenoh#1749

* Config: copy updates from eclipse-zenoh/zenoh#1751

* fix: use the commit 15d56e1 to include the allocation feature

* Bump zenoh-c=5fce7fb zenoh=e4ea6f0 (for eclipse-zenoh/zenoh#1754 fixing a routing issue in 1.2.0)

* Update documentation for commits and undo style changes

Signed-off-by: Yadunund <[email protected]>

---------

Signed-off-by: Yadunund <[email protected]>
Co-authored-by: yuanyuyuan <[email protected]>
Co-authored-by: Yadunund <[email protected]>
(cherry picked from commit d322d6f)

Co-authored-by: Julien Enoch <[email protected]>
  • Loading branch information
mergify[bot] and JEnoch authored Feb 4, 2025
1 parent d73c36c commit 14f0b7c
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 38 deletions.
49 changes: 35 additions & 14 deletions rmw_zenoh_cpp/config/DEFAULT_RMW_ZENOH_ROUTER_CONFIG.json5
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@
/// Accepts a single value (e.g. autoconnect: ["router", "peer"])
/// or different values for router, peer and client (e.g. autoconnect: { router: [], peer: ["router", "peer"] }).
/// Each value is a list of: "peer", "router" and/or "client".
autoconnect: { router: [], peer: ["router", "peer"] },
autoconnect: { router: [], peer: ["router", "peer"], client: ["router"] },
/// Whether or not to listen for scout messages on UDP multicast and reply to them.
listen: true,
},
/// The gossip scouting configuration.
/// The gossip scouting configuration. Note that instances in "client" mode do not participate in gossip.
gossip: {
/// Whether gossip scouting is enabled or not
enabled: true,
Expand All @@ -149,10 +149,17 @@
/// It mostly makes sense when using "linkstate" routing mode where all nodes in the subsystem don't have
/// direct connectivity with each other.
multihop: false,
/// Which type of Zenoh instances to send gossip messages to.
/// Accepts a single value (e.g. target: ["router", "peer"]) which applies whatever the configured "mode" is,
/// or different values for router or peer mode (e.g. target: { router: ["router", "peer"], peer: ["router"] }).
/// Each value is a list of "peer" and/or "router".
/// ROS setting: by default all peers rely on the router to discover each other. Thus configuring the peer to send gossip
/// messages only to the router is sufficient and avoids unecessary traffic between Nodes at launch time.
target: { router: ["router", "peer"], peer: ["router"]},
/// Which type of Zenoh instances to automatically establish sessions with upon discovery on gossip.
/// Accepts a single value (e.g. autoconnect: ["router", "peer"])
/// or different values for router, peer and client (e.g. autoconnect: { router: [], peer: ["router", "peer"] }).
/// Each value is a list of: "peer", "router" and/or "client".
/// or different values for router or peer mode (e.g. autoconnect: { router: [], peer: ["router", "peer"] }).
/// Each value is a list of: "peer" and/or "router".
autoconnect: { router: [], peer: ["router", "peer"] },
},
},
Expand Down Expand Up @@ -191,6 +198,14 @@
/// The routing strategy to use in peers. ("peer_to_peer" or "linkstate").
mode: "peer_to_peer",
},
/// The interests-based routing configuration.
/// This configuration applies regardless of the mode (router, peer or client).
interests: {
/// The timeout to wait for incoming interests declarations in milliseconds.
/// The expiration of this timeout implies that the discovery protocol might be incomplete,
/// leading to potential loss of messages, queries or liveliness tokens.
timeout: 10000,
},
},

// /// Overwrite QoS options for Zenoh messages by key expression (ignores Zenoh API QoS config for overwritten values)
Expand Down Expand Up @@ -343,11 +358,11 @@
open_timeout: 10000,
/// Timeout in milliseconds when accepting a link
accept_timeout: 10000,
/// Maximum number of zenoh session in pending state while accepting
/// Maximum number of links in pending state while performing the handshake for accepting it
accept_pending: 100,
/// Maximum number of sessions that can be simultaneously alive
/// Maximum number of transports that can be simultaneously alive for a single zenoh sessions
max_sessions: 1000,
/// Maximum number of incoming links that are admitted per session
/// Maximum number of incoming links that are admitted per transport
max_links: 1,
/// Enables the LowLatency transport
/// This option does not make LowLatency transport mandatory, the actual implementation of transport
Expand Down Expand Up @@ -429,14 +444,14 @@
/// then amount of memory being allocated for each queue is SIZE_XXX * LINK_MTU.
/// If qos is false, then only the DATA priority will be allocated.
size: {
control: 1,
real_time: 1,
interactive_high: 1,
interactive_low: 1,
control: 2,
real_time: 2,
interactive_high: 2,
interactive_low: 2,
data_high: 2,
data: 4,
data_low: 4,
background: 4,
data: 2,
data_low: 2,
background: 2,
},
/// Congestion occurs when the queue is empty (no available batch).
congestion_control: {
Expand Down Expand Up @@ -464,6 +479,12 @@
/// The maximum time limit (in ms) a message should be retained for batching when back-pressure happens.
time_limit: 1,
},
allocation: {
/// Mode for memory allocation of batches in the priority queues.
/// - "init": batches are allocated at queue initialization time.
/// - "lazy": batches are allocated when needed up to the maximum number of batches configured in the size configuration parameter.
mode: "lazy",
},
},
},
/// Configure the zenoh RX parameters of a link
Expand Down
49 changes: 35 additions & 14 deletions rmw_zenoh_cpp/config/DEFAULT_RMW_ZENOH_SESSION_CONFIG.json5
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@
/// Accepts a single value (e.g. autoconnect: ["router", "peer"])
/// or different values for router, peer and client (e.g. autoconnect: { router: [], peer: ["router", "peer"] }).
/// Each value is a list of: "peer", "router" and/or "client".
autoconnect: { router: [], peer: ["router", "peer"] },
autoconnect: { router: [], peer: ["router", "peer"], client: ["router"] },
/// Whether or not to listen for scout messages on UDP multicast and reply to them.
listen: true,
},
/// The gossip scouting configuration.
/// The gossip scouting configuration. Note that instances in "client" mode do not participate in gossip.
gossip: {
/// Whether gossip scouting is enabled or not
enabled: true,
Expand All @@ -154,10 +154,17 @@
/// It mostly makes sense when using "linkstate" routing mode where all nodes in the subsystem don't have
/// direct connectivity with each other.
multihop: false,
/// Which type of Zenoh instances to send gossip messages to.
/// Accepts a single value (e.g. target: ["router", "peer"]) which applies whatever the configured "mode" is,
/// or different values for router or peer mode (e.g. target: { router: ["router", "peer"], peer: ["router"] }).
/// Each value is a list of "peer" and/or "router".
/// ROS setting: by default all peers rely on the router to discover each other. Thus configuring the peer to send gossip
/// messages only to the router is sufficient and avoids unecessary traffic between Nodes at launch time.
target: { router: ["router", "peer"], peer: ["router"]},
/// Which type of Zenoh instances to automatically establish sessions with upon discovery on gossip.
/// Accepts a single value (e.g. autoconnect: ["router", "peer"])
/// or different values for router, peer and client (e.g. autoconnect: { router: [], peer: ["router", "peer"] }).
/// Each value is a list of: "peer", "router" and/or "client".
/// or different values for router or peer mode (e.g. autoconnect: { router: [], peer: ["router", "peer"] }).
/// Each value is a list of: "peer" and/or "router".
autoconnect: { router: [], peer: ["router", "peer"] },
},
},
Expand Down Expand Up @@ -194,6 +201,14 @@
/// The routing strategy to use in peers. ("peer_to_peer" or "linkstate").
mode: "peer_to_peer",
},
/// The interests-based routing configuration.
/// This configuration applies regardless of the mode (router, peer or client).
interests: {
/// The timeout to wait for incoming interests declarations in milliseconds.
/// The expiration of this timeout implies that the discovery protocol might be incomplete,
/// leading to potential loss of messages, queries or liveliness tokens.
timeout: 10000,
},
},

// /// Overwrite QoS options for Zenoh messages by key expression (ignores Zenoh API QoS config for overwritten values)
Expand Down Expand Up @@ -346,11 +361,11 @@
open_timeout: 10000,
/// Timeout in milliseconds when accepting a link
accept_timeout: 10000,
/// Maximum number of zenoh session in pending state while accepting
/// Maximum number of links in pending state while performing the handshake for accepting it
accept_pending: 100,
/// Maximum number of sessions that can be simultaneously alive
/// Maximum number of transports that can be simultaneously alive for a single zenoh sessions
max_sessions: 1000,
/// Maximum number of incoming links that are admitted per session
/// Maximum number of incoming links that are admitted per transport
max_links: 1,
/// Enables the LowLatency transport
/// This option does not make LowLatency transport mandatory, the actual implementation of transport
Expand Down Expand Up @@ -432,14 +447,14 @@
/// then amount of memory being allocated for each queue is SIZE_XXX * LINK_MTU.
/// If qos is false, then only the DATA priority will be allocated.
size: {
control: 1,
real_time: 1,
interactive_high: 1,
interactive_low: 1,
control: 2,
real_time: 2,
interactive_high: 2,
interactive_low: 2,
data_high: 2,
data: 4,
data_low: 4,
background: 4,
data: 2,
data_low: 2,
background: 2,
},
/// Congestion occurs when the queue is empty (no available batch).
congestion_control: {
Expand Down Expand Up @@ -467,6 +482,12 @@
/// The maximum time limit (in ms) a message should be retained for batching when back-pressure happens.
time_limit: 1,
},
allocation: {
/// Mode for memory allocation of batches in the priority queues.
/// - "init": batches are allocated at queue initialization time.
/// - "lazy": batches are allocated when needed up to the maximum number of batches configured in the size configuration parameter.
mode: "lazy",
},
},
},
/// Configure the zenoh RX parameters of a link
Expand Down
17 changes: 7 additions & 10 deletions zenoh_cpp_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ find_package(ament_cmake_vendor_package REQUIRED)
# when expanded.
set(ZENOHC_CARGO_FLAGS "--no-default-features$<SEMICOLON>--features=shared-memory zenoh/transport_compression zenoh/transport_tcp zenoh/transport_tls")

# Set VCS_VERSION to include latest changes from zenoh/zenoh-c to benefit from :
# - https://github.com/eclipse-zenoh/zenoh/pull/1685 (Fix deadlock in advanced subscription undeclaration)
# - https://github.com/eclipse-zenoh/zenoh/pull/1696 (Fix SHM Garbage Collection (GC) policy)
# - https://github.com/eclipse-zenoh/zenoh/pull/1708 (Fix gossip with TLS endpoints)
# - https://github.com/eclipse-zenoh/zenoh/pull/1717 (Improve performance of a large number of peers)
# Set VCS_VERSION to include latest changes from zenoh/zenoh-c/zenoh-cpp to benefit from :
# - https://github.com/eclipse-zenoh/zenoh/pull/173 (Improve config to support priorities range in locators)
# - https://github.com/eclipse-zenoh/zenoh/pull/1736, https://github.com/eclipse-zenoh/zenoh/pull/1735,
# https://github.com/eclipse-zenoh/zenoh/pull/1744, https://github.com/eclipse-zenoh/zenoh/pull/1749,
# https://github.com/eclipse-zenoh/zenoh/pull/1751 (Improve performance of a large number of peers)
ament_vendor(zenoh_c_vendor
VCS_URL https://github.com/eclipse-zenoh/zenoh-c.git
VCS_VERSION 328736fe9bb9b654b1d9f47eecfc6d52f0d7d587
VCS_VERSION 5fce7fb1d397e016ad02a50bde4262007d755424
CMAKE_ARGS
"-DZENOHC_CARGO_FLAGS=${ZENOHC_CARGO_FLAGS}"
"-DZENOHC_BUILD_WITH_UNSTABLE_API=TRUE"
Expand All @@ -33,12 +33,9 @@ ament_vendor(zenoh_c_vendor

ament_export_dependencies(zenohc)

# Set VCS_VERSION to include latest changes from zenoh-cpp to benefit from :
# - https://github.com/eclipse-zenoh/zenoh-cpp/pull/342 (Fix include what you use)
# - https://github.com/eclipse-zenoh/zenoh-cpp/pull/363 (Fix memory leak in string deserialization)
ament_vendor(zenoh_cpp_vendor
VCS_URL https://github.com/eclipse-zenoh/zenoh-cpp
VCS_VERSION bbfef04e843289aae70b5aa060a925e8ee5b1b6f
VCS_VERSION bd4d741c6c4fa6509d8d745e22c3c50b4306bd65
CMAKE_ARGS
-DZENOHCXX_ZENOHC=OFF
)
Expand Down

0 comments on commit 14f0b7c

Please sign in to comment.