35 #include <auterion_sdk/object_detection/image_detections_2d.hpp>
49 using Detections2DCallback = std::function<void(
const ImageDetections2D& image_detections)>;
81 void subscribe(Detections2DCallback callback =
nullptr);
99 std::shared_ptr<class Detections2DSubscriptionImpl> _impl;
152 SDK& sdk,
const std::string& detections_topic =
"object_detection/detections_2d",
153 const std::string& enabled_topic =
"object_detection/detections_2d_enabled");
198 std::shared_ptr<Impl> _impl;
A class for managing subscriptions to 2D object detections.
Definition: object_detection_client.hpp:54
Detections2DSubscription(const std::shared_ptr< class Detections2DSubscriptionImpl > &impl)
Construct a new Detections2DSubscription object.
void onUpdate(Detections2DCallback callback)
Registers a callback function to be called when new detections are received.
bool isLastValid() const
Checks if the last received detections are valid.
void subscribe(Detections2DCallback callback=nullptr)
Activates the subscription process and registers a callback function if provided.
ImageDetections2D last() const
Retrieves the last received detections.
Provides access to 2D object detections from the system.
Definition: object_detection_client.hpp:142
Detections2DSubscription & detections2D() const
Get the detections2D subscription.
void disableObjectDetection()
Publishes a message to disable the object detection service. The publisher will receive this message ...
void enableObjectDetection()
Publishes a message to enable the object detection service. The publisher will receive this message a...
virtual ~ObjectDetectionClient()
Destroy the Object Detection Client object.
ObjectDetectionClient & subscribeDetections2D(Detections2DCallback callback=nullptr)
Subscribe to 2D object detections.
Definition: object_detection_client.hpp:179
ObjectDetectionClient(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 Client object.
SDK execution class. All callbacks are called on the same thread.
Definition: auterion.hpp:47
Contains 2D detections for a specific image.
Definition: image_detections_2d.hpp:44