Inferensys

Glossary

ROS 2 Parameter Event

A ROS 2 Parameter Event is a notification published by the parameter service when a parameter's value is changed, allowing nodes to dynamically reconfigure their behavior in response to runtime configuration updates.
Compute infrastructure aisle representing runtime, scale, and model serving.
ROBOT OPERATING SYSTEM (ROS)

What is ROS 2 Parameter Event?

A ROS 2 Parameter Event is a notification published by the parameter service when a parameter's value is changed, allowing nodes to dynamically reconfigure their behavior in response to runtime configuration updates.

A ROS 2 Parameter Event is a structured notification message published by the ROS 2 parameter service whenever a node's parameter is set, changed, or deleted. This event-driven mechanism enables other nodes in the system to subscribe and react to configuration changes in real-time, facilitating dynamic system reconfiguration without requiring node restarts. The event message contains details about the parameter's name, its new value, and the type of change that occurred.

This architecture is central to building modular and adaptive robotic systems. By subscribing to parameter events, nodes can implement callback functions that immediately adjust their internal algorithms, control gains, or operational modes. This pattern is essential for runtime tuning, fault recovery, and implementing higher-level system managers that orchestrate complex behaviors through centralized parameter updates across the ROS 2 graph.

ROS 2 PARAMETER EVENT

Key Features of Parameter Events

ROS 2 Parameter Events are the primary mechanism for dynamic runtime reconfiguration, enabling nodes to react to changes in system settings without restarting. This notification system is fundamental for building adaptable and resilient robotic software.

02

Atomic Batched Updates

When multiple parameters are set within a single service call (e.g., via node->set_parameters(...)), ROS 2 batches these changes into a single atomic parameter event. This ensures that subscribers see a consistent state—all updates in the batch are applied and announced together. This prevents nodes from observing an intermediate, potentially invalid, configuration state, which is critical for maintaining system coherence during complex reconfiguration operations.

04

Global Event Monitoring

Any node can subscribe to the global /parameter_events topic to monitor changes to parameters across the entire ROS graph, not just its own. This enables system-wide observability and coordination. For example, a monitoring node could log all configuration changes for audit trails, or a dashboard could update its UI in real-time. This global view is powered by the underlying DDS discovery, allowing events to be tracked across different processes and machines.

05

Integration with Lifecycle Nodes

For managed components, parameter events are tightly integrated with the ROS 2 Lifecycle Node state machine. A lifecycle node typically reads its parameters during the on_configure transition. Subsequently, parameter event callbacks allow for dynamic reconfiguration while the node is in the ACTIVE state, enabling tuning and adaptation during live operation. The node must ensure thread safety between its primary processing callbacks and its parameter callback to avoid race conditions.

06

Quality of Service (QoS) Configuration

The reliability and durability of parameter events can be configured using ROS 2 Quality of Service (QoS) policies. By default, the parameter event topic uses RELIABLE reliability and VOLATILE durability, ensuring all current subscribers receive notifications but new subscribers do not get historical changes. For critical systems, this can be tuned. For instance, using TRANSIENT_LOCAL durability would allow a late-joining monitoring node to receive the last known parameter values immediately upon discovery.

ROS 2 PARAMETER EVENT

Frequently Asked Questions

A ROS 2 Parameter Event is a core mechanism for dynamic system configuration. It enables nodes to react to runtime changes in configuration values, a fundamental requirement for adaptable and manageable robotic systems.

A ROS 2 Parameter Event is a structured notification message published by the ROS 2 parameter service whenever a parameter's value is changed, deleted, or set for the first time. It is the primary mechanism for dynamic reconfiguration, allowing nodes to subscribe to these events and adjust their behavior in real-time without restarting. This decouples configuration logic from core algorithm code, enabling more modular and manageable robotic software.

When a node declares a parameter, it can optionally provide a callback function. The ROS 2 Client Library (RCL) invokes this callback, passing the ParameterEvent message, whenever a matching parameter change is detected. The event message contains detailed metadata, including the node name, the list of changed parameters, their new values, and the type of change (e.g., PARAMETER_CHANGED, PARAMETER_DELETED). This design is central to the ROS 2 architecture, which emphasizes runtime flexibility and introspection.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.