How ros2/rmw works
Main Components
a. Core RMW Interface Layer
• Main API components visible in the include/rmw directory
• Related functionality into logical subsystems:
• Initialization & Configuration (init.h, init_options.h)
• Communication Primitives (publisher_options.h, subscription_options.h)
• QoS Management (qos_profiles.h, qos_policy_kind.h)
• Error Handling (error_handling.h, ret_types.h)
• Resource Management (allocators.h)
b. Implementation Support Layer
• This below the core interface
• Rmw_implementation_cmake component
• How it enables multiple RMW implementations
c. Validation & Security Layer
• Validation-related components (validate_namespace.h, validate_node_name.h)
• Security_options components
Component Relationships
• How the implementation support layer connects to potential RMW implementations
• Dependency flow from high-level APIs to lower-level components
• Relationship between QoS management and communication primitives
• How security and validation components interact with other parts
Specific Design Elements
Use the following visual elements:
• Blue rectangles for core API components
• Green rectangles for implementation support
• Yellow rectangles for validation and security
• Red rectangles for error handling
• Purple rectangles for resource management
Layer Organization
Top to bottom:
Important Details to Capture
• Event handling system (event.h, event_callback_type.h)
• QoS management system
• Security features
• Resource management
• Implementation flexibility
Left side:
• Core API components
• Type support
• Message handling
Center:
• Implementation abstraction
• Core middleware functionality
Right side:
• Security and validation
• Resource management
• Error handling