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

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

#include <ImagePerception.hpp>

Inheritance diagram for ImagePerceptionHandler:
Collaboration diagram for ImagePerceptionHandler:

Public Member Functions

std::shared_ptr< PerceptionBasecreate (const std::string &) override
 Creates a new empty ImagePerception instance.
 
rclcpp::SubscriptionBase::SharedPtr create_subscription (rclcpp_lifecycle::LifecycleNode &node, const std::string &topic, const std::string &type, std::shared_ptr< PerceptionBase > target, rclcpp::CallbackGroup::SharedPtr cb_group) override
 Creates a subscription to an image topic that updates an perception.
 
std::string group () const override
 Returns the group name this handler manages ("image").
 
- Public Member Functions inherited from PerceptionHandler
virtual ~PerceptionHandler ()=default
 

Detailed Description

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

This class provides methods to register subscriptions to image topics, decode the messages into OpenCV images, and populate ImagePerception objects using shared pointers.

Member Function Documentation

◆ create()

std::shared_ptr< PerceptionBase > create ( const std::string & )
overridevirtual

Creates a new empty ImagePerception instance.

Parameters
sensor_idName or ID of the sensor (unused here, but available for future extensions).
Returns
Shared pointer to the new ImagePerception.

Implements PerceptionHandler.

◆ create_subscription()

rclcpp::SubscriptionBase::SharedPtr create_subscription ( rclcpp_lifecycle::LifecycleNode & node,
const std::string & topic,
const std::string & type,
std::shared_ptr< PerceptionBase > target,
rclcpp::CallbackGroup::SharedPtr cb_group )
overridevirtual

Creates a subscription to an image topic that updates an perception.

Parameters
nodeReference to the lifecycle node used for subscription creation.
topicTopic name to subscribe to.
typeROS message type as a string (must be "sensor_msgs/msg/Image").
targetAtomic pointer to store the resulting ImagePerception.
cb_groupCallback group to assign the subscription to.
Returns
Shared pointer to the created subscription.

Implements PerceptionHandler.

◆ group()

std::string group ( ) const
overridevirtual

Returns the group name this handler manages ("image").

Returns
The group identifier: "image".

Implements PerceptionHandler.


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