···1616#include "tracking/t_tracking.h"
1717#include "tracking/t_hand_tracking.h"
1818#include "xrt/xrt_prober.h"
1919+#include "xrt/xrt_tracking.h"
192020212122#ifdef __cplusplus
···3637 *
3738 * @param xfctx Frame context to attach the tracker to
3839 * @param calib Calibration struct for stereo camera
4040+ * @param create_info Additional creation options
3941 * @param out_sinks Sinks to stream camera data to
4042 * @param out_device Newly created hand tracker "device"
4143 * @return int 0 on success
···4345int
4446ht_device_create(struct xrt_frame_context *xfctx,
4547 struct t_stereo_camera_calibration *calib,
4646- struct t_camera_extra_info extra_camera_info,
4848+ struct t_hand_tracking_create_info create_info,
4749 struct xrt_slam_sinks **out_sinks,
4850 struct xrt_device **out_device);
4951
+5-2
src/xrt/drivers/rift_s/rift_s_tracker.c
···252252 extra_camera_info.views[0].camera_orientation = CAMERA_ORIENTATION_90;
253253 extra_camera_info.views[1].camera_orientation = CAMERA_ORIENTATION_90;
254254255255+ // TODO@mateosss: Use proper masks_sink in all drivers and not null
256256+ struct t_hand_tracking_create_info create_info = {.cams_info = extra_camera_info, .masks_sink = NULL};
257257+255258 int create_status = ht_device_create(xfctx, //
256259 t->stereo_calib, //
257257- extra_camera_info,
258258- &sinks, //
260260+ create_info, //
261261+ &sinks, //
259262 &device);
260263 if (create_status != 0) {
261264 return create_status;
+7-2
src/xrt/drivers/wmr/wmr_hmd.c
···16511651static int
16521652wmr_hmd_hand_track(struct wmr_hmd *wh,
16531653 struct t_stereo_camera_calibration *stereo_calib,
16541654+ struct xrt_hand_masks_sink *masks_sink,
16541655 struct xrt_slam_sinks **out_sinks,
16551656 struct xrt_device **out_device)
16561657{
···1674167516751676 //!@todo Turning it off is okay for now, but we should plug metric_radius (or whatever it's called) in, at some
16761677 //! point.
16781678+ // TODO@mateosss: do it now
16771679 extra_camera_info.views[0].boundary_type = HT_IMAGE_BOUNDARY_NONE;
16781680 extra_camera_info.views[1].boundary_type = HT_IMAGE_BOUNDARY_NONE;
16811681+16821682+ struct t_hand_tracking_create_info create_info = {.cams_info = extra_camera_info, .masks_sink = masks_sink};
1679168316801684 int create_status = ht_device_create(&wh->tracking.xfctx, //
16811685 stereo_calib, //
16821682- extra_camera_info, //
16861686+ create_info, //
16831687 &sinks, //
16841688 &device);
16851689 if (create_status != 0) {
···18191823 // Initialize hand tracker
18201824 struct xrt_slam_sinks *hand_sinks = NULL;
18211825 struct xrt_device *hand_device = NULL;
18261826+ struct xrt_hand_masks_sink *masks_sink = slam_sinks->hand_masks;
18221827 if (wh->tracking.hand_enabled) {
18231823- int hand_status = wmr_hmd_hand_track(wh, stereo_calib, &hand_sinks, &hand_device);
18281828+ int hand_status = wmr_hmd_hand_track(wh, stereo_calib, masks_sink, &hand_sinks, &hand_device);
18241829 if (hand_status != 0 || hand_sinks == NULL || hand_device == NULL) {
18251830 WMR_WARN(wh, "Unable to setup the hand tracker");
18261831 return false;
+9
src/xrt/include/tracking/t_hand_tracking.h
···105105};
106106107107/*!
108108+ * Creation info for the creation of a hand tracker
109109+ */
110110+struct t_hand_tracking_create_info
111111+{
112112+ struct t_camera_extra_info cams_info; //!< Extra camera info
113113+ struct xrt_hand_masks_sink *masks_sink; //!< Optional sink to stream hand bounding boxes to
114114+};
115115+116116+/*!
108117 * Synchronously processes frames and returns two hands.
109118 */
110119struct t_hand_tracking_sync