35#include <auterion_sdk/object_detection/class_catalog.hpp>
36#include <auterion_sdk/object_detection/image_detections_2d.hpp>
54using ObjectDetectionEnabledCallback = std::function<void(
bool enable)>;
70 const std::shared_ptr<class ObjectDetectionEnabledSubscriptionImpl>& impl);
81 void onUpdate(ObjectDetectionEnabledCallback callback);
91 void subscribe(ObjectDetectionEnabledCallback callback =
nullptr);
109 std::shared_ptr<class ObjectDetectionEnabledSubscriptionImpl> _impl;
287 ObjectDetectionEnabledCallback callback =
nullptr) {
294 std::shared_ptr<Impl> _impl;
Names for the classes a detector reports, for the ground station to display.
Definition class_catalog.hpp:65
A class for managing subscriptions to object detection service state changes.
Definition object_detection_provider.hpp:62
ObjectDetectionEnabledSubscription(const std::shared_ptr< class ObjectDetectionEnabledSubscriptionImpl > &impl)
Construct a new ObjectDetectionEnabledSubscription object.
void subscribe(ObjectDetectionEnabledCallback callback=nullptr)
Activates the subscription process and registers a callback function if provided.
void onUpdate(ObjectDetectionEnabledCallback callback)
Registers a callback function to be called when the object detection enabled state changes.
bool isLastValid() const
Checks if the last received object detection state is valid.
bool last() const
Retrieves the last received object detection enabled state.
Publisher for 2D object detections.
Definition object_detection_provider.hpp:230
void setClassCatalog(const ClassCatalog &catalog)
Replaces the class catalog at runtime, for example after a model switch.
ObjectDetectionEnabledSubscription & objectDetectionEnabledSubscription() const
Get the object detection enabled subscription.
ObjectDetectionProvider & subscribeObjectDetectionEnabled(ObjectDetectionEnabledCallback callback=nullptr)
Subscribe to object detection enabled state changes to control provider operation.
Definition object_detection_provider.hpp:286
virtual ~ObjectDetectionProvider()
Destroy the Object Detection Provider object.
void updateDetections2D(const ImageDetections2D &image_detections)
Publishes 2D object detections.
ObjectDetectionProvider(SDK &sdk, DetectionProviderOptions options={})
Construct a new Object Detection Provider object.
SDK execution class. All callbacks are called on the same thread.
Definition auterion.hpp:119
Configures an ObjectDetectionProvider: where detections go, and their class names.
Definition object_detection_provider.hpp:119
DetectionProviderOptions & withMavlink(bool enable)
Enable or disable the MAVLink detection output.
Definition object_detection_provider.hpp:144
bool mavlink
Send detections to the ground station. A batch without image dimensions is not sent.
Definition object_detection_provider.hpp:122
DetectionProviderOptions & withRos(bool enable)
Enable or disable the ROS detections topic.
Definition object_detection_provider.hpp:131
DetectionProviderOptions & withClassCatalog(ClassCatalog catalog)
Set the class catalog the ground station shows.
Definition object_detection_provider.hpp:156
bool ros
Definition object_detection_provider.hpp:120
ClassCatalog class_catalog
names for the class ids reported; empty is valid
Definition object_detection_provider.hpp:123
2D detections for a single source frame.
Definition image_detections_2d.hpp:50