The open source OpenXR runtime
0
fork

Configure Feed

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

d/vive: use controller emulation for hand-tracking

+16 -9
+1
src/xrt/drivers/CMakeLists.txt
··· 194 194 195 195 if(XRT_BUILD_DRIVER_HANDTRACKING) 196 196 target_link_libraries(drv_vive PRIVATE drv_ht) 197 + target_link_libraries(drv_vive PRIVATE drv_cemu) 197 198 endif() 198 199 endif() 199 200
-3
src/xrt/drivers/vive/vive_device.c
··· 113 113 // Clear out the relation. 114 114 U_ZERO(out_relation); 115 115 116 - //! @todo Use this properly. 117 - (void)at_timestamp_ns; 118 - 119 116 m_relation_history_get(d->relation_hist, out_relation, at_timestamp_ns); 120 117 } 121 118
+15 -6
src/xrt/drivers/vive/vive_prober.c
··· 17 17 #include "vive_controller.h" 18 18 #include "vive_prober.h" 19 19 20 + #include "xrt/xrt_config_drivers.h" 21 + 22 + 23 + 24 + #ifdef XRT_BUILD_DRIVER_HANDTRACKING 20 25 #include "../ht/ht_interface.h" 21 26 #include "../multi_wrapper/multi.h" 22 - #include "xrt/xrt_config_drivers.h" 27 + #include "../ht_ctrl_emu/ht_ctrl_emu_interface.h" 28 + DEBUG_GET_ONCE_BOOL_OPTION(vive_use_handtracking, "VIVE_USE_HANDTRACKING", false) 29 + #endif 30 + 31 + 23 32 24 33 static const char VIVE_PRODUCT_STRING[] = "HTC Vive"; 25 34 static const char VIVE_PRO_PRODUCT_STRING[] = "VIVE Pro"; ··· 28 37 static const char VIVE_MANUFACTURER_STRING[] = "HTC"; 29 38 30 39 DEBUG_GET_ONCE_LOG_OPTION(vive_log, "VIVE_LOG", U_LOGGING_WARN) 31 - 32 - #ifdef XRT_BUILD_DRIVER_HANDTRACKING 33 - DEBUG_GET_ONCE_BOOL_OPTION(vive_use_handtracking, "VIVE_USE_HANDTRACKING", false) 34 - #endif 35 40 36 41 static int 37 42 log_vive_string(struct xrt_prober *xp, struct xrt_prober_device *dev, enum xrt_prober_string type) ··· 270 275 struct xrt_device *wrap = 271 276 multi_create_tracking_override(XRT_TRACKING_OVERRIDE_ATTACHED, ht, &d->base, 272 277 XRT_INPUT_GENERIC_HEAD_POSE, &head_in_left_cam); 273 - out_xdevs[out_idx++] = wrap; 278 + 279 + struct xrt_device *two_hands[2]; 280 + cemu_devices_create(&d->base, wrap, two_hands); 281 + out_xdevs[out_idx++] = two_hands[0]; 282 + out_xdevs[out_idx++] = two_hands[1]; 274 283 } 275 284 // Don't need it anymore. And it's not even created unless we hit this codepath, which is somewhat hard. 276 285 t_stereo_camera_calibration_reference(&cal, NULL);