ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How does ROS2 select the default QoS profile ?

asked 2018-07-25 06:37:44 -0600

aks gravatar image

I have a ROS2 based python code, which mentions nothing about the QoS Settings. I assume that it must be taking some default profile.

How can I view this default profile ? I mean where is the source of this profile ? Is it xml based ? Can I also edit it ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-07-25 07:37:54 -0600

dhood gravatar image

The defaults are defined here in rmw, and are described here. The default profiles are wrapped accordingly in rclpy (example), or you can customise the QoS settings like this. Some RMW implementations support xml file configuration in which case the rmw_qos_profile_system_default profile can be used to pass through to that configuration.

edit flag offensive delete link more


Thanks for the quick explanation @dhood. One question : If nothing at all is mentioned in the code(about QoS settings), e.g., does it always use the default QoS or does it mean that it doesnt use any QoS in this case ?

aks gravatar image aks  ( 2018-07-25 07:48:42 -0600 )edit

without it being specified, pub/sub will use the profile rmw_qos_profile_default, services will use rmw_qos_profile_services_default, etc.

dhood gravatar image dhood  ( 2018-07-25 15:59:17 -0600 )edit

which doers rviz use? I am assuming rmw_qos_profile_default, I have a lidar for example where the points are invisible unless i manually change the QoS to best effort.

morten gravatar image morten  ( 2021-10-22 09:16:20 -0600 )edit

answered 2021-11-18 12:54:44 -0600

AndyZe gravatar image

For those who are lazy like myself, plus it's not really covered in the tutorials, here's how you specify the QoS for a topic subscription.

  twist_stamped_sub_ =
                                                                   std::bind(&ServoCalcs::twistStampedCB, this, _1));
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-07-25 06:37:44 -0600

Seen: 3,337 times

Last updated: Nov 18 '21