diff --git a/rmw_fastrtps_cpp/src/rmw_client.cpp b/rmw_fastrtps_cpp/src/rmw_client.cpp index d376bdc2e9..4a0c64d92c 100644 --- a/rmw_fastrtps_cpp/src/rmw_client.cpp +++ b/rmw_fastrtps_cpp/src/rmw_client.cpp @@ -27,6 +27,7 @@ #include "fastdds/dds/topic/qos/TopicQos.hpp" #include "fastdds/rtps/resources/ResourceManagement.h" +#include #include "rcpputils/scope_exit.hpp" #include "rcutils/error_handling.h" @@ -431,6 +432,12 @@ rmw_create_client( } memcpy(const_cast(rmw_client->service_name), service_name, strlen(service_name) + 1); + std::copy(info->writer_guid_.entityId.value, + info->writer_guid_.entityId.value + info->writer_guid_.entityId.size, + std::copy( info->writer_guid_.guidPrefix.value, + info->writer_guid_.guidPrefix.value + info->writer_guid_.guidPrefix.size, + rmw_client->writer_guid)); + { // Update graph std::lock_guard guard(common_context->node_update_mutex);