Easy Navigation
Loading...
Searching...
No Matches
LocalizerNode Class Reference

ROS 2 lifecycle node that manages localization in Easy Navigation. More...

#include <LocalizerNode.hpp>

Inheritance diagram for LocalizerNode:
Collaboration diagram for LocalizerNode:

Public Types

using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
 

Public Member Functions

void cycle (std::shared_ptr< NavState > nav_state)
 Run a non-real-time localization cycle.
 
bool cycle_rt (std::shared_ptr< NavState > nav_state, bool trigger=false)
 Run a real-time localization cycle.
 
rclcpp::CallbackGroup::SharedPtr get_real_time_cbg ()
 Get the callback group for real-time execution.
 
 LocalizerNode (const rclcpp::NodeOptions &options=rclcpp::NodeOptions())
 Constructor.
 
CallbackReturnT on_activate (const rclcpp_lifecycle::State &state)
 Activate the node.
 
CallbackReturnT on_cleanup (const rclcpp_lifecycle::State &state)
 Clean up the node.
 
CallbackReturnT on_configure (const rclcpp_lifecycle::State &state)
 Configure the node.
 
CallbackReturnT on_deactivate (const rclcpp_lifecycle::State &state)
 Deactivate the node.
 
CallbackReturnT on_error (const rclcpp_lifecycle::State &state)
 Handle lifecycle error transition.
 
CallbackReturnT on_shutdown (const rclcpp_lifecycle::State &state)
 Shutdown the node.
 
 ~LocalizerNode ()
 Destructor.
 

Detailed Description

ROS 2 lifecycle node that manages localization in Easy Navigation.

Handles lifecycle transitions, dynamic loading of the localization plugin, and periodic update execution in real-time or non-real-time contexts.

Member Typedef Documentation

◆ CallbackReturnT

using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn

Constructor & Destructor Documentation

◆ LocalizerNode()

LocalizerNode ( const rclcpp::NodeOptions & options = rclcpp::NodeOptions())
explicit

Constructor.

Parameters
optionsOptional node configuration.

◆ ~LocalizerNode()

Destructor.

Member Function Documentation

◆ cycle()

void cycle ( std::shared_ptr< NavState > nav_state)

Run a non-real-time localization cycle.

Parameters
nav_stateShared pointer to the navigation state structure.

◆ cycle_rt()

bool cycle_rt ( std::shared_ptr< NavState > nav_state,
bool trigger = false )

Run a real-time localization cycle.

Parameters
nav_stateShared pointer to the navigation state structure.
triggerOptional override to force execution.
Returns
True if plugin update was executed.

◆ get_real_time_cbg()

rclcpp::CallbackGroup::SharedPtr get_real_time_cbg ( )

Get the callback group for real-time execution.

Returns
Shared pointer to the callback group.

◆ on_activate()

CallbackReturnT on_activate ( const rclcpp_lifecycle::State & state)

Activate the node.

Parameters
stateLifecycle state.
Returns
SUCCESS if activation succeeded.

◆ on_cleanup()

CallbackReturnT on_cleanup ( const rclcpp_lifecycle::State & state)

Clean up the node.

Parameters
stateLifecycle state.
Returns
SUCCESS if cleanup succeeded.

◆ on_configure()

CallbackReturnT on_configure ( const rclcpp_lifecycle::State & state)

Configure the node.

Parameters
stateLifecycle state.
Returns
SUCCESS if configuration succeeded.

◆ on_deactivate()

CallbackReturnT on_deactivate ( const rclcpp_lifecycle::State & state)

Deactivate the node.

Parameters
stateLifecycle state.
Returns
SUCCESS if deactivation succeeded.

◆ on_error()

CallbackReturnT on_error ( const rclcpp_lifecycle::State & state)

Handle lifecycle error transition.

Parameters
stateLifecycle state.
Returns
SUCCESS after handling error.

◆ on_shutdown()

CallbackReturnT on_shutdown ( const rclcpp_lifecycle::State & state)

Shutdown the node.

Parameters
stateLifecycle state.
Returns
SUCCESS if shutdown succeeded.

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