Easy Navigation
|
Abstract base interface for group-specific perception handlers. More...
#include <Perceptions.hpp>
Public Member Functions | |
virtual std::shared_ptr< PerceptionBase > | create (const std::string &sensor_id)=0 |
Creates a new instance of a perception object managed by this handler. | |
virtual 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)=0 |
Creates a subscription that processes messages into PerceptionBase instances. | |
virtual std::string | group () const =0 |
Returns the group identifier associated with this handler. | |
virtual | ~PerceptionHandler ()=default |
Abstract base interface for group-specific perception handlers.
Each handler is responsible for a sensor group (e.g., "points", "image", "dummy"). It creates appropriate PerceptionBase
instances and handles the conversion from ROS messages.
|
virtualdefault |
|
pure virtual |
Creates a new instance of a perception object managed by this handler.
sensor_id | Name or ID of the sensor (optional use by handler). |
Implemented in DummyHandler, ImagePerceptionHandler, and PointPerceptionHandler.
|
pure virtual |
Creates a subscription that processes messages into PerceptionBase instances.
The handler is expected to parse the message received on topic
of type type
and store the result in the target
.
node | Reference to the lifecycle node used for creating the subscription. |
topic | Topic name to subscribe to. |
type | Type name of the ROS message (e.g., "sensor_msgs/msg/LaserScan"). |
target | Atomic shared pointer where perception results are stored. |
cb_group | Callback group where the subscription callback will be executed. |
Implemented in DummyHandler, ImagePerceptionHandler, and PointPerceptionHandler.
|
pure virtual |
Returns the group identifier associated with this handler.
This identifier is used to match sensors to the appropriate handler. Example: "points", "image", "dummy".
Implemented in DummyHandler, ImagePerceptionHandler, and PointPerceptionHandler.