diff --git a/rmw_fastrtps_cpp/src/rmw_node.cpp b/rmw_fastrtps_cpp/src/rmw_node.cpp index 3d5555434..09153b064 100644 --- a/rmw_fastrtps_cpp/src/rmw_node.cpp +++ b/rmw_fastrtps_cpp/src/rmw_node.cpp @@ -196,6 +196,10 @@ rmw_create_node( } ParticipantAttributes participantAttrs; + + // Load default XML profile. + Domain::getDefaultParticipantAttributes(participantAttrs); + participantAttrs.rtps.builtin.domainId = static_cast(domain_id); participantAttrs.rtps.setName(name); diff --git a/rmw_fastrtps_cpp/src/rmw_publisher.cpp b/rmw_fastrtps_cpp/src/rmw_publisher.cpp index 082a9cda8..27eb85e30 100644 --- a/rmw_fastrtps_cpp/src/rmw_publisher.cpp +++ b/rmw_fastrtps_cpp/src/rmw_publisher.cpp @@ -81,6 +81,9 @@ rmw_create_publisher( PublisherAttributes publisherParam; const GUID_t * guid = nullptr; + // Load default XML profile. + Domain::getDefaultPublisherAttributes(publisherParam); + // TODO(karsten1987) Verify consequences for std::unique_ptr? info = new CustomPublisherInfo(); info->typesupport_identifier_ = type_support->typesupport_identifier; diff --git a/rmw_fastrtps_cpp/src/rmw_subscription.cpp b/rmw_fastrtps_cpp/src/rmw_subscription.cpp index 7827623de..318d35b97 100644 --- a/rmw_fastrtps_cpp/src/rmw_subscription.cpp +++ b/rmw_fastrtps_cpp/src/rmw_subscription.cpp @@ -85,6 +85,9 @@ rmw_create_subscription( rmw_subscription_t * rmw_subscription = nullptr; SubscriberAttributes subscriberParam; + // Load default XML profile. + Domain::getDefaultSubscriberAttributes(subscriberParam); + info = new CustomSubscriberInfo(); info->typesupport_identifier_ = type_support->typesupport_identifier;