|
Monado OpenXR Runtime
|
Driver code for Oculus Rift S headsets. More...
#include <stdlib.h>#include <string.h>#include <stdio.h>#include <time.h>#include <assert.h>#include "math/m_api.h"#include "math/m_clock_tracking.h"#include "math/m_space.h"#include "math/m_vec3.h"#include "os/os_time.h"#include "util/u_debug.h"#include "util/u_device.h"#include "util/u_sink.h"#include "util/u_trace_marker.h"#include "util/u_var.h"#include "xrt/xrt_config_build.h"#include "xrt/xrt_config_drivers.h"#include "xrt/xrt_device.h"#include "rift_s.h"#include "rift_s_interface.h"#include "rift_s_util.h"#include "rift_s_tracker.h"Macros | |
| #define | UPPER_32BITS(x) ((x)&0xffffffff00000000ULL) |
Functions | |
| static xrt_result_t | rift_s_tracker_get_tracked_pose_imu (struct xrt_device *xdev, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_space_relation *out_relation) |
| Specifies whether the user wants to use a SLAM tracker. | |
| static void | rift_s_tracker_switch_method_cb (void *t_ptr) |
| XRT_MAYBE_UNUSED void | rift_s_fill_slam_imu_calibration (struct rift_s_tracker *t, struct rift_s_hmd_config *hmd_config) |
| static void | rift_s_fill_slam_cameras_calibration (struct rift_s_tracker *t, struct rift_s_hmd_config *hmd_config) |
| Extended camera calibration for SLAM. | |
| static void | rift_s_fill_slam_calibration (struct rift_s_tracker *t, struct rift_s_hmd_config *hmd_config) |
| static struct xrt_slam_sinks * | rift_s_create_slam_tracker (struct rift_s_tracker *t, struct xrt_frame_context *xfctx) |
| static int | rift_s_create_hand_tracker (struct rift_s_tracker *t, struct xrt_frame_context *xfctx, struct xrt_hand_masks_sink *masks_sink, struct xrt_slam_sinks **out_sinks, struct xrt_device **out_device) |
| void | rift_s_tracker_add_debug_ui (struct rift_s_tracker *t, void *root) |
| struct rift_s_tracker * | rift_s_tracker_create (struct xrt_tracking_origin *origin, struct xrt_frame_context *xfctx, struct rift_s_hmd_config *hmd_config) |
| Procedure to setup trackers: 3dof, SLAM and hand tracking. | |
| void | rift_s_tracker_destroy (struct rift_s_tracker *t) |
| struct xrt_slam_sinks * | rift_s_tracker_get_slam_sinks (struct rift_s_tracker *t) |
| struct xrt_device * | rift_s_tracker_get_hand_tracking_device (struct rift_s_tracker *t) |
| void | rift_s_tracker_clock_update (struct rift_s_tracker *t, uint64_t device_timestamp_ns, timepoint_ns local_timestamp_ns) |
| static void | clock_hw2mono_get (struct rift_s_tracker *t, uint64_t device_ts, timepoint_ns *out) |
| Camera specific logic for clock conversion. | |
| void | rift_s_tracker_imu_update (struct rift_s_tracker *t, uint64_t device_timestamp_ns, const struct xrt_vec3 *accel, const struct xrt_vec3 *gyro) |
| void | rift_s_tracker_push_slam_frames (struct rift_s_tracker *t, uint64_t frame_ts_ns, struct xrt_frame *frames[RIFT_S_CAMERA_COUNT]) |
| static XRT_MAYBE_UNUSED void | rift_s_tracker_correct_pose_from_basalt (struct xrt_pose *pose) |
| Specific pose correction for Basalt to OpenXR coordinates. | |
| void | rift_s_tracker_get_tracked_pose (struct rift_s_tracker *t, enum rift_s_tracker_pose pose, uint64_t at_timestamp_ns, struct xrt_space_relation *out_relation) |
| void | rift_s_tracker_start (struct rift_s_tracker *t) |
Variables | |
| static const bool | slam_supported = false |
| static const bool | hand_supported = false |
Driver code for Oculus Rift S headsets.
Implementation for the HMD 3dof and 6dof tracking
|
static |
Camera specific logic for clock conversion.
|
static |
Extended camera calibration for SLAM.
References t_slam_calibration::cam_count, CAM_IDX_TO_ID, t_slam_calibration::cams, xrt_matrix_4x4::math_matrix_4x4_isometry_from_pose(), xrt_pose::math_pose_from_isometry(), xrt_pose::math_pose_invert(), xrt_pose::math_pose_transform(), and t_slam_camera_calibration::T_imu_cam.
|
inlinestatic |
Specific pose correction for Basalt to OpenXR coordinates.
References xrt_quat::math_quat_rotate(), and xrt_quat::math_quat_rotate_vec3().
| struct rift_s_tracker * rift_s_tracker_create | ( | struct xrt_tracking_origin * | origin, |
| struct xrt_frame_context * | xfctx, | ||
| struct rift_s_hmd_config * | hmd_config | ||
| ) |
Procedure to setup trackers: 3dof, SLAM and hand tracking.
Determines which trackers to initialize
| xfctx | the frame server that will own processing nodes |
| hmd_config | HMD configuration and firmware info |
References xrt_device::get_tracked_pose, rift_s_tracker::hand_enabled, rift_s_tracker::i3dof, rift_s_tracker::left_cam_from_imu, xrt_pose::math_pose_invert(), xrt_pose::math_pose_transform(), rift_s_tracker::mutex, rift_s_tracker::pose, rift_s_create_stereo_camera_calib_rotated(), rift_s_tracker_get_tracked_pose_imu(), rift_s_tracker::slam_enabled, rift_s_tracker::slam_over_3dof, rift_s_tracker::tracking, xrt_device::tracking_origin, and xrt_frame_sink::u_sink_split_create().
|
static |
Specifies whether the user wants to use a SLAM tracker.
Specifies whether the user wants to use the hand tracker.
References XRT_ERROR_INPUT_UNSUPPORTED, and XRT_SUCCESS.
Referenced by rift_s_tracker_create().