Skip to content

Improved docstring for get_rmw_qos_profile() #2777

@abhishek47kashyap

Description

@abhishek47kashyap

The current docstrings for get_rmw_qos_profile() don't provide any more information than the obvious. How to make them better? I know next to nothing about middlewares, but I'm happy to submit improvements if they are welcome.

/// Return the rmw qos profile.
rmw_qos_profile_t &
get_rmw_qos_profile();
/// Return the rmw qos profile.
const rmw_qos_profile_t &
get_rmw_qos_profile() const;


(my) Motivation: I was going through the tutorial on Approximate Time Synchronizer and noticed these lines:

  rclcpp::QoS qos = rclcpp::QoS(10);
  temp_pub = this->create_publisher<sensor_msgs::msg::Temperature>("temp", qos);
  fluid_pub = this->create_publisher<sensor_msgs::msg::FluidPressure>("fluid", qos);

  temp_sub.subscribe(this, "temp", qos.get_rmw_qos_profile());
  fluid_sub.subscribe(this, "fluid", qos.get_rmw_qos_profile());

I wanted to find out more on get_rmw_qos_profile and found the docstring not telling me much. The documentation is not more informative either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions