···1717#include "xrt/xrt_prober.h"
1818#include "xrt/xrt_tracking.h"
1919#include "xrt/xrt_config_have.h"
2020+#include "xrt/xrt_config_build.h"
20212122#include "euroc_driver.h"
2223···101102 return (struct euroc_device *)xdev;
102103}
103104104104-//! Corrections specific for original euroc datasets and Kimera.
105105-//! If your datasets comes from a different camera you should probably
106106-//! use a different pose correction function.
107107-XRT_MAYBE_UNUSED static inline struct xrt_pose
108108-euroc_device_correct_pose_from_kimera(struct xrt_pose pose)
109109-{
110110- //! @todo Implement proper pose corrections for the original euroc datasets
111111- //! @todo Allow to use different pose corrections depending on the device used to record
112112- return pose;
113113-}
114114-115115-//! Similar to `euroc_device_correct_pose_from_kimera` but for Basalt.
116116-XRT_MAYBE_UNUSED static inline struct xrt_pose
117117-euroc_device_correct_pose_from_basalt(struct xrt_pose pose)
118118-{
119119- //! @todo Implement proper pose corrections for the original euroc datasets
120120- //! @todo Allow to use different pose corrections depending on the device used to record
121121- return pose;
122122-}
123123-124105static void
125106euroc_device_get_tracked_pose(struct xrt_device *xdev,
126107 enum xrt_input_name name,
···136117 int pose_bits = XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT | XRT_SPACE_RELATION_POSITION_TRACKED_BIT;
137118 bool pose_tracked = out_relation->relation_flags & pose_bits;
138119 if (pose_tracked) {
139139-#if defined(XRT_HAVE_KIMERA)
140140- ed->pose = euroc_device_correct_pose_from_kimera(out_relation->pose);
141141-#elif defined(XRT_HAVE_BASALT)
142142- ed->pose = euroc_device_correct_pose_from_basalt(out_relation->pose);
143143-#else
144120 ed->pose = out_relation->pose;
145145-#endif
146121 }
147122 }
148123
+4-3
src/xrt/drivers/realsense/rs_hdev.c
···1818#include "xrt/xrt_frame.h"
1919#include "xrt/xrt_prober.h"
2020#include "xrt/xrt_config_have.h"
2121+#include "xrt/xrt_config_build.h"
21222223#include "math/m_filter_fifo.h"
2324#include "math/m_space.h"
···288289 bool pose_tracked = out_relation->relation_flags & pose_bits;
289290290291 if (pose_tracked) {
291291-#if defined(XRT_HAVE_KIMERA)
292292- rh->pose = rs_hdev_correct_pose_from_kimera(out_relation->pose);
293293-#elif defined(XRT_HAVE_BASALT)
292292+#ifdef XRT_FEATURE_SLAM
293293+ // !todo Correct pose depending on the VIT system in use, this should be done in the system itself.
294294+ // For now, assume that we are using Basalt.
294295 rh->pose = rs_hdev_correct_pose_from_basalt(out_relation->pose);
295296#else
296297 rh->pose = out_relation->pose;
+4-3
src/xrt/drivers/rift_s/rift_s_tracker.c
···3636#include "util/u_trace_marker.h"
3737#include "util/u_var.h"
38383939+#include "xrt/xrt_config_build.h"
3940#include "xrt/xrt_config_drivers.h"
4041#include "xrt/xrt_device.h"
4142···635636636637 // Get the IMU pose from the SLAM tracker
637638 xrt_tracked_slam_get_tracked_pose(t->tracking.slam, at_timestamp_ns, &imu_relation);
638638-639639-#if defined(XRT_HAVE_BASALT)
639639+#ifdef XRT_FEATURE_SLAM
640640+ // !todo Correct pose depending on the VIT system in use, this should be done in the system itself.
641641+ // For now, assume that we are using Basalt.
640642 rift_s_tracker_correct_pose_from_basalt(&imu_relation.pose);
641643#endif
642642-643644 imu_relation.relation_flags = (enum xrt_space_relation_flags)(
644645 XRT_SPACE_RELATION_ORIENTATION_VALID_BIT | XRT_SPACE_RELATION_POSITION_VALID_BIT |
645646 XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT | XRT_SPACE_RELATION_POSITION_TRACKED_BIT);
+3-4
src/xrt/drivers/twrap/twrap_slam.c
···1414#include "xrt/xrt_frameserver.h"
1515#include "xrt/xrt_results.h"
1616#include "xrt/xrt_tracking.h"
1717+#include "xrt/xrt_config_have.h"
1818+#include "xrt/xrt_config_build.h"
17191820#include "util/u_var.h"
1921#include "util/u_misc.h"
···171173 snprintf(dx->base.serial, XRT_DEVICE_NAME_LEN, "Generic Inside-Out Head Tracker");
172174173175#ifdef XRT_FEATURE_SLAM
174174-#ifdef XRT_HAVE_BASALT
176176+ // !todo Correct pose depending on the VIT system in use, this should be done in the system itself.
175177 // Arrived at mostly by trial and error; seeminly does a 90-degree rotation about the X axis.
176178 dx->pre_rotate_x = (struct xrt_vec3){1.0f, 0.0f, 0.0f};
177179 dx->pre_rotate_z = (struct xrt_vec3){0.0f, 1.0f, 0.0f};
178180 dx->pre_rotate = true;
179179-#else
180180-#pragma message "World space conversion not implemented for this SLAM system"
181181-#endif
182181#endif
183182184183 // note: we can't put this at the very end; we need u_tracked_imu_3dof, and that needs to be put on the debug
+5-1
src/xrt/drivers/vive/vive_device.c
···3434#include "vive_protocol.h"
3535#include "vive_source.h"
3636#include "xrt/xrt_tracking.h"
3737+#include "xrt/xrt_config_have.h"
3838+#include "xrt/xrt_config_build.h"
37393840// Used to scale the IMU range from config.
3941#define VIVE_IMU_RANGE_CONVERSION_VALUE (32768.0)
···156158 bool pose_tracked = out_relation->relation_flags & pose_bits;
157159158160 if (pose_tracked) {
159159-#if defined(XRT_HAVE_BASALT)
161161+#ifdef XRT_FEATURE_SLAM
162162+ // !todo Correct pose depending on the VIT system in use, this should be done in the system itself.
163163+ // For now, assume that we are using Basalt.
160164 d->pose = vive_device_correct_pose_from_basalt(out_relation->pose);
161165#else
162166 d->pose = out_relation->pose;
+3-1
src/xrt/drivers/wmr/wmr_hmd.c
···11451145 bool pose_tracked = out_relation->relation_flags & pose_bits;
1146114611471147 if (pose_tracked) {
11481148-#if defined(XRT_HAVE_BASALT)
11481148+#ifdef XRT_FEATURE_SLAM
11491149+ // !todo Correct pose depending on the VIT system in use, this should be done in the system itself.
11501150+ // For now, assume that we are using Basalt.
11491151 wh->pose = wmr_hmd_correct_pose_from_basalt(out_relation->pose);
11501152#else
11511153 wh->pose = out_relation->pose;