35#include <auterion_sdk/object_detection/image_detections_2d.hpp>
52using ObjectDetectionEnabledCallback = std::function<void(
bool enable)>;
68 const std::shared_ptr<class ObjectDetectionEnabledSubscriptionImpl>& impl);
79 void onUpdate(ObjectDetectionEnabledCallback callback);
89 void subscribe(ObjectDetectionEnabledCallback callback =
nullptr);
107 std::shared_ptr<class ObjectDetectionEnabledSubscriptionImpl> _impl;
187 SDK& sdk,
const std::string& detections_topic =
"object_detection/detections_2d",
188 const std::string& enabled_topic =
"object_detection/detections_2d_enabled");
226 ObjectDetectionEnabledCallback callback =
nullptr) {
233 std::shared_ptr<Impl> _impl;
A class for managing subscriptions to object detection service state changes.
Definition object_detection_provider.hpp:60
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:177
ObjectDetectionEnabledSubscription & objectDetectionEnabledSubscription() const
Get the object detection enabled subscription.
ObjectDetectionProvider(SDK &sdk, const std::string &detections_topic="object_detection/detections_2d", const std::string &enabled_topic="object_detection/detections_2d_enabled")
Construct a new Object Detection Provider object.
ObjectDetectionProvider & subscribeObjectDetectionEnabled(ObjectDetectionEnabledCallback callback=nullptr)
Subscribe to object detection enabled state changes to control provider operation.
Definition object_detection_provider.hpp:225
virtual ~ObjectDetectionProvider()
Destroy the Object Detection Provider object.
void updateDetections2D(const ImageDetections2D &image_detections)
Publishes 2D object detections.
SDK execution class. All callbacks are called on the same thread.
Definition auterion.hpp:97
Contains 2D detections for a specific image.
Definition image_detections_2d.hpp:44