Loading...
Searching...
No Matches
pstsdk_c.h
Go to the documentation of this file.
1// Copyright PS-Tech B.V. All Rights Reserved.
2#pragma once
3
4#if (defined(_WIN32) || defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__))
5# ifdef pstsdk_c_EXPORTS
6# define PST_C_EXPORT __declspec(dllexport)
7# else
8# define PST_C_EXPORT __declspec(dllimport)
9# endif
10#else
11# define PST_C_EXPORT
12#endif
13
14#ifdef __cplusplus
15 extern "C" {
16#else
17#include <stdbool.h>
18#include <stddef.h>
19#endif
20
37
43 typedef enum EPstErrorStatus
44{
45 PST_ERROR_STATUS_OK = 0,
46 PST_ERROR_STATUS_TRACKER_ERROR = 1,
47 PST_ERROR_STATUS_NOT_INITIALIZED_ERROR = 2,
48 PST_ERROR_STATUS_NOT_SUPPORTED_ERROR = 3,
49 PST_ERROR_STATUS_OUT_OF_RANGE_ERROR = 4,
50 PST_ERROR_STATUS_NOT_FOUND_ERROR = 5,
51 PST_ERROR_STATUS_HTTP_ERROR = 6,
52 PST_ERROR_STATUS_FAILED_TO_ALLOCATE_MEMORY_ERROR = 7,
53 PST_ERROR_STATUS_NULLPTR_ERROR = 8,
54 PST_ERROR_STATUS_IMAGE_RETRIEVAL_FAILED_ERROR = 9,
55 PST_ERROR_STATUS_INVALID_DATA_ERROR = 10,
56 PST_ERROR_STATUS_ALREADY_EXISTS_ERROR = 11,
57 PST_ERROR_STATUS_JSON_PARSING_ERROR = 12,
58
59} EPstErrorStatus;
60
68 typedef enum EPstStatusMessage
69{
70 PST_STATUSMESSAGE_OK = 0,
71 PST_STATUSMESSAGE_NOT_INITIALIZED = 1,
72 PST_STATUSMESSAGE_DISCONNECTED = 2,
73 PST_STATUSMESSAGE_ERR_GENERAL = 3,
74 PST_STATUSMESSAGE_ERR_TIMEOUT = 4,
75 PST_STATUSMESSAGE_ERR_NOCAMS_FOUND = 5,
76 PST_STATUSMESSAGE_ERR_NOTENOUGHTCAMS_FOUND = 6,
77 PST_STATUSMESSAGE_ERR_INITERROR = 7,
78 PST_STATUSMESSAGE_ERR_CANNOT_START_CAMS = 8,
79 PST_STATUSMESSAGE_ERR_CANNOT_SETUP_CAMS = 9,
80 PST_STATUSMESSAGE_ERR_NULL_TRACKER_HANDLE = 10,
81 PST_STATUSMESSAGE_ERR_UNKNOWN_STATUS = 11,
82} EPstStatusMessage;
83
94 typedef enum EPstTrackerMode
95{
96 PST_MODE_LOWPOWER = 0,
97 PST_MODE_SETUP = 1,
98 PST_MODE_TRACKING = 2,
99 PST_MODE_TRAINING = 3,
100 PST_MODE_DISCONNECT = 4,
101 PST_MODE_RECONNECT = 5,
102 PST_MODE_ERROR = 6,
103 PST_MODE_UNKNOWN = 7,
104} EPstTrackerMode;
105
117 typedef struct PstImage
118{
119 size_t width;
120 size_t height;
121 size_t number_of_images;
122 unsigned char** images;
123} PstImage;
124
132 typedef struct PstTarget
133{
134 char name[128];
135 char uuid[37];
136 int id;
137} PstTarget;
138
151 typedef struct PstTargetStatus
152{
153 PstTarget target;
154 bool status;
155} PstTargetStatus;
156
164 typedef enum EPstTrackingRegion
165{
166 OPTIMAL = 0,
167 FULL = 1,
168} EPstTrackingRegion;
169
180 typedef struct PstPoint
181{
182 int id;
183 float position[3];
184 EPstTrackingRegion detection_region;
185} PstPoint;
186
198 typedef struct PstTargetPose
199{
200 PstTarget target;
201 float pose_matrix[16];
202 size_t number_of_matched_points;
203 PstPoint* matched_points;
204 float matching_error;
205} PstTargetPose;
206
215 typedef struct PstTargetMarker
216{
217 float coordinates[3];
218} PstTargetMarker;
219
228 typedef struct PstTargetMarkers
229{
230 PstTargetMarker* markers;
231 size_t number_of_markers;
232} PstTargetMarkers;
233
247 typedef struct PstTrackerData
248{
249 double timestamp;
250 int seqnumber;
251 size_t number_of_targets;
252 size_t number_of_points;
253 PstTargetPose* targetlist;
254 PstPoint* datapoints;
255} PstTrackerData;
256
263 typedef struct PstTracker
264{
265 void* tracker;
266} PstTracker;
267
276 typedef struct PstCameraURLs
277{
278 char** url_data;
279 size_t number_of_urls;
280} PstCameraURLs;
281
316 typedef struct PstCameraInfo
317{
318 char camera_id[32];
319 char local_sha1[64];
320 char server_sha1_url[128];
321 char calibration_url[128];
322} PstCameraInfo;
323
338 PST_C_EXPORT EPstErrorStatus pst_alloc_and_get_last_error_message(char** cstring);
339
355 PST_C_EXPORT EPstErrorStatus pst_tracker_init( PstTracker* ctracker);
356
373 PST_C_EXPORT EPstErrorStatus pst_tracker_init1(PstTracker* ctracker, const char path[]);
374
392 PST_C_EXPORT EPstErrorStatus pst_tracker_init2(PstTracker* ctracker, const char path[], const char config_file[]);
393
412 PST_C_EXPORT EPstErrorStatus pst_tracker_init3(PstTracker* ctracker, const char path[], const char config_file[], const char db_file[]);
413
433 PST_C_EXPORT EPstErrorStatus pst_tracker_init4(PstTracker* ctracker, const char path[], const char config_file[], const char db_file[], const char grabber_name[]);
434
438 PST_C_EXPORT void pst_tracker_destroy(PstTracker* ctracker);
439
453 PST_C_EXPORT EPstErrorStatus pst_tracker_load_calibration_from_local_path(PstTracker* ctracker, const char path[]);
454
471 PST_C_EXPORT EPstErrorStatus pst_tracker_get_connected_camera_urls(const PstTracker* ctracker, bool silent, PstCameraURLs* urls);
472
490 PST_C_EXPORT EPstErrorStatus pst_tracker_get_uncalibrated_camera_urls(const PstTracker* ctracker, bool silent, PstCameraURLs* urls);
491
506 PST_C_EXPORT EPstErrorStatus pst_tracker_alloc_and_get_version_info(const PstTracker* ctracker, char** version_string);
507
522 PST_C_EXPORT EPstErrorStatus pst_tracker_alloc_and_get_config_path(const PstTracker* ctracker, char** config_path);
523
543 PST_C_EXPORT EPstErrorStatus pst_tracker_get_single_measurement(const PstTracker* ctracker, PstTrackerData* cdata);
544
561 PST_C_EXPORT EPstErrorStatus pst_tracker_add_tracker_data_callback(PstTracker* ctracker, void (*on_tracker_data)(const PstTrackerData* , EPstErrorStatus));
562
579 PST_C_EXPORT EPstErrorStatus pst_tracker_add_tracker_mode_callback(PstTracker* ctracker, void (*on_tracker_mode)(EPstTrackerMode));
580
605 PST_C_EXPORT EPstErrorStatus pst_tracker_add_tracker_callbacks(PstTracker* ctracker, void (*on_tracker_data)(const PstTrackerData* , EPstErrorStatus), void (*on_tracker_mode)(EPstTrackerMode));
606
620 PST_C_EXPORT EPstErrorStatus pst_tracker_remove_tracker_data_callback(PstTracker* ctracker, void (*on_tracker_data)(const PstTrackerData* , EPstErrorStatus));
621
635 PST_C_EXPORT EPstErrorStatus pst_tracker_remove_tracker_mode_callback(PstTracker* ctracker, void (*on_tracker_mode)(EPstTrackerMode));
636
651 PST_C_EXPORT EPstErrorStatus pst_tracker_remove_tracker_callbacks(PstTracker* ctracker, void (*on_tracker_data)(const PstTrackerData* , EPstErrorStatus), void (*on_tracker_mode)(EPstTrackerMode));
652
664 PST_C_EXPORT EPstErrorStatus pst_tracker_start(PstTracker* ctracker);
665
678 PST_C_EXPORT EPstErrorStatus pst_tracker_pause(PstTracker* ctracker);
679
693 PST_C_EXPORT EPstStatusMessage pst_tracker_system_check(const PstTracker* ctracker);
694
708 PST_C_EXPORT EPstErrorStatus pst_tracker_set_framerate(PstTracker* ctracker, double fps);
709
723 PST_C_EXPORT EPstErrorStatus pst_tracker_get_framerate(const PstTracker* ctracker, double* fps);
724
744 PST_C_EXPORT EPstErrorStatus pst_tracker_alloc_and_get_supported_framerates(const PstTracker* ctracker, float** framerates, size_t* number_of_framerates);
745
760 PST_C_EXPORT EPstErrorStatus pst_tracker_set_exposure(PstTracker* ctracker, double time);
761
774 PST_C_EXPORT EPstErrorStatus pst_tracker_get_exposure(const PstTracker* ctracker, double* exposure);
775
795 PST_C_EXPORT EPstErrorStatus pst_tracker_get_exposure_range(const PstTracker* ctracker, double* min, double* max);
796
817 PST_C_EXPORT EPstErrorStatus pst_tracker_enable_filtering(PstTracker* ctracker);
818
831 PST_C_EXPORT EPstErrorStatus pst_tracker_disable_filtering(PstTracker* ctracker);
832
847 PST_C_EXPORT EPstErrorStatus pst_tracker_set_position_filter(PstTracker* ctracker, double value);
848
863 PST_C_EXPORT EPstErrorStatus pst_tracker_set_orientation_filter(PstTracker* ctracker, double value);
864
883 PST_C_EXPORT EPstErrorStatus pst_tracker_enable_tremor_filter(PstTracker* ctracker);
884
897 PST_C_EXPORT EPstErrorStatus pst_tracker_disable_tremor_filter(PstTracker* ctracker);
898
918 PST_C_EXPORT EPstErrorStatus pst_tracker_enable_image_transfer(PstTracker* ctracker);
919
932 PST_C_EXPORT EPstErrorStatus pst_tracker_disable_image_transfer(PstTracker* ctracker);
933
959 PST_C_EXPORT EPstErrorStatus pst_tracker_get_pst_image(const PstTracker* ctracker, PstImage* image);
960
978 PST_C_EXPORT EPstErrorStatus pst_tracker_alloc_and_get_target_list(const PstTracker* ctracker, PstTargetStatus** statuses, size_t* number_of_statuses);
979
993 PST_C_EXPORT EPstErrorStatus pst_tracker_get_target_info(const PstTracker* ctracker, const char* name, PstTarget* target);
994
1010 PST_C_EXPORT EPstErrorStatus pst_tracker_set_target_status(PstTracker* ctracker, const char* name, bool set_active);
1011
1027 PST_C_EXPORT EPstErrorStatus pst_tracker_get_target_status(const PstTracker* ctracker, const char* name, bool* status);
1028
1051 PST_C_EXPORT EPstErrorStatus pst_tracker_get_target_markers(const PstTracker* ctracker, const char* name, PstTargetMarkers* marker_list);
1052
1066 PST_C_EXPORT EPstErrorStatus pst_tracker_set_target_id(PstTracker* ctracker, const char* name, int id);
1067
1087 PST_C_EXPORT EPstErrorStatus pst_tracker_set_reference(PstTracker* ctracker, const float creference[16], bool relative);
1088
1103 PST_C_EXPORT EPstErrorStatus pst_tracker_set_default_reference(PstTracker* ctracker);
1104
1121 PST_C_EXPORT EPstErrorStatus pst_tracker_get_reference(const PstTracker* ctracker, float creference[16]);
1122
1147 PST_C_EXPORT EPstErrorStatus pst_tracker_alloc_and_get_connected_camera_info( const PstTracker* ctracker, bool silent, PstCameraInfo** c_camera_info, size_t* number_of_cameras);
1148
1173 PST_C_EXPORT EPstErrorStatus pst_sdk_enable_shared_memory();
1174
1182 PST_C_EXPORT void pst_sdk_disable_shared_memory();
1183
1204 PST_C_EXPORT EPstErrorStatus pst_sdk_enable_rest_server(const char* server_address, const char* server_port, int event_stream_retry_timeout);
1205
1214 PST_C_EXPORT void pst_sdk_disable_rest_server();
1215
1229 PST_C_EXPORT EPstErrorStatus pst_tracker_remove_target_model(PstTracker* ctracker, const char* model_name);
1230
1236 PST_C_EXPORT void pst_camera_urls_init(PstCameraURLs* urls);
1237
1243 PST_C_EXPORT void pst_camera_urls_destroy(PstCameraURLs* urls);
1244
1255 PST_C_EXPORT void pst_trackerdata_init(PstTrackerData* cdata);
1256
1260 PST_C_EXPORT void pst_trackerdata_destroy(PstTrackerData* cdata);
1261
1272 PST_C_EXPORT void pst_image_init(PstImage* image);
1273
1277 PST_C_EXPORT void pst_image_destroy(PstImage* image);
1278
1287 PST_C_EXPORT void pst_target_markers_init(PstTargetMarkers* marker_list);
1288
1297 PST_C_EXPORT void pst_target_markers_destroy(PstTargetMarkers* marker_list);
1298
1306 PST_C_EXPORT const char* pst_sdk_get_version();
1307
1315 PST_C_EXPORT void pst_sdk_enable_logging();
1316
1328 PST_C_EXPORT void pst_sdk_shutdown();
1329
1344 PST_C_EXPORT void pst_free(void* data);
1345
1359 PST_C_EXPORT EPstErrorStatus pst_tracker_import_json_model(PstTracker* ctracker, const char* json_model);
1360
1375 PST_C_EXPORT EPstErrorStatus pst_tracker_export_json_model(const PstTracker* ctracker, const char* model_name, char** model_string);
1376
1397 PST_C_EXPORT EPstErrorStatus pst_tracker_set_marker_detection_region(PstTracker* ctracker, EPstTrackingRegion detection_region);
1398
1414 PST_C_EXPORT EPstErrorStatus pst_tracker_get_marker_detection_region(const PstTracker* ctracker, EPstTrackingRegion* detection_region);
1415
1433 PST_C_EXPORT EPstErrorStatus pst_tracker_supports_detection_region_pruning(const PstTracker* ctracker, bool* supported);
1434
1436#ifdef __cplusplus
1437}
1438#endif
pst_image_init
void pst_image_init(PstImage *image)
pst_tracker_get_target_info
EPstErrorStatus pst_tracker_get_target_info(const PstTracker *ctracker, const char *name, PstTarget *target)
Get basic tracking target information.
pst_tracker_remove_target_model
EPstErrorStatus pst_tracker_remove_target_model(PstTracker *ctracker, const char *model_name)
Remove a tracking target model from the target model database.
pst_image_destroy
void pst_image_destroy(PstImage *image)
pst_tracker_get_exposure_range
EPstErrorStatus pst_tracker_get_exposure_range(const PstTracker *ctracker, double *min, double *max)
Get the allowed exposure range.
pst_trackerdata_init
void pst_trackerdata_init(PstTrackerData *cdata)
pst_tracker_get_pst_image
EPstErrorStatus pst_tracker_get_pst_image(const PstTracker *ctracker, PstImage *image)
Retrieve images from the connected PST Tracker.
pst_tracker_get_target_status
EPstErrorStatus pst_tracker_get_target_status(const PstTracker *ctracker, const char *name, bool *status)
Get status of a single tracking Target.
pst_tracker_disable_filtering
EPstErrorStatus pst_tracker_disable_filtering(PstTracker *ctracker)
Disable filtering of the tracking results.
pst_tracker_remove_tracker_mode_callback
EPstErrorStatus pst_tracker_remove_tracker_mode_callback(PstTracker *ctracker, void(*on_tracker_mode)(EPstTrackerMode))
Remove a callback function for mode changes.
EPstStatusMessage
EPstStatusMessage
Tracker status messages enum class.
Definition pstsdk_c.h:69
pst_tracker_get_target_markers
EPstErrorStatus pst_tracker_get_target_markers(const PstTracker *ctracker, const char *name, PstTargetMarkers *marker_list)
Get 3D marker positions of stored tracking target.
pst_tracker_get_framerate
EPstErrorStatus pst_tracker_get_framerate(const PstTracker *ctracker, double *fps)
Get current frame rate.
pst_tracker_set_exposure
EPstErrorStatus pst_tracker_set_exposure(PstTracker *ctracker, double time)
Set the exposure time.
pst_tracker_alloc_and_get_target_list
EPstErrorStatus pst_tracker_alloc_and_get_target_list(const PstTracker *ctracker, PstTargetStatus **statuses, size_t *number_of_statuses)
Get TargetStatuses object containing all tracking targets and their status.
pst_tracker_init
EPstErrorStatus pst_tracker_init(PstTracker *ctracker)
This function initializes the tracker object.
pst_tracker_get_exposure
EPstErrorStatus pst_tracker_get_exposure(const PstTracker *ctracker, double *exposure)
Get the current exposure time.
pst_alloc_and_get_last_error_message
EPstErrorStatus pst_alloc_and_get_last_error_message(char **cstring)
This function returns the last error message that was recorded by the system.
pst_tracker_get_marker_detection_region
EPstErrorStatus pst_tracker_get_marker_detection_region(const PstTracker *ctracker, EPstTrackingRegion *detection_region)
Gets the region of the tracking working space where markers are reported.
pst_tracker_init4
EPstErrorStatus pst_tracker_init4(PstTracker *ctracker, const char path[], const char config_file[], const char db_file[], const char grabber_name[])
This function initializes the tracker object.
pst_tracker_alloc_and_get_connected_camera_info
EPstErrorStatus pst_tracker_alloc_and_get_connected_camera_info(const PstTracker *ctracker, bool silent, PstCameraInfo **c_camera_info, size_t *number_of_cameras)
Retrieve camera information for connected PST Trackers.
pst_tracker_destroy
void pst_tracker_destroy(PstTracker *ctracker)
pst_tracker_set_marker_detection_region
EPstErrorStatus pst_tracker_set_marker_detection_region(PstTracker *ctracker, EPstTrackingRegion detection_region)
Sets the region of the tracking working space where markers are reported.
pst_sdk_shutdown
void pst_sdk_shutdown()
Shutdown the tracking system, stopping tracking.
pst_tracker_remove_tracker_callbacks
EPstErrorStatus pst_tracker_remove_tracker_callbacks(PstTracker *ctracker, void(*on_tracker_data)(const PstTrackerData *, EPstErrorStatus), void(*on_tracker_mode)(EPstTrackerMode))
Remove callback functions for tracker data and mode changes.
pst_tracker_set_default_reference
EPstErrorStatus pst_tracker_set_default_reference(PstTracker *ctracker)
Reset the reference system to the default reference system.
pst_tracker_alloc_and_get_version_info
EPstErrorStatus pst_tracker_alloc_and_get_version_info(const PstTracker *ctracker, char **version_string)
Get version information of the SDK.
pst_tracker_import_json_model
EPstErrorStatus pst_tracker_import_json_model(PstTracker *ctracker, const char *json_model)
Import a tracking target model into the target model database.
pst_tracker_set_position_filter
EPstErrorStatus pst_tracker_set_position_filter(PstTracker *ctracker, double value)
Set the strength of the position filter.
pst_sdk_disable_shared_memory
void pst_sdk_disable_shared_memory()
Disable shared memory communication layer.
pst_tracker_set_target_status
EPstErrorStatus pst_tracker_set_target_status(PstTracker *ctracker, const char *name, bool set_active)
Set status of a single tracking Target.
pst_tracker_enable_tremor_filter
EPstErrorStatus pst_tracker_enable_tremor_filter(PstTracker *ctracker)
Enable the tremor filter.
pst_free
void pst_free(void *data)
Free data allocated by the PST SDK.
pst_tracker_pause
EPstErrorStatus pst_tracker_pause(PstTracker *ctracker)
Pause tracking.
EPstTrackingRegion
EPstTrackingRegion
Region of the tracking working space in which markers are reported.
Definition pstsdk_c.h:165
pst_tracker_start
EPstErrorStatus pst_tracker_start(PstTracker *ctracker)
Start tracking.
pst_sdk_get_version
const char * pst_sdk_get_version()
Retrieve the SDK version string.
pst_target_markers_init
void pst_target_markers_init(PstTargetMarkers *marker_list)
pst_sdk_enable_logging
void pst_sdk_enable_logging()
Write plug-in status information to the standard C output stream stderr.
pst_sdk_disable_rest_server
void pst_sdk_disable_rest_server()
Disable the REST server communication layer.
EPstTrackerMode
EPstTrackerMode
Tracker mode enum class.
Definition pstsdk_c.h:95
pst_tracker_set_framerate
EPstErrorStatus pst_tracker_set_framerate(PstTracker *ctracker, double fps)
Set tracker frame rate.
pst_tracker_set_orientation_filter
EPstErrorStatus pst_tracker_set_orientation_filter(PstTracker *ctracker, double value)
Set the strength of the orientation filter.
pst_tracker_alloc_and_get_config_path
EPstErrorStatus pst_tracker_alloc_and_get_config_path(const PstTracker *ctracker, char **config_path)
Get the path to the current configuration directory.
pst_tracker_supports_detection_region_pruning
EPstErrorStatus pst_tracker_supports_detection_region_pruning(const PstTracker *ctracker, bool *supported)
Check if the connected PST tracker supports pruning markers by tracking region.
pst_trackerdata_destroy
void pst_trackerdata_destroy(PstTrackerData *cdata)
pst_tracker_disable_image_transfer
EPstErrorStatus pst_tracker_disable_image_transfer(PstTracker *ctracker)
Disable image transfer from the PST Tracker.
pst_tracker_remove_tracker_data_callback
EPstErrorStatus pst_tracker_remove_tracker_data_callback(PstTracker *ctracker, void(*on_tracker_data)(const PstTrackerData *, EPstErrorStatus))
Remove a callback function for tracker data.
pst_tracker_load_calibration_from_local_path
EPstErrorStatus pst_tracker_load_calibration_from_local_path(PstTracker *ctracker, const char path[])
Load calibration information from a given path.
pst_tracker_export_json_model
EPstErrorStatus pst_tracker_export_json_model(const PstTracker *ctracker, const char *model_name, char **model_string)
Export a tracking target model as a JSON-formatted string.
pst_target_markers_destroy
void pst_target_markers_destroy(PstTargetMarkers *marker_list)
pst_tracker_enable_filtering
EPstErrorStatus pst_tracker_enable_filtering(PstTracker *ctracker)
Enable filtering of the tracking results.
pst_tracker_get_reference
EPstErrorStatus pst_tracker_get_reference(const PstTracker *ctracker, float creference[16])
Gets the transformation matrix for the current reference system.
pst_tracker_alloc_and_get_supported_framerates
EPstErrorStatus pst_tracker_alloc_and_get_supported_framerates(const PstTracker *ctracker, float **framerates, size_t *number_of_framerates)
Get an array of available frame rates.
pst_tracker_get_single_measurement
EPstErrorStatus pst_tracker_get_single_measurement(const PstTracker *ctracker, PstTrackerData *cdata)
Retrieve the latest PstTrackerData available from the connected PstTracker.
pst_tracker_add_tracker_mode_callback
EPstErrorStatus pst_tracker_add_tracker_mode_callback(PstTracker *ctracker, void(*on_tracker_mode)(EPstTrackerMode))
Add a callback function for mode changes.
pst_tracker_disable_tremor_filter
EPstErrorStatus pst_tracker_disable_tremor_filter(PstTracker *ctracker)
Disable the tremor filter.
pst_camera_urls_init
void pst_camera_urls_init(PstCameraURLs *urls)
pst_tracker_set_target_id
EPstErrorStatus pst_tracker_set_target_id(PstTracker *ctracker, const char *name, int id)
Set the id of the tracking target.
pst_tracker_enable_image_transfer
EPstErrorStatus pst_tracker_enable_image_transfer(PstTracker *ctracker)
Enable image transfer from the PST Tracker.
pst_sdk_enable_shared_memory
EPstErrorStatus pst_sdk_enable_shared_memory()
Enable shared memory communication layer.
pst_camera_urls_destroy
void pst_camera_urls_destroy(PstCameraURLs *urls)
pst_tracker_add_tracker_data_callback
EPstErrorStatus pst_tracker_add_tracker_data_callback(PstTracker *ctracker, void(*on_tracker_data)(const PstTrackerData *, EPstErrorStatus))
Add a callback function for tracker data.
pst_tracker_system_check
EPstStatusMessage pst_tracker_system_check(const PstTracker *ctracker)
Check if the tracker is running correctly.
pst_tracker_add_tracker_callbacks
EPstErrorStatus pst_tracker_add_tracker_callbacks(PstTracker *ctracker, void(*on_tracker_data)(const PstTrackerData *, EPstErrorStatus), void(*on_tracker_mode)(EPstTrackerMode))
Add callback functions for tracker data and mode changes.
pst_tracker_init1
EPstErrorStatus pst_tracker_init1(PstTracker *ctracker, const char path[])
This function initializes the tracker object.
pst_tracker_init3
EPstErrorStatus pst_tracker_init3(PstTracker *ctracker, const char path[], const char config_file[], const char db_file[])
This function initializes the tracker object.
EPstErrorStatus
EPstErrorStatus
Tracker error messages enum class.
Definition pstsdk_c.h:44
pst_tracker_set_reference
EPstErrorStatus pst_tracker_set_reference(PstTracker *ctracker, const float creference[16], bool relative)
Set the reference system in which tracking results are reported.
pst_tracker_get_connected_camera_urls
EPstErrorStatus pst_tracker_get_connected_camera_urls(const PstTracker *ctracker, bool silent, PstCameraURLs *urls)
Get URLs of the calibration information for the connected PST Tracker.
pst_tracker_init2
EPstErrorStatus pst_tracker_init2(PstTracker *ctracker, const char path[], const char config_file[])
This function initializes the tracker object.
pst_sdk_enable_rest_server
EPstErrorStatus pst_sdk_enable_rest_server(const char *server_address, const char *server_port, int event_stream_retry_timeout)
Enable a REST Server using the HTTP protocol on a local area network.
pst_tracker_get_uncalibrated_camera_urls
EPstErrorStatus pst_tracker_get_uncalibrated_camera_urls(const PstTracker *ctracker, bool silent, PstCameraURLs *urls)
Check if cameras of the connected PST Tracker are calibrated.
PST_STATUSMESSAGE_DISCONNECTED
@ PST_STATUSMESSAGE_DISCONNECTED
Definition pstsdk_c.h:72
PST_STATUSMESSAGE_OK
@ PST_STATUSMESSAGE_OK
Definition pstsdk_c.h:70
PST_STATUSMESSAGE_ERR_INITERROR
@ PST_STATUSMESSAGE_ERR_INITERROR
Definition pstsdk_c.h:77
PST_STATUSMESSAGE_ERR_NOTENOUGHTCAMS_FOUND
@ PST_STATUSMESSAGE_ERR_NOTENOUGHTCAMS_FOUND
Definition pstsdk_c.h:76
PST_STATUSMESSAGE_ERR_UNKNOWN_STATUS
@ PST_STATUSMESSAGE_ERR_UNKNOWN_STATUS
Definition pstsdk_c.h:81
PST_STATUSMESSAGE_ERR_NOCAMS_FOUND
@ PST_STATUSMESSAGE_ERR_NOCAMS_FOUND
Definition pstsdk_c.h:75
PST_STATUSMESSAGE_NOT_INITIALIZED
@ PST_STATUSMESSAGE_NOT_INITIALIZED
Definition pstsdk_c.h:71
PST_STATUSMESSAGE_ERR_GENERAL
@ PST_STATUSMESSAGE_ERR_GENERAL
Definition pstsdk_c.h:73
PST_STATUSMESSAGE_ERR_CANNOT_START_CAMS
@ PST_STATUSMESSAGE_ERR_CANNOT_START_CAMS
Definition pstsdk_c.h:78
PST_STATUSMESSAGE_ERR_TIMEOUT
@ PST_STATUSMESSAGE_ERR_TIMEOUT
Definition pstsdk_c.h:74
PST_STATUSMESSAGE_ERR_NULL_TRACKER_HANDLE
@ PST_STATUSMESSAGE_ERR_NULL_TRACKER_HANDLE
Definition pstsdk_c.h:80
PST_STATUSMESSAGE_ERR_CANNOT_SETUP_CAMS
@ PST_STATUSMESSAGE_ERR_CANNOT_SETUP_CAMS
Definition pstsdk_c.h:79
OPTIMAL
@ OPTIMAL
Definition pstsdk_c.h:166
FULL
@ FULL
Definition pstsdk_c.h:167
PST_MODE_ERROR
@ PST_MODE_ERROR
Definition pstsdk_c.h:102
PST_MODE_TRAINING
@ PST_MODE_TRAINING
Definition pstsdk_c.h:99
PST_MODE_LOWPOWER
@ PST_MODE_LOWPOWER
Definition pstsdk_c.h:96
PST_MODE_DISCONNECT
@ PST_MODE_DISCONNECT
Definition pstsdk_c.h:100
PST_MODE_TRACKING
@ PST_MODE_TRACKING
Definition pstsdk_c.h:98
PST_MODE_UNKNOWN
@ PST_MODE_UNKNOWN
Definition pstsdk_c.h:103
PST_MODE_RECONNECT
@ PST_MODE_RECONNECT
Definition pstsdk_c.h:101
PST_MODE_SETUP
@ PST_MODE_SETUP
Definition pstsdk_c.h:97
PST_ERROR_STATUS_NOT_INITIALIZED_ERROR
@ PST_ERROR_STATUS_NOT_INITIALIZED_ERROR
Definition pstsdk_c.h:47
PST_ERROR_STATUS_NOT_FOUND_ERROR
@ PST_ERROR_STATUS_NOT_FOUND_ERROR
Definition pstsdk_c.h:50
PST_ERROR_STATUS_IMAGE_RETRIEVAL_FAILED_ERROR
@ PST_ERROR_STATUS_IMAGE_RETRIEVAL_FAILED_ERROR
Definition pstsdk_c.h:54
PST_ERROR_STATUS_OK
@ PST_ERROR_STATUS_OK
Definition pstsdk_c.h:45
PST_ERROR_STATUS_TRACKER_ERROR
@ PST_ERROR_STATUS_TRACKER_ERROR
Definition pstsdk_c.h:46
PST_ERROR_STATUS_OUT_OF_RANGE_ERROR
@ PST_ERROR_STATUS_OUT_OF_RANGE_ERROR
Definition pstsdk_c.h:49
PST_ERROR_STATUS_HTTP_ERROR
@ PST_ERROR_STATUS_HTTP_ERROR
Definition pstsdk_c.h:51
PST_ERROR_STATUS_INVALID_DATA_ERROR
@ PST_ERROR_STATUS_INVALID_DATA_ERROR
Definition pstsdk_c.h:55
PST_ERROR_STATUS_NULLPTR_ERROR
@ PST_ERROR_STATUS_NULLPTR_ERROR
Definition pstsdk_c.h:53
PST_ERROR_STATUS_JSON_PARSING_ERROR
@ PST_ERROR_STATUS_JSON_PARSING_ERROR
Definition pstsdk_c.h:57
PST_ERROR_STATUS_ALREADY_EXISTS_ERROR
@ PST_ERROR_STATUS_ALREADY_EXISTS_ERROR
Definition pstsdk_c.h:56
PST_ERROR_STATUS_NOT_SUPPORTED_ERROR
@ PST_ERROR_STATUS_NOT_SUPPORTED_ERROR
Definition pstsdk_c.h:48
PST_ERROR_STATUS_FAILED_TO_ALLOCATE_MEMORY_ERROR
@ PST_ERROR_STATUS_FAILED_TO_ALLOCATE_MEMORY_ERROR
Definition pstsdk_c.h:52
PST_C_EXPORT
#define PST_C_EXPORT
Definition pstsdk_c.h:11
PstCameraInfo
Information for a single camera of the connected PST Tracker.
Definition pstsdk_c.h:317
PstCameraInfo::camera_id
char camera_id[32]
Definition pstsdk_c.h:318
PstCameraInfo::local_sha1
char local_sha1[64]
Definition pstsdk_c.h:319
PstCameraInfo::server_sha1_url
char server_sha1_url[128]
Definition pstsdk_c.h:320
PstCameraInfo::calibration_url
char calibration_url[128]
Definition pstsdk_c.h:321
PstCameraURLs
Struct to request urls for calibration information.
Definition pstsdk_c.h:277
PstCameraURLs::number_of_urls
size_t number_of_urls
Definition pstsdk_c.h:279
PstCameraURLs::url_data
char ** url_data
Definition pstsdk_c.h:278
PstImage
Images retrieved from the tracker.
Definition pstsdk_c.h:118
PstImage::width
size_t width
Definition pstsdk_c.h:119
PstImage::height
size_t height
Definition pstsdk_c.h:120
PstImage::images
unsigned char ** images
Definition pstsdk_c.h:122
PstImage::number_of_images
size_t number_of_images
Definition pstsdk_c.h:121
PstPoint
Estimated 3D marker location.
Definition pstsdk_c.h:181
PstPoint::id
int id
Definition pstsdk_c.h:182
PstPoint::position
float position[3]
Definition pstsdk_c.h:183
PstPoint::detection_region
EPstTrackingRegion detection_region
Definition pstsdk_c.h:184
PstTarget
Tracking target information.
Definition pstsdk_c.h:133
PstTarget::uuid
char uuid[37]
Definition pstsdk_c.h:135
PstTarget::name
char name[128]
Definition pstsdk_c.h:134
PstTarget::id
int id
Definition pstsdk_c.h:136
PstTargetMarker
3D marker positions of a single marker of a tracking Target.
Definition pstsdk_c.h:216
PstTargetMarker::coordinates
float coordinates[3]
Definition pstsdk_c.h:217
PstTargetMarkers
Collection struct for PstTargetMarker.
Definition pstsdk_c.h:229
PstTargetMarkers::number_of_markers
size_t number_of_markers
Definition pstsdk_c.h:231
PstTargetMarkers::markers
PstTargetMarker * markers
Definition pstsdk_c.h:230
PstTargetPose
Estimated tracking target pose.
Definition pstsdk_c.h:199
PstTargetPose::pose_matrix
float pose_matrix[16]
Definition pstsdk_c.h:201
PstTargetPose::matching_error
float matching_error
Definition pstsdk_c.h:204
PstTargetPose::target
PstTarget target
Definition pstsdk_c.h:200
PstTargetPose::matched_points
PstPoint * matched_points
Definition pstsdk_c.h:203
PstTargetPose::number_of_matched_points
size_t number_of_matched_points
Definition pstsdk_c.h:202
PstTargetStatus
Tracking target status.
Definition pstsdk_c.h:152
PstTargetStatus::status
bool status
Definition pstsdk_c.h:154
PstTargetStatus::target
PstTarget target
Definition pstsdk_c.h:153
PstTrackerData
Tracking information retrieved from tracker.
Definition pstsdk_c.h:248
PstTrackerData::number_of_targets
size_t number_of_targets
Definition pstsdk_c.h:251
PstTrackerData::seqnumber
int seqnumber
Definition pstsdk_c.h:250
PstTrackerData::number_of_points
size_t number_of_points
Definition pstsdk_c.h:252
PstTrackerData::targetlist
PstTargetPose * targetlist
Definition pstsdk_c.h:253
PstTrackerData::timestamp
double timestamp
Definition pstsdk_c.h:249
PstTrackerData::datapoints
PstPoint * datapoints
Definition pstsdk_c.h:254
PstTracker
Main PST SDK struct for tracker communication.
Definition pstsdk_c.h:264
PstTracker::tracker
void * tracker
Definition pstsdk_c.h:265