Monado OpenXR Runtime
p_tracking.c File Reference

Tracking integration code. More...

#include "xrt/xrt_frame.h"
#include "xrt/xrt_frameserver.h"
#include "xrt/xrt_tracking.h"
#include "xrt/xrt_config_have.h"
#include "xrt/xrt_config_drivers.h"
#include "xrt/xrt_config_build.h"
#include "tracking/t_tracking.h"
#include "util/u_var.h"
#include "util/u_misc.h"
#include "util/u_sink.h"
#include "util/u_config_json.h"
#include "p_prober.h"
#include <stdio.h>
#include <string.h>
#include "util/u_debug.h"
Include dependency graph for p_tracking.c:

Data Structures

struct  p_factory
 

Functions

static struct p_factoryp_factory (struct xrt_tracking_factory *xfact)
 
static XRT_MAYBE_UNUSED bool p_factory_ensure_slam_frameserver (struct p_factory *fact)
 
static int p_factory_create_tracked_psmv (struct xrt_tracking_factory *xfact, struct xrt_tracked_psmv **out_xtmv)
 
static int p_factory_create_tracked_psvr (struct xrt_tracking_factory *xfact, struct xrt_tracked_psvr **out_xtvr)
 
static int p_factory_create_tracked_slam (struct xrt_tracking_factory *xfact, struct xrt_tracked_slam **out_xts)
 
int p_tracking_init (struct prober *p)
 
void p_tracking_teardown (struct prober *p)
 

Detailed Description

Tracking integration code.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Function Documentation

◆ p_factory_ensure_slam_frameserver()

static XRT_MAYBE_UNUSED bool p_factory_ensure_slam_frameserver ( struct p_factory fact)
static
Todo:
Similar to p_factory_ensure_frameserver but for SLAM sources. Therefore we can only have one SLAM tracker at a time, with exactly one SLAM tracked device. It would be good to solve these artificial restrictions.
Todo:
The check for (XRT_FEATURE_SLAM && XRT_BUILD_DRIVER_* && debug_flag_is_correct) is getting duplicated in: p_open_video_device, p_list_video_devices, and p_factory_ensure_slam_frameserver (here) with small differences. Incorrectly modifying one will mess the others.

References t_slam_tracker_config::cam_count, euroc_player_fill_default_config_for(), xrt_fs::source_id, t_slam_fill_default_config(), p_factory::xfctx, and xrt_prober::xrt_prober_open_video_device().