在ROS2中,使用qos_profile = rmw_qos_profile_system_default
将使用DDS供应商的安装目录(在这种情况下为RTI CONNEXT)的默认xml配置。
查看RTI的this文档,这意味着文件NDDS_QOS_PROFILES.xml
已加载。但是此文件没有任何QoS设置。这只是参与者的发现。
用例: 可以说其他一些应用程序,例如ROS2正在使用我不知道的QoS设置发布主题。现在,我需要使用RTI Connector for Python使用XML应用程序创建来为此主题创建一个订阅服务器。为此,我需要知道ROS2应用程序使用的QoS设置,然后使用XML创建类似的QoS。
答案 0 :(得分:1)
如果default.xml不包含所有参数,则您可能正在使用内置的默认https://community.rti.com/examples/built-qos-profiles
使用RTI管理控制台,您可以查看当前发布者/订阅者的QoS。您还可以通过更简单的方式更新QoS的.xml(https://www.rti.com/blog/2012/09/24/introducing-rti-administration-console/,请参阅编辑QoS)。
答案 1 :(得分:0)
我正在使用ROS2口才和RTI COnnext DDS 5.3.1,并且遇到类似的问题。
我创建了一个geometry_msgs::msg::dds_::TransformStamped_
发布者和订阅者。当我没有任何USER_QOS_PROFILES.xml
时,发布者和订阅者匹配(在rtiadminconsole中看到),订阅者接收到消息。然后,我用命令创建了一个USER_QOS_PROFILES.xml
/opt/rti_connext_dds-5.3.1/bin/rtiddsgen -create examplefiles -update typefiles -language C++11 -I idl idl/geometry_msgs/msg/TransformStamped.idl
现在,当我启动发布者时,出现以下错误:
PRESParticipant_checkTransportInfoMatching:Warning: discovered remote participant 'RTI Administration Console' using the 'shmem' transport with class ID 16777216. This class ID does not match the class ID 2 of the same transport in the local participant 'minimal_publisher'. These two participants will not communicate over the 'shmem' transport. Check the value of the property 'dds.transport.use_510_compatible_locator_kinds' in the local participant. See https://community.rti.com/kb/what-causes-error-discovered-remote-participant for additional info. COMMENDBeWriterService_assertRemoteReader:Discovered remote reader with GUID 0X101B8B9,0XF38BCC9E,0XB4C09B41,0X200C7 using a non-addressable locator. This can occur if the transport is not installed and/or enabled in the local participant. See https://community.rti.com/kb/what-does-cant-reach-locator-error-message-mean for additional info. can't reach: locator: shmem://508B:2F0F:1EDD:2470:D06A:ACC9:0000:0000:7410 COMMENDSrWriterService_assertRemoteReader:Discovered remote reader with GUID 0X101B8B9,0XF38BCC9E,0XB4C09B41,0X20087 using a non-addressable locator. This can occur if the transport is not installed and/or enabled in the local participant. See https://community.rti.com/kb/what-does-cant-reach-locator-error-message-mean for additional info. can't reach: locator: shmem://508B:2F0F:1EDD:2470:D06A:ACC9:0000:0000:7410 COMMENDSrWriterService_assertRemoteReader:Discovered remote reader with GUID 0X101B8B9,0XF38BCC9E,0XB4C09B41,0X4C7 using a non-addressable locator. This can occur if the transport is not installed and/or enabled in the local participant. See https://community.rti.com/kb/what-does-cant-reach-locator-error-message-mean for additional info. can't reach: locator: shmem://508B:2F0F:1EDD:2470:D06A:ACC9:0000:0000:7410 COMMENDSrWriterService_assertRemoteReader:Discovered remote reader with GUID 0X101B8B9,0XF38BCC9E,0XB4C09B41,0X3C7 using a non-addressable locator. This can occur if the transport is not installed and/or enabled in the local participant. See https://community.rti.com/kb/what-does-cant-reach-locator-error-message-mean for additional info. can't reach: locator: shmem://508B:2F0F:1EDD:2470:D06A:ACC9:0000:0000:7410 DDS_ResourceLimitsQosPolicy_is_consistent_w_historyI:inconsistent QoS policies: history.depth and resource_limits.max_samples (max_samples_per_instance is unlimited)
DDS_Subscriber_create_datareader_disabledI:ERROR: Inconsistent QoS DDSDataReader_impl::create_disabledI:!create reader DDSDataReader_impl::createI:!create reader initialize:!create DataReader connext::details::EntityUntypedImpl::initialize:!failed (see previous errors) >>> [rcutils|error_handling.c:107] rcutils_set_error_state() This error state is being overwritten: 'C++ exception during construction of Requester, at /tmp/binarydeb/ros-eloquent-rcl-interfaces-0.8.0/obj-x86_64-linux-gnu/rosidl_typesupport_connext_cpp/rcl_interfaces/srv/dds_connext/get_parameters__type_support.cpp:704' with this new error message: 'failed to create replier, at /tmp/binarydeb/ros-eloquent-rmw-connext-cpp-0.8.1/src/rmw_service.cpp:138' rcutils_reset_error() should be called after error handling to avoid this. <<< terminate called after throwing an instance of 'rclcpp::exceptions::RCLError' what(): could not create service: failed to create replier, at /tmp/binarydeb/ros-eloquent-rmw-connext-cpp-0.8.1/src/rmw_service.cpp:138, at /tmp/binarydeb/ros-eloquent-rcl-0.8.4/src/rcl/service.c:179
我想第一部分来自我已经打开rtiadminconsole的事实,但是按钮上的错误似乎是一些rti DDS / ROS2问题。您可以在下面找到USER_QOS_PROFILES.xml
<?xml version="1.0"?>
<!--
Description
XML QoS Profile for TransformStamped
The QoS configuration of the DDS entities in the generated example is loaded
from this file.
This file is used only when it is in the current working directory or when the
environment variable NDDS_QOS_PROFILES is defined and points to this file.
The profile in this file inherits from the builtin QoS profile
BuiltinQosLib::Generic.StrictReliable. That profile, along with all of the
other built-in QoS profiles can be found in the
BuiltinProfiles.documentationONLY.xml file located in the
$NDDSHOME/resource/xml/ directory.
You may use any of these QoS configurations in your application simply by
referring to them by the name shown in the
BuiltinProfiles.documentationONLY.xml file and listed below:
* In library "BuiltinQosLib":
** Baseline
** Baseline.5.0.0
** Baseline.5.1.0
** Baseline.5.2.0
** Generic.Common
** Generic.510TransportCompatibility
** Generic.Monitoring.Common
** Generic.ConnextMicroCompatibility
** Generic.OtherDDSVendorCompatibility
* In library "BuiltinQosLibExp":
** Generic.StrictReliable
** Generic.KeepLastReliable
** Generic.BestEffort
** Generic.StrictReliable.HighThroughput
** Generic.StrictReliable.LowLatency
** Generic.Participant.LargeData
** Generic.Participant.LargeData.Monitoring
** Generic.StrictReliable.LargeData
** Generic.KeepLastReliable.LargeData
** Generic.StrictReliable.LargeData.FastFlow
** Generic.StrictReliable.LargeData.MediumFlow
** Generic.StrictReliable.LargeData.SlowFlow
** Generic.KeepLastReliable.LargeData.FastFlow
** Generic.KeepLastReliable.LargeData.MediumFlow
** Generic.KeepLastReliable.LargeData.SlowFlow
** Generic.KeepLastReliable.TransientLocal
** Generic.KeepLastReliable.Transient
** Generic.KeepLastReliable.Persistent
** Generic.AutoTuning
** Pattern.PeriodicData
** Pattern.Streaming
** Pattern.ReliableStreaming
** Pattern.Event
** Pattern.AlarmEvent
** Pattern.Status
** Pattern.AlarmStatus
** Pattern.LastValueCache
You should not edit the file BuiltinProfiles.documentationONLY.xml directly.
However, if you wish to modify any of the values in a built-in profile, the
recommendation is to create a profile of your own and inherit from the built-in
profile you wish to modify. The NDDS_QOS_PROFILES.example.xml file (contained in
the same directory as the BuiltinProfiles.documentationONLY.xml file) shows how
to inherit from the built-in profiles.
For more information about XML QoS Profiles see Chapter 17 in the
RTI Connext user manual.
-->
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="/opt/rti_connext_dds-5.3.1/resource/schema/rti_dds_qos_profiles.xsd"
version="5.3.1">
<!-- QoS Library containing the QoS profile used in the generated example.
A QoS library is a named set of QoS profiles.
-->
<qos_library name="TransformStamped_Library">
<!-- QoS profile used to configure reliable communication between the DataWriter
and DataReader created in the example code.
A QoS profile groups a set of related QoS.
-->
<qos_profile name="TransformStamped_Profile" base_name="BuiltinQosLibExp::Generic.StrictReliable" is_default_qos="true">
<!-- QoS used to configure the data writer created in the example code -->
<datawriter_qos>
<publication_name>
<name>TransformStampedDataWriter</name>
</publication_name>
</datawriter_qos>
<!-- QoS used to configure the data reader created in the example code -->
<datareader_qos>
<subscription_name>
<name>TransformStampedDataReader</name>
</subscription_name>
</datareader_qos>
<participant_qos>
<!--
The participant name, if it is set, will be displayed in the
RTI tools, making it easier for you to tell one
application from another when you're debugging.
-->
<participant_name>
<name>TransformStampedParticipant</name>
<role_name>TransformStampedParticipantRole</role_name>
</participant_name>
</participant_qos>
</qos_profile>
</qos_library>
</dds>
更新:感谢rti社区论坛的neil-rti,我得以解决我的问题。我将rti DDS 5.3.1“激活”为中间件层后,必须彻底重建ROS2雄辩的节点。