How does ROS2 implement Quality of Services?

asked 2020-11-17 12:51:28 -0500

bishaljais gravatar image

updated 2021-04-19 21:19:02 -0500

M@t gravatar image

I am looking for the code at a low level where ROS2 will implement Quality of Services. For example, if ROS2 implement a History policy, how does it handle the queue at the system level? I want to know how does ROS2 QoS changes the resources parameter and what resources it handles to maintain the QoS.

edit retag flag offensive close merge delete

Comments

1

I don't have a good answer, but I think the answer depends on the rmw(ROS MiddleWare) implementation being used. ROS 2 passes that QoS info down to the middleware, and it's up to it to actually implement it. See https://github.com/ros2/rmw for the API used to interface with the rmw implementations.

There are a bunch of rmw implementations. The default as of ROS Foxy is FastRTPS (aka FastDDS)

sloretz gravatar image sloretz  ( 2020-11-17 19:17:36 -0500 )edit

Thanks for the reply. Can I have some clarification on the types of resources that ROS2 handles for ensuring any sorts of Quality of Service?

bishaljais gravatar image bishaljais  ( 2020-11-18 00:29:54 -0500 )edit
1

For example, if ROS2 implement a History policy, how does it handle the queue at the system level?

"ROS 2" doesn't do any of this. At least not with any of the RMWs currently supported afaik.

It delegates the responsibility of managing and achieving QoS to the underlying middleware(s).

gvdhoorn gravatar image gvdhoorn  ( 2020-11-18 08:51:14 -0500 )edit

I tried looking into the rmw codes. I was expecting a code section that shows the relaying of the QoS parameters to the underlying system. I was only able to find rmw.h file but not rmw.c files. Is't rmw dds open source. I believe the code section showing the relaying of parameters should be available. Do you have any idea regarding this, as there are open source adds too?

bishaljais gravatar image bishaljais  ( 2020-11-24 20:16:59 -0500 )edit

You might have seen the header files inhttps://github.com/ros2/rmw. Each RMW implementation implements the things in those headers. For example, rmw_create_service() is defined in rmw, and here it is implemented by rmw_fastrtps_cpp while here it is implemented by rmw_cyclonedds_cpp.

sloretz gravatar image sloretz  ( 2020-12-03 11:29:43 -0500 )edit