-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathxv_c_wrapper.h
More file actions
40 lines (31 loc) · 807 Bytes
/
Copy pathxv_c_wrapper.h
File metadata and controls
40 lines (31 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef XV_C_WRAPPER_H
#define XV_C_WRAPPER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdbool.h>
// Struct for orientation/IMU data
typedef struct {
double hostTimestamp;
int64_t edgeTimestampUs;
double quaternion[4];
} C_Orientation;
typedef struct {
double hostTimestamp;
int64_t edgeTimestampUs;
double position[3];
double quaternion[4];
double confidence;
double linearVelocity[3];
double angularVelocity[3];
} C_Pose;
typedef void (*OrientationCallback)(const C_Orientation*);
typedef void (*PoseCallback)(const C_Pose*);
const char* xv_init_and_start_imu(OrientationCallback callback);
const char* xv_init_and_start_slam(PoseCallback callback);
void xv_cleanup(void);
#ifdef __cplusplus
}
#endif
#endif