Class Rosbag2QoS

Inheritance Relationships

Base Type

  • public rclcpp::QoS

Class Documentation

class Rosbag2QoS : public rclcpp::QoS

Simple wrapper around rclcpp::QoS to provide a default constructor for YAML deserialization.

Public Functions

inline Rosbag2QoS()
inline explicit Rosbag2QoS(const rclcpp::QoS &value)
inline Rosbag2QoS &default_history()

Public Static Functions

static Rosbag2QoS adapt_request_to_offers(const std::string &topic_name, const std::vector<rclcpp::TopicEndpointInfo> &endpoints)

  • Uses rosbag2_transport defaults for History since they do not affect compatibility.

  • Adapts Durability and Reliability, falling back to the least strict publisher when there is a mixed offer. This behavior errs on the side of forming connections with all publishers.

  • Does not specify Lifespan, Deadline, or Liveliness to be maximally compatible, because these policies do not affect message delivery.

static Rosbag2QoS adapt_offer_to_recorded_offers(const std::string &topic_name, const std::vector<Rosbag2QoS> &profiles)

This logic exists because rosbag2 does not record on a per-publisher basis, so we try to get as close as possible to the original system’s behavior, given a single publisher. If all profiles are the same (excepting History & Lifespan, which are purely local), that exact value is returned. Otherwise, fall back to the rosbag2 default and emit a warning.