28#ifndef EASYNAV_COMMON_TYPES__PERCEPTIONS_HPP_
29#define EASYNAV_COMMON_TYPES__PERCEPTIONS_HPP_
33#include "sensor_msgs/msg/laser_scan.hpp"
34#include "sensor_msgs/msg/point_cloud2.hpp"
36#include "pcl/point_cloud.h"
37#include "pcl/point_types.h"
39#include "rclcpp/time.hpp"
40#include "rclcpp_lifecycle/lifecycle_node.hpp"
94 virtual std::shared_ptr<PerceptionBase>
create(
const std::string & sensor_id) = 0;
108 rclcpp_lifecycle::LifecycleNode & node,
109 const std::string & topic,
110 const std::string & type,
111 std::shared_ptr<PerceptionBase> target,
112 rclcpp::CallbackGroup::SharedPtr cb_group) = 0;
120 virtual std::string
group()
const = 0;
Abstract base class for representing a single sensor perception.
Definition Perceptions.hpp:50
virtual ~PerceptionBase()=default
bool valid
Whether the perception contains valid data.
Definition Perceptions.hpp:61
rclcpp::Time stamp
Timestamp of the perception (ROS time).
Definition Perceptions.hpp:55
bool new_data
Whether the data has changed since the last observation.
Definition Perceptions.hpp:64
std::string frame_id
Coordinate frame associated with the perception.
Definition Perceptions.hpp:58
Abstract base interface for group-specific perception handlers.
Definition Perceptions.hpp:87
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 ~PerceptionHandler()=default
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.
Definition RTTFBuffer.hpp:30
Represents a perception entry with its state and ROS subscription.
Definition Perceptions.hpp:73
rclcpp::SubscriptionBase::SharedPtr subscription
ROS 2 subscription to the sensor topic that provides data.
Definition Perceptions.hpp:78
std::shared_ptr< PerceptionBase > perception
Atomic shared pointer to the current perception object.
Definition Perceptions.hpp:75