Quality of Service¶
- class rclpy.qos.DurabilityPolicy(value)¶
Enum for QoS Durability settings.
This enum matches the one defined in rmw/types.h
- RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT = 0¶
- RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL = 1¶
- RMW_QOS_POLICY_DURABILITY_UNKNOWN = 3¶
- RMW_QOS_POLICY_DURABILITY_VOLATILE = 2¶
- SYSTEM_DEFAULT = 0¶
- TRANSIENT_LOCAL = 1¶
- UNKNOWN = 3¶
- VOLATILE = 2¶
- class rclpy.qos.HistoryPolicy(value)¶
Enum for QoS History settings.
This enum matches the one defined in rmw/types.h
- KEEP_ALL = 2¶
- KEEP_LAST = 1¶
- RMW_QOS_POLICY_HISTORY_KEEP_ALL = 2¶
- RMW_QOS_POLICY_HISTORY_KEEP_LAST = 1¶
- RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT = 0¶
- RMW_QOS_POLICY_HISTORY_UNKNOWN = 3¶
- SYSTEM_DEFAULT = 0¶
- UNKNOWN = 3¶
- exception rclpy.qos.InvalidQoSProfileException(*args)¶
Raised when constructing a QoSProfile with invalid arguments.
- class rclpy.qos.LivelinessPolicy(value)¶
Enum for QoS Liveliness settings.
This enum matches the one defined in rmw/types.h
- AUTOMATIC = 1¶
- MANUAL_BY_TOPIC = 3¶
- RMW_QOS_POLICY_DURABILITY_UNKNOWN = 4¶
- RMW_QOS_POLICY_LIVELINESS_AUTOMATIC = 1¶
- RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC = 3¶
- RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT = 0¶
- SYSTEM_DEFAULT = 0¶
- UNKNOWN = 4¶
- rclpy.qos.QoSDurabilityPolicy¶
alias of
rclpy.qos.DurabilityPolicy
- rclpy.qos.QoSHistoryPolicy¶
alias of
rclpy.qos.HistoryPolicy
- rclpy.qos.QoSLivelinessPolicy¶
alias of
rclpy.qos.LivelinessPolicy
- class rclpy.qos.QoSPolicyEnum(value)¶
Base for QoS Policy enumerations.
Provides helper function to filter keys for utilities.
- classmethod get_from_short_key(name)¶
Retrieve a policy type from a short name, case-insensitive.
- property short_key¶
- classmethod short_keys()¶
Return a list of shortened typing-friendly enum values.
- class rclpy.qos.QoSPolicyKind(value)¶
Enum for types of QoS policies that a Publisher or Subscription can set.
This enum matches the one defined in rmw/incompatible_qos_events_statuses.h
- AVOID_ROS_NAMESPACE_CONVENTIONS = 512¶
- DEADLINE = 4¶
- DEPTH = 128¶
- DURABILITY = 2¶
- HISTORY = 32¶
- INVALID = 1¶
- LIFESPAN = 64¶
- LIVELINESS = 8¶
- LIVELINESS_LEASE_DURATION = 256¶
- RELIABILITY = 16¶
- class rclpy.qos.QoSPresetProfiles(value)¶
An enumeration.
- ACTION_STATUS_DEFAULT = <rclpy.qos.QoSProfile object>¶
Noted that the following are duplicated from QoSPolicyEnum.
Our supported version of Python3 (3.5) doesn’t have a fix that allows mixins on Enum.
- PARAMETERS = <rclpy.qos.QoSProfile object>¶
- PARAMETER_EVENTS = <rclpy.qos.QoSProfile object>¶
- SENSOR_DATA = <rclpy.qos.QoSProfile object>¶
- SERVICES_DEFAULT = <rclpy.qos.QoSProfile object>¶
- SYSTEM_DEFAULT = <rclpy.qos.QoSProfile object>¶
- UNKNOWN = <rclpy.qos.QoSProfile object>¶
- classmethod get_from_short_key(name)¶
Retrieve a policy type from a short name, case-insensitive.
- classmethod short_keys()¶
Return a list of shortened typing-friendly enum values.
- class rclpy.qos.QoSProfile(**kwargs)¶
Define Quality of Service policies.
- property avoid_ros_namespace_conventions¶
Get field ‘avoid_ros_namespace_conventions’.
- Returns
avoid_ros_namespace_conventions attribute
- Return type
bool
- property deadline¶
Get field ‘deadline’.
- Returns
deadline attribute.
- Return type
Duration
- property depth¶
Get field ‘depth’.
- Returns
depth attribute
- Return type
int
- property durability¶
Get field ‘durability’.
- Returns
durability attribute
- Return type
QoSDurabilityPolicy
- get_c_qos_profile()¶
- property history¶
Get field ‘history’.
- Returns
history attribute
- Return type
QoSHistoryPolicy
- property lifespan¶
Get field ‘lifespan’.
- Returns
lifespan attribute
- Return type
Duration
- property liveliness¶
Get field ‘liveliness’.
- Returns
liveliness attribute
- Return type
QoSLivelinessPolicy
- property liveliness_lease_duration¶
Get field ‘liveliness_lease_duration’.
- Returns
liveliness_lease_duration attribute.
- Return type
Duration
- property reliability¶
Get field ‘reliability’.
- Returns
reliability attribute
- Return type
QoSReliabilityPolicy
- rclpy.qos.QoSReliabilityPolicy¶
alias of
rclpy.qos.ReliabilityPolicy
- class rclpy.qos.ReliabilityPolicy(value)¶
Enum for QoS Reliability settings.
This enum matches the one defined in rmw/types.h
- BEST_EFFORT = 2¶
- RELIABLE = 1¶
- RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT = 2¶
- RMW_QOS_POLICY_RELIABILITY_RELIABLE = 1¶
- RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT = 0¶
- RMW_QOS_POLICY_RELIABILITY_UNKNOWN = 3¶
- SYSTEM_DEFAULT = 0¶
- UNKNOWN = 3¶
- rclpy.qos.qos_check_compatible(publisher_qos, subscription_qos)¶
Check if two QoS profiles are compatible.
Two QoS profiles are compatible if a publisher and subscription using the QoS policies can communicate with each other.
If any policies have value “system default” or “unknown” then it is possible that compatibility cannot be determined. In this case, the value QoSCompatibility.WARNING is set as part of the returned structure.
- rclpy.qos.qos_policy_name_from_kind(policy_kind)¶
Get QoS policy name from QoSPolicyKind enum.
- rclpy.qos.qos_profile_action_status_default = <rclpy.qos.QoSProfile object>¶
For actions, using reliable reliability, transient-local durability.
- rclpy.qos.qos_profile_parameter_events = <rclpy.qos.QoSProfile object>¶
For parameter change events. Currently same as the QoS profile for parameters.
- rclpy.qos.qos_profile_parameters = <rclpy.qos.QoSProfile object>¶
For parameter communication. Similar to service QoS profile but with larger queue depth so that requests do not get lost.
- rclpy.qos.qos_profile_sensor_data = <rclpy.qos.QoSProfile object>¶
For sensor data, using best effort reliability and small queue depth
- rclpy.qos.qos_profile_services_default = <rclpy.qos.QoSProfile object>¶
For services, using reliable reliability and volatile durability
- rclpy.qos.qos_profile_system_default = <rclpy.qos.QoSProfile object>¶
Uses the default QoS settings defined in the DDS vendor tool
- rclpy.qos.qos_profile_unknown = <rclpy.qos.QoSProfile object>¶
Used for initialization. Should not be used as the actual QoS profile.