From edb39c0ce26acf3186898514f92a003d73274560 Mon Sep 17 00:00:00 2001 From: Hugal31 Date: Fri, 28 Feb 2025 16:19:12 +0100 Subject: [PATCH] Enable Zenoh UDP transport (#486) (cherry picked from commit 299ddc7c618085a31247b829ffb2a4a24bccb49a) --- rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp | 2 ++ zenoh_cpp_vendor/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp index ced71f17..7a7e229b 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp @@ -126,6 +126,8 @@ std::shared_ptr PublisherData::make( if (adapted_qos_profile.history == RMW_QOS_POLICY_HISTORY_KEEP_ALL) { pub_opts.congestion_control = Z_CONGESTION_CONTROL_BLOCK; } + } else { + pub_opts.reliability = Z_RELIABILITY_BEST_EFFORT; } adv_pub_opts.publisher_options = pub_opts; diff --git a/zenoh_cpp_vendor/CMakeLists.txt b/zenoh_cpp_vendor/CMakeLists.txt index 127b605e..c7369920 100644 --- a/zenoh_cpp_vendor/CMakeLists.txt +++ b/zenoh_cpp_vendor/CMakeLists.txt @@ -15,7 +15,7 @@ find_package(ament_cmake_vendor_package REQUIRED) # Note: We separate the two args needed for cargo with "$" and not ";" as the # latter is a list separater in cmake and hence the string will be split into two # when expanded. -set(ZENOHC_CARGO_FLAGS "--no-default-features$--features=shared-memory zenoh/transport_compression zenoh/transport_tcp zenoh/transport_tls") +set(ZENOHC_CARGO_FLAGS "--no-default-features$--features=shared-memory zenoh/transport_compression zenoh/transport_tcp zenoh/transport_udp zenoh/transport_tls") # Set VCS_VERSION to include latest changes from zenoh/zenoh-c/zenoh-cpp to benefit from : # - https://github.com/eclipse-zenoh/zenoh/pull/1742, https://github.com/eclipse-zenoh/zenoh/pull/1765