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

ROS 2 lifecycle node that manages sensor fusion in Easy Navigation. More...

#include <SensorsNode.hpp>

Inheritance diagram for SensorsNode:
Collaboration diagram for SensorsNode:

Public Types

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

Public Member Functions

void cycle (std::shared_ptr< NavState > nav_state)
 Run one non-real-time processing cycle.
bool cycle_rt (std::shared_ptr< NavState > nav_state, bool trigger=false)
 Run one real-time sensor processing cycle.
rclcpp::CallbackGroup::SharedPtr get_real_time_cbg ()
 Get the callback group for real-time tasks.
CallbackReturnT on_activate (const rclcpp_lifecycle::State &state)
 Activate the node.
CallbackReturnT on_cleanup (const rclcpp_lifecycle::State &state)
 Cleanup 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 transition errors.
CallbackReturnT on_shutdown (const rclcpp_lifecycle::State &state)
 Shutdown the node.
 SensorsNode (const rclcpp::NodeOptions &options=rclcpp::NodeOptions())
 Constructor.
 ~SensorsNode ()
 Destructor.

Protected Attributes

std::map< std::string, std::vector< std::string > > groups_
 Sensor groups (set as group of keys in the NavState).
std::vector< std::shared_ptr< PerceptionHandler > > handler_list_
 vector of PerceptionHandler instances

Detailed Description

ROS 2 lifecycle node that manages sensor fusion in Easy Navigation.

Collects, transforms, and publishes fused perception data from multiple sources. Sensor handlers are loaded at runtime as pluginlib plugins, allowing users to add new sensor types without modifying this node.

Member Typedef Documentation

◆ CallbackReturnT

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

Constructor & Destructor Documentation

◆ SensorsNode()

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

Constructor.

Parameters
optionsNode configuration options.

◆ ~SensorsNode()

Destructor.

Member Function Documentation

◆ cycle()

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

Run one non-real-time processing cycle.

◆ cycle_rt()

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

Run one real-time sensor processing cycle.

Parameters
triggerForce execution regardless of frequency.
Returns
True if cycle executed.

◆ get_real_time_cbg()

rclcpp::CallbackGroup::SharedPtr get_real_time_cbg ( )

Get the callback group for real-time tasks.

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)

Cleanup 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 transition errors.

Parameters
stateLifecycle state.
Returns
SUCCESS if error was handled.

◆ on_shutdown()

CallbackReturnT on_shutdown ( const rclcpp_lifecycle::State & state)

Shutdown the node.

Parameters
stateLifecycle state.
Returns
SUCCESS if shutdown succeeded.

Member Data Documentation

◆ groups_

std::map<std::string, std::vector<std::string> > groups_
protected

Sensor groups (set as group of keys in the NavState).

◆ handler_list_

std::vector<std::shared_ptr<PerceptionHandler> > handler_list_
protected

vector of PerceptionHandler instances


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