The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

d/wmr: Add a slider to adjust all tracked pose timestamps

+18 -1
+10
src/xrt/drivers/wmr/wmr_hmd.c
··· 1091 1091 DRV_TRACE_MARKER(); 1092 1092 1093 1093 struct wmr_hmd *wh = wmr_hmd(xdev); 1094 + 1095 + at_timestamp_ns += (uint64_t)(wh->tracked_offset_ms.val * (double)U_TIME_1MS_IN_NS); 1096 + 1094 1097 if (wh->tracking.slam_enabled && wh->slam_over_3dof) { 1095 1098 wmr_hmd_get_slam_tracked_pose(xdev, name, at_timestamp_ns, out_relation); 1096 1099 } else { ··· 1617 1620 u_var_add_pose(wh, &wh->pose, "Tracked Pose"); 1618 1621 u_var_add_pose(wh, &wh->offset, "Pose Offset"); 1619 1622 u_var_add_bool(wh, &wh->average_imus, "Average IMU samples"); 1623 + u_var_add_draggable_f32(wh, &wh->tracked_offset_ms, "Timecode offset(ms)"); 1620 1624 1621 1625 u_var_add_gui_header(wh, NULL, "3DoF Tracking"); 1622 1626 m_imu_3dof_add_vars(&wh->fusion.i3dof, wh, ""); ··· 1887 1891 wh->pose = (struct xrt_pose)XRT_POSE_IDENTITY; 1888 1892 wh->offset = (struct xrt_pose)XRT_POSE_IDENTITY; 1889 1893 wh->average_imus = true; 1894 + wh->tracked_offset_ms = (struct u_var_draggable_f32){ 1895 + .val = 0.0, 1896 + .min = -40.0, 1897 + .step = 0.1, 1898 + .max = +120.0, 1899 + }; 1890 1900 1891 1901 /* Now that we have the config loaded, iterate the map of known headsets and see if we have 1892 1902 * an entry for this specific headset (otherwise the generic entry will be used)
+8 -1
src/xrt/drivers/wmr/wmr_hmd.h
··· 1 1 // Copyright 2018, Philipp Zabel. 2 2 // Copyright 2020-2021, N Madsen. 3 - // Copyright 2020-2021, Collabora, Ltd. 3 + // Copyright 2020-2023, Collabora, Ltd. 4 4 // SPDX-License-Identifier: BSL-1.0 5 5 /*! 6 6 * @file ··· 173 173 174 174 //! Average 4 IMU samples before sending them to the trackers 175 175 bool average_imus; 176 + 177 + /*! 178 + * Offset for tracked pose offsets (applies to both fusion and SLAM). 179 + * Applied when getting the tracked poses, so is effectivily a offset 180 + * to increase or decrease prediction. 181 + */ 182 + struct u_var_draggable_f32 tracked_offset_ms; 176 183 177 184 struct 178 185 {