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

Handles the creation and updating of DetectionsPerceptions instances from sensor_msgs::msg::Image messages. More...

#include <DetectionsPerception.hpp>

Inheritance diagram for DetectionsPerceptionsHandler:
Collaboration diagram for DetectionsPerceptionsHandler:

Public Member Functions

bool cycle_rt (std::shared_ptr< NavState > nav_state) override
 Run one real-time sensor processing cycle.
void on_initialize () override
 Optional post-initialization hook for subclasses.
Public Member Functions inherited from PerceptionHandler
const std::string & get_sensor_name () const
 Returns the sensor name provided during initialize.
void initialize (const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node, const rclcpp::CallbackGroup::SharedPtr realtime_cbg, const std::string &sensor_name)
 Initializes the handler with the parent node and sensor name.
virtual ~PerceptionHandler ()=default

Additional Inherited Members

Protected Member Functions inherited from PerceptionHandler
std::shared_ptr< rclcpp_lifecycle::LifecycleNode > get_node () const
 Returns the parent lifecycle node.
rclcpp::CallbackGroup::SharedPtr get_realtime_cbg () const
 Returns the parent lifecycle node.
Protected Attributes inherited from PerceptionHandler
std::weak_ptr< rclcpp_lifecycle::LifecycleNode > parent_node_
 Shared pointer to the parent lifecycle node.
rclcpp::CallbackGroup::SharedPtr realtime_cbg_
 Callback group for real-time operations.
std::string sensor_name_
 Name of the sensor (used as YAML parameter namespace prefix).

Detailed Description

Handles the creation and updating of DetectionsPerceptions instances from sensor_msgs::msg::Image messages.

This class provides methods to register subscriptions to image topics, decode incoming messages into cv::Mat using cv_bridge, and update target DetectionsPerceptions instances.

Member Function Documentation

◆ cycle_rt()

bool cycle_rt ( std::shared_ptr< NavState > nav_state)
overridevirtual

Run one real-time sensor processing cycle.

This method is called by the SensorsNode before executing its cycle_rt. Here the handler should update the NavState with the sensor data. If new data arrived before this call and the state is updated, it must return true.

Parameters
nav_statePointer to the NavState to store the sensor data.
Returns
True if new data was stored (to trigger processing).

Reimplemented from PerceptionHandler.

◆ on_initialize()

void on_initialize ( )
overridevirtual

Optional post-initialization hook for subclasses.

Here, the handler must reserve memory to store the perception data and create any Subscription or similar objects to read the data.

Reimplemented from PerceptionHandler.


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