Class ControllerNode
Defined in File ControllerNode.hpp
Inheritance Relationships
Base Type
public rclcpp_lifecycle::LifecycleNode
Class Documentation
ROS 2 lifecycle node that manages calculating speeds for the Easy Navigation system.
This node provides the interface between the controller module in EasyNav and the ROS 2 ecosystem. It handles lifecycle transitions, real-time scheduling of periodic tasks, and parameter setup.
Public Types
Public Functions
Constructs a ControllerNode lifecycle node with the specified options.
- Parameters:
options – Node options to configure the ControllerNode node.
Destroys the ControllerNode object.
Configures the ControllerNode node. This is typically where parameters and interfaces are declared.
- Parameters:
state – The current lifecycle state.
- Returns:
CallbackReturnT::SUCCESS if configuration is successful.
Activates the ControllerNode node. This starts periodic navigation control cycles.
- Parameters:
state – The current lifecycle state.
- Returns:
CallbackReturnT::SUCCESS if activation is successful.
Deactivates the ControllerNode node. Control loops are stopped and interfaces are disabled.
- Parameters:
state – The current lifecycle state.
- Returns:
CallbackReturnT::SUCCESS if deactivation is successful.
Cleans up the ControllerNode node. Releases resources and resets the internal state.
- Parameters:
state – The current lifecycle state.
- Returns:
CallbackReturnT::SUCCESS indicating cleanup is complete.
Shuts down the ControllerNode node. Called on final shutdown of the node’s lifecycle.
- Parameters:
state – The current lifecycle state.
- Returns:
CallbackReturnT::SUCCESS indicating shutdown is complete.
Handles errors in the ControllerNode node. This is called when a failure occurs during a lifecycle transition.
- Parameters:
state – The current lifecycle state.
- Returns:
CallbackReturnT::SUCCESS indicating error handling is complete.
Returns the real-time callback group.
This callback group can be used to assign callbacks that require low latency or have real-time constraints.
- Returns:
Shared pointer to the real-time callback group.
Executes one cycle of real-time controller logic.
This method is invoked periodically by a high-priority timer and is expected to compute control commands based on the current navigation state and input data.
- Parameters:
nav_state – Shared pointer to the navigation state structure.
- Returns:
Bool value to indicate if trigger subsequent processes