Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
nav2_rotation_shim_controller::ParameterHandler Class Reference

Handles parameters and dynamic parameters for Rotation Shim. More...

#include <nav2_rotation_shim_controller/include/nav2_rotation_shim_controller/parameter_handler.hpp>

Inheritance diagram for nav2_rotation_shim_controller::ParameterHandler:
Inheritance graph
[legend]
Collaboration diagram for nav2_rotation_shim_controller::ParameterHandler:
Collaboration graph
[legend]

Public Member Functions

 ParameterHandler (const nav2::LifecycleNode::SharedPtr &node, std::string &plugin_name, rclcpp::Logger &logger)
 Constructor for nav2_rotation_shim_controller::ParameterHandler.
 
- Public Member Functions inherited from nav2_util::ParameterHandler< Parameters >
 ParameterHandler (const nav2::LifecycleNode::SharedPtr &node, const rclcpp::Logger &logger)
 Constructor for nav2_util::ParameterHandler.
 
virtual ~ParameterHandler ()=default
 Destructor for nav2_util::ParameterHandler.
 
std::mutex & getMutex ()
 Get the internal mutex used for thread-safe parameter access. More...
 
Parameters * getParams ()
 Get a pointer to the internal parameter structure. More...
 
void activate ()
 Registers callbacks for dynamic parameter handling.
 
void deactivate ()
 Resets callbacks for dynamic parameter handling.
 

Protected Member Functions

void updateParametersCallback (const std::vector< rclcpp::Parameter > &parameters) override
 Apply parameter updates after validation This callback is executed when parameters have been successfully updated. It updates the internal configuration of the node with the new parameter values. More...
 
rcl_interfaces::msg::SetParametersResult validateParameterUpdatesCallback (const std::vector< rclcpp::Parameter > &parameters) override
 Validate incoming parameter updates before applying them. This callback is triggered when one or more parameters are about to be updated. It checks the validity of parameter values and rejects updates that would lead to invalid or inconsistent configurations. More...
 

Protected Attributes

std::string plugin_name_
 
- Protected Attributes inherited from nav2_util::ParameterHandler< Parameters >
nav2::LifecycleNode::WeakPtr node_
 
std::mutex mutex_
 
Parameters params_
 
rclcpp::Logger logger_
 
rclcpp::node_interfaces::PostSetParametersCallbackHandle::SharedPtr post_set_params_handler_
 
rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr on_set_params_handler_
 

Detailed Description

Handles parameters and dynamic parameters for Rotation Shim.

Definition at line 53 of file parameter_handler.hpp.

Member Function Documentation

◆ updateParametersCallback()

void nav2_rotation_shim_controller::ParameterHandler::updateParametersCallback ( const std::vector< rclcpp::Parameter > &  parameters)
overrideprotectedvirtual

Apply parameter updates after validation This callback is executed when parameters have been successfully updated. It updates the internal configuration of the node with the new parameter values.

Parameters
parametersList of parameters that have been updated.

Implements nav2_util::ParameterHandler< Parameters >.

Definition at line 112 of file parameter_handler.cpp.

◆ validateParameterUpdatesCallback()

rcl_interfaces::msg::SetParametersResult nav2_rotation_shim_controller::ParameterHandler::validateParameterUpdatesCallback ( const std::vector< rclcpp::Parameter > &  parameters)
overrideprotectedvirtual

Validate incoming parameter updates before applying them. This callback is triggered when one or more parameters are about to be updated. It checks the validity of parameter values and rejects updates that would lead to invalid or inconsistent configurations.

Parameters
parametersList of parameters that are being updated.
Returns
rcl_interfaces::msg::SetParametersResult Result indicating whether the update is accepted.

Implements nav2_util::ParameterHandler< Parameters >.

Definition at line 81 of file parameter_handler.cpp.


The documentation for this class was generated from the following files: