27#ifndef EASYNAV_COMMON_TYPES__DETECTIONSPERCEPTIONS_HPP_
28#define EASYNAV_COMMON_TYPES__DETECTIONSPERCEPTIONS_HPP_
33#include "vision_msgs/msg/detection3_d_array.hpp"
35#include "rclcpp_lifecycle/lifecycle_node.hpp"
57 return t ==
"vision_msgs/msg/Detection3DArray";
61 vision_msgs::msg::Detection3DArray
data;
74 std::string
group()
const override {
return "detections";}
79 std::shared_ptr<PerceptionBase>
create(
const std::string &)
override
81 return std::make_shared<DetectionsPerception>();
96 rclcpp_lifecycle::LifecycleNode & node,
97 const std::string & topic,
98 const std::string & type,
99 std::shared_ptr<PerceptionBase> target,
100 rclcpp::CallbackGroup::SharedPtr cb_group)
override;
110 std::vector<std::shared_ptr<DetectionsPerception>>;
Defines data structures and utilities for representing and processing sensor perceptions.
Definition DetectionsPerception.hpp:47
static bool supports_msg_type(std::string_view t)
Returns whether the given ROS 2 type name is supported by this perception.
Definition DetectionsPerception.hpp:55
static constexpr std::string_view default_group_
Group identifier for image perceptions.
Definition DetectionsPerception.hpp:50
vision_msgs::msg::Detection3DArray data
Detection3DArray data received from the an external processing system.
Definition DetectionsPerception.hpp:61
Handles the creation and updating of DetectionsPerceptions instances from sensor_msgs::msg::Image mes...
Definition DetectionsPerception.hpp:70
std::shared_ptr< PerceptionBase > create(const std::string &) override
Creates a new empty DetectionsPerceptions instance.
Definition DetectionsPerception.hpp:79
std::string group() const override
Returns the group managed by this handler.
Definition DetectionsPerception.hpp:74
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 a target DetectionsPerceptions.
Definition DetectionsPerception.cpp:36
Abstract base class for representing a single sensor perception.
Definition Perceptions.hpp:45
Abstract base interface for group-specific perception handlers.
Definition Perceptions.hpp:121
Definition CircularBuffer.hpp:28
rclcpp::Time get_latest_detections_perceptions_stamp(const DetectionsPerceptions &perceptions)
Retrieves the latest timestamp among a set of detection-based perceptions.
Definition DetectionsPerception.cpp:65
std::vector< std::shared_ptr< DetectionsPerception > > DetectionsPerceptions
Definition DetectionsPerception.hpp:109