Auterion App SDK
Auterion SDK is a library that can be used by AuterionOS apps to communicate with the system.
|
Provides access to 2D object detections from the system. More...
#include <auterion_sdk/object_detection/object_detection_client.hpp>
Public Member Functions | |
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. More... | |
virtual | ~ObjectDetectionClient () |
Destroy the Object Detection Client object. | |
ObjectDetectionClient (const ObjectDetectionClient &)=delete | |
ObjectDetectionClient & | operator= (const ObjectDetectionClient &)=delete |
ObjectDetectionClient (ObjectDetectionClient &&)=delete | |
ObjectDetectionClient & | operator= (ObjectDetectionClient &&)=delete |
Detections2DSubscription & | detections2D () const |
Get the detections2D subscription. More... | |
ObjectDetectionClient & | subscribeDetections2D (Detections2DCallback callback=nullptr) |
Subscribe to 2D object detections. More... | |
void | enableObjectDetection () |
Publishes a message to enable the object detection service. The publisher will receive this message and enable the object detection service. | |
void | disableObjectDetection () |
Publishes a message to disable the object detection service. The publisher will receive this message and disable the object detection service. | |
Provides access to 2D object detections from the system.
Example usage:
To register a custom callback on the 2D detections:
To query the latest known 2D detections:
To control the object detection service:
auterion::ObjectDetectionClient::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 | The SDK instance to use for creating clients. |
detections_topic | Topic name for subscribing to 2D detections. |
enabled_topic | Topic name for publishing detection enabled state. |
Detections2DSubscription& auterion::ObjectDetectionClient::detections2D | ( | ) | const |
Get the detections2D subscription.
|
inline |
Subscribe to 2D object detections.
callback | The callback function to be invoked when new detections are received. |