Class QoS
Defined in File qos.hpp
Inheritance Relationships
Derived Types
public rclcpp::BestAvailableQoS
(Class BestAvailableQoS)public rclcpp::ClockQoS
(Class ClockQoS)public rclcpp::ParameterEventsQoS
(Class ParameterEventsQoS)public rclcpp::ParametersQoS
(Class ParametersQoS)public rclcpp::RosoutQoS
(Class RosoutQoS)public rclcpp::SensorDataQoS
(Class SensorDataQoS)public rclcpp::ServicesQoS
(Class ServicesQoS)public rclcpp::SystemDefaultsQoS
(Class SystemDefaultsQoS)
Class Documentation
-
class QoS
Encapsulation of Quality of Service settings.
Quality of Service settings control the behavior of publishers, subscriptions, and other entities, and includes things like how data is sent or resent, how data is buffered on the publishing and subscribing side, and other things. See: https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html
Subclassed by rclcpp::BestAvailableQoS, rclcpp::ClockQoS, rclcpp::ParameterEventsQoS, rclcpp::ParametersQoS, rclcpp::RosoutQoS, rclcpp::SensorDataQoS, rclcpp::ServicesQoS, rclcpp::SystemDefaultsQoS
Public Functions
-
explicit QoS(const QoSInitialization &qos_initialization, const rmw_qos_profile_t &initial_profile = rmw_qos_profile_default)
Create a QoS by specifying only the history policy and history depth.
When using the default initial profile, the defaults will include:
See rmw_qos_profile_default for a full list of default settings. If some other rmw_qos_profile_t is passed to initial_profile, then the defaults will derive from that profile instead.
- Parameters:
qos_initialization – [in] Specifies history policy and history depth.
initial_profile – [in] The rmw_qos_profile_t instance on which to base the default settings.
-
QoS(size_t history_depth)
Conversion constructor to ease construction in the common case of just specifying depth.
This is a convenience constructor that calls QoS(KeepLast(history_depth)).
- Parameters:
history_depth – [in] How many messages can be queued when publishing with a Publisher, or how many messages can be queued before being replaced by a Subscription.
-
rmw_qos_profile_t &get_rmw_qos_profile()
Return the rmw qos profile.
-
const rmw_qos_profile_t &get_rmw_qos_profile() const
Return the rmw qos profile.
-
QoS &history(HistoryPolicy history)
Set the history policy.
-
QoS &reliability(ReliabilityPolicy reliability)
Set the reliability setting.
-
QoS &durability(DurabilityPolicy durability)
Set the durability setting.
-
QoS &durability_volatile()
Set the durability setting to volatile.
Note that this cannot be named
volatile
because it is a C++ keyword.
-
QoS &deadline(const rclcpp::Duration &deadline)
Set the deadline setting, rclcpp::Duration.
-
QoS &lifespan(const rclcpp::Duration &lifespan)
Set the lifespan setting, rclcpp::Duration.
-
QoS &liveliness(LivelinessPolicy liveliness)
Set the liveliness setting.
-
QoS &liveliness_lease_duration(rmw_time_t liveliness_lease_duration)
Set the liveliness_lease_duration setting.
-
QoS &liveliness_lease_duration(const rclcpp::Duration &liveliness_lease_duration)
Set the liveliness_lease_duration setting, rclcpp::Duration.
-
QoS &avoid_ros_namespace_conventions(bool avoid_ros_namespace_conventions)
Set the avoid_ros_namespace_conventions setting.
-
HistoryPolicy history() const
Get the history qos policy.
-
size_t depth() const
Get the history depth.
-
ReliabilityPolicy reliability() const
Get the reliability policy.
-
DurabilityPolicy durability() const
Get the durability policy.
-
LivelinessPolicy liveliness() const
Get the liveliness policy.
-
bool avoid_ros_namespace_conventions() const
Get the
avoid ros namespace convention
setting.
-
explicit QoS(const QoSInitialization &qos_initialization, const rmw_qos_profile_t &initial_profile = rmw_qos_profile_default)