How does ROS2 implement Quality of Services?
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.
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 thermw
implementations.There are a bunch of rmw implementations. The default as of ROS Foxy is FastRTPS (aka FastDDS)
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?
"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).
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?
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 byrmw_cyclonedds_cpp
.