13#define XRT_TRACKING_NAME_LEN 256
15#define XRT_TRACKING_MAX_FRAME_SOURCES 8
16#define XRT_TRACKING_FOR_EACH_FRAME_SOURCE(_) _(0) _(1) _(2) _(3) _(4) _(5) _(6) _(7)
18#define XRT_TRACKING_MAX_IMUS 3
19#define XRT_TRACKING_FOR_EACH_IMU(_) _(0) _(1) _(2)
21#define XRT_TRACKING_MAX_MASK_SINKS 2
22#define XRT_TRACKING_FOR_EACH_MASK_SINK(_) _(0) _(1)
106#define XRT_TRACKING_ORIGIN_ID_INVALID XRT_C11_COMPOUND(struct xrt_tracking_origin_id){0}
125 char name[XRT_TRACKING_NAME_LEN];
246 } views[XRT_TRACKING_MAX_FRAME_SOURCES];
405XRT_NONNULL_ALL
static inline void
412XRT_NONNULL_ALL
static inline void
415 sink->push_pose(sink, sample);
419XRT_NONNULL_ALL
static inline void
422 sink->push_device_masks(sink, device_masks);
426XRT_NONNULL_ALL
static inline void
436XRT_NONNULL_ALL
static inline void
439 psmv->
push_imu(psmv, timestamp_ns, sample);
443XRT_NONNULL_ALL
static inline void
456XRT_NONNULL_ALL
static inline void
465XRT_NONNULL_ALL
static inline void
468 psvr->
push_imu(psvr, timestamp_ns, sample);
472XRT_NONNULL_ALL
static inline void
486XRT_NONNULL_ALL
static inline void
int64_t timepoint_ns
Integer timestamp type.
Definition u_time.h:77
#define XRT_SYSTEM_MAX_DEVICES
Maximum number of devices simultaneously usable by an implementation of xrt_system_devices.
Definition xrt_limits.h:26
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition xrt_defines.h:1031
xrt_tracking_type
What kind of tracking system is this.
Definition xrt_tracking.h:55
@ XRT_TRACKING_TYPE_NONE
The device(s) are never tracked.
Definition xrt_tracking.h:57
@ XRT_TRACKING_TYPE_MAGNETIC
The device(s) are tracked by magnetic fields, eg. Razer Hydra.
Definition xrt_tracking.h:66
@ XRT_TRACKING_TYPE_CONSTELLATION
The device(s) are tracked through a constellation of lights as seen by cameras.
Definition xrt_tracking.h:72
@ XRT_TRACKING_TYPE_LIGHTHOUSE
The device(s) are tracked by Lighthouse.
Definition xrt_tracking.h:63
@ XRT_TRACKING_TYPE_RGB
The device(s) are tracked by RGB camera(s).
Definition xrt_tracking.h:60
@ XRT_TRACKING_TYPE_OTHER
The device(s) are tracked by other methods.
Definition xrt_tracking.h:75
@ XRT_TRACKING_TYPE_ATTACHABLE
The device(s) are (re)attachable.
Definition xrt_tracking.h:78
@ XRT_TRACKING_TYPE_EXTERNAL_SLAM
The device(s) are tracked by external SLAM.
Definition xrt_tracking.h:69
Time-keeping state structure.
Definition u_time.cpp:30
A 3 element colour with floating point channels.
Definition xrt_defines.h:441
Definition xrt_tracking.h:242
bool enabled
Whether a mask for this hand is being reported.
Definition xrt_tracking.h:243
struct xrt_rect_f32 rect
The mask itself in pixel coordinates.
Definition xrt_tracking.h:244
Definition xrt_tracking.h:240
Masks (bounding boxes) of different hands from current views.
Definition xrt_tracking.h:238
An object to push xrt_device_masks_sample to.
Definition xrt_tracking.h:283
A single HMD or input device.
Definition xrt_device.h:345
Object used to track all sinks and frame producers in a graph.
Definition xrt_frame.h:108
A object that is sent frames.
Definition xrt_frame.h:58
IMU noise model and bias calibration, the noise density grows with the reading on each axis.
Definition xrt_tracking.h:213
double accel_scale_initial_sigma
Standard deviation of the accelerometer scale before anything has been observed, unitless.
Definition xrt_tracking.h:222
double accel_scale_random_walk
Accelerometer scale random walk, in 1/sqrt(s).
Definition xrt_tracking.h:220
struct xrt_imu_sensor_calibration accel
Accelerometer calibration, in m/s^2.
Definition xrt_tracking.h:217
struct xrt_imu_sensor_calibration gyro
Gyroscope calibration, in rad/s.
Definition xrt_tracking.h:215
IMU Sample.
Definition xrt_tracking.h:179
Noise model and bias calibration of one IMU sensor, in that sensor's units (rad/s or m/s^2),...
Definition xrt_tracking.h:189
double scale_factor_noise_density
Noise density per unit of reading on the same axis, the scale factor error, in 1/sqrt(Hz).
Definition xrt_tracking.h:193
double axis_saturation
Reading past which an axis is saturated, in unit.
Definition xrt_tracking.h:197
double noise_density
Noise density at rest, in unit/sqrt(Hz).
Definition xrt_tracking.h:191
double bias_initial_sigma
Standard deviation of the bias before anything has been observed, in unit.
Definition xrt_tracking.h:203
double saturated_noise_density
Noise density of a saturated axis, in unit/sqrt(Hz).
Definition xrt_tracking.h:199
double cross_axis_noise_density
Noise density per unit of reading on the other axes, the cross axis error, in 1/sqrt(Hz).
Definition xrt_tracking.h:195
double bias_random_walk
Bias random walk, in unit/sqrt(s).
Definition xrt_tracking.h:201
An object to send IMU samples to.
Definition xrt_tracking.h:260
void(* push_imu)(struct xrt_imu_sink *, struct xrt_imu_sample *sample)
Push an IMU sample into the sink.
Definition xrt_tracking.h:264
Pose sample.
Definition xrt_tracking.h:229
An object to send pairs of timestamps and poses to.
Definition xrt_tracking.h:273
A pose composed of a position and orientation.
Definition xrt_defines.h:535
Image rectangle.
Definition xrt_defines.h:513
Container of pointers to sinks that could be used for a SLAM system.
Definition xrt_tracking.h:293
struct xrt_pose_sink * gt
Can receive ground truth poses if available.
Definition xrt_tracking.h:299
struct xrt_device_masks_sink * masks[2]
SLAM masks, one per optical tracker (so they can push masks asynchronously).
Definition xrt_tracking.h:301
A relation with two spaces, includes velocity and acceleration.
Definition xrt_defines.h:726
A single tracked PS Move controller, camera and ball are not synced.
Definition xrt_tracking.h:312
void(* push_imu)(struct xrt_tracked_psmv *, timepoint_ns timestamp_ns, struct xrt_tracking_sample *sample)
Push a IMU sample into the tracking system.
Definition xrt_tracking.h:325
struct xrt_device * xdev
Device owning this ball.
Definition xrt_tracking.h:317
void(* get_tracked_pose)(struct xrt_tracked_psmv *, enum xrt_input_name name, timepoint_ns when_ns, struct xrt_space_relation *out_relation)
Called by the owning xrt_device xdev to get the pose of the ball in the tracking space at the given t...
Definition xrt_tracking.h:335
void(* destroy)(struct xrt_tracked_psmv *)
Destroy this tracked ball.
Definition xrt_tracking.h:343
struct xrt_tracking_origin * origin
The tracking system origin for this ball.
Definition xrt_tracking.h:314
struct xrt_colour_rgb_f32 colour
Colour of the ball.
Definition xrt_tracking.h:320
A tracked PSVR headset.
Definition xrt_tracking.h:354
void(* get_tracked_pose)(struct xrt_tracked_psvr *, timepoint_ns when_ns, struct xrt_space_relation *out_relation)
Called by the owning xrt_device xdev to get the pose of the psvr in the tracking space at the given t...
Definition xrt_tracking.h:370
struct xrt_tracking_origin * origin
The tracking system origin for this ball.
Definition xrt_tracking.h:356
void(* destroy)(struct xrt_tracked_psvr *)
Destroy this tracked psvr.
Definition xrt_tracking.h:377
struct xrt_device * xdev
Device owning this ball.
Definition xrt_tracking.h:359
void(* push_imu)(struct xrt_tracked_psvr *, timepoint_ns timestamp_ns, struct xrt_tracking_sample *sample)
Push a IMU sample into the tracking system.
Definition xrt_tracking.h:364
An adapter that wraps an external SLAM tracker to provide SLAM tracking.
Definition xrt_tracking.h:388
void(* get_tracked_pose)(struct xrt_tracked_slam *, timepoint_ns when_ns, struct xrt_space_relation *out_relation)
Called by the owning xrt_device to get the last estimated pose of the SLAM tracker.
Definition xrt_tracking.h:393
Tracking factory.
Definition xrt_tracking.h:142
int(* create_tracked_psmv)(struct xrt_tracking_factory *, struct xrt_tracked_psmv **out_psmv)
Create a tracked PSMV ball.
Definition xrt_tracking.h:149
struct xrt_frame_context * xfctx
Internal frame context, exposed for debugging purposes.
Definition xrt_tracking.h:144
int(* create_tracked_slam)(struct xrt_tracking_factory *, struct xrt_tracked_slam **out_slam)
Create a SLAM tracker.
Definition xrt_tracking.h:161
int(* create_tracked_psvr)(struct xrt_tracking_factory *, struct xrt_tracked_psvr **out_psvr)
Create a tracked PSVR HMD.
Definition xrt_tracking.h:154
A unique identifier for an xrt_tracking_origin instance.
Definition xrt_tracking.h:96
A tracking system or device origin.
Definition xrt_tracking.h:115
struct xrt_pose initial_offset
Read-only.
Definition xrt_tracking.h:134
struct xrt_tracking_origin_id id
Instance identifier, see xrt_tracking_origin_id.
Definition xrt_tracking.h:122
enum xrt_tracking_type type
What can the state tracker expect from this tracking system.
Definition xrt_tracking.h:128
IMU Sample.
Definition xrt_tracking.h:169
A 3 element vector with single doubles.
Definition xrt_defines.h:335
A 3 element vector with single floats.
Definition xrt_defines.h:323
Common defines and enums for XRT.
Header for system objects.
int64_t timepoint_ns
Definition xrt_tracking.h:42