I am a beginner with ROS2 and C++ and I can use some help understanding how the architecture of ROS 2 works. I want to implement a QoS-event into a simple chatter program and with my basic knowledge I can make following graph:
CODE (publisher.cpp) ==> RCLCPP(qos_event.cpp) this includes (qos_event.hpp) ==> RCL (event.c) this includes (event.h) ==> RMW (event.c) this includes (event.h) ==> DDS
I have the following questions:
If I understand it right, header files are used as some kind of library. So if you include them in your program you can use all the functions you want. This means I don't need to use this code in my program but I only need to implement those functions? Are the following files: qos_event.cpp / rcl event.c / rmw event.c examples of code that I can use into my own program?
The Quality of Service (QoS) settings are declared in the Ros middleware (rmw). If I want to use one of those events, can I just directly use the rmw/event.h header file or do I need to respect the architecture and is it only possible to implement rclcpp code in your program?