Monado OpenXR Runtime
ht_driver.c File Reference

Camera based hand tracking driver code. More...

#include "ht_interface.h"
#include "tracking/t_tracking.h"
#include "util/u_var.h"
#include "xrt/xrt_defines.h"
#include "xrt/xrt_frame.h"
#include "xrt/xrt_frameserver.h"
#include "xrt/xrt_prober.h"
#include "util/u_device.h"
#include "util/u_logging.h"
#include "util/u_trace_marker.h"
#include "util/u_config_json.h"
#include "util/u_debug.h"
#include "util/u_sink.h"
#include "util/u_file.h"
#include "tracking/t_hand_tracking.h"
#include "../../tracking/hand/mercury/hg_interface.h"
#include <cjson/cJSON.h>
Include dependency graph for ht_driver.c:

Data Structures

struct  ht_device
 

Macros

#define HT_TRACE(htd, ...)   U_LOG_XDEV_IFL_T(&htd->base, htd->log_level, __VA_ARGS__)
 
#define HT_DEBUG(htd, ...)   U_LOG_XDEV_IFL_D(&htd->base, htd->log_level, __VA_ARGS__)
 
#define HT_INFO(htd, ...)   U_LOG_XDEV_IFL_I(&htd->base, htd->log_level, __VA_ARGS__)
 
#define HT_WARN(htd, ...)   U_LOG_XDEV_IFL_W(&htd->base, htd->log_level, __VA_ARGS__)
 
#define HT_ERROR(htd, ...)   U_LOG_XDEV_IFL_E(&htd->base, htd->log_level, __VA_ARGS__)
 

Functions

static struct ht_deviceht_device (struct xrt_device *xdev)
 
static void ht_device_get_hand_tracking (struct xrt_device *xdev, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_hand_joint_set *out_value, int64_t *out_timestamp_ns)
 xrt_device function implementations More...
 
static void ht_device_destroy (struct xrt_device *xdev)
 
static struct ht_deviceht_device_create_common (struct t_stereo_camera_calibration *calib, bool own_xfctx, struct xrt_frame_context *xfctx, struct t_hand_tracking_sync *sync)
 
int ht_device_create (struct xrt_frame_context *xfctx, struct t_stereo_camera_calibration *calib, struct t_hand_tracking_create_info create_info, struct xrt_slam_sinks **out_sinks, struct xrt_device **out_device)
 Create hand tracker. More...
 

Detailed Description

Camera based hand tracking driver code.

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

Function Documentation

◆ ht_device_create_common()

static struct ht_device * ht_device_create_common ( struct t_stereo_camera_calibration calib,
bool  own_xfctx,
struct xrt_frame_context xfctx,
struct t_hand_tracking_sync sync 
)
static
Todo:
2 hands hardcoded

◆ ht_device_get_hand_tracking()

static void ht_device_get_hand_tracking ( struct xrt_device xdev,
enum xrt_input_name  name,
int64_t  at_timestamp_ns,
struct xrt_hand_joint_set out_value,
int64_t *  out_timestamp_ns 
)
static

xrt_device function implementations