Skip to content

Commit 1d8e738

Browse files
committed
Merge pull request #108511 from lyuma/htcx_wrist_ankle
Add missing OpenXR paths to /user/vive_tracker_htcx
2 parents 20606b1 + 0620eb1 commit 1d8e738

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

modules/openxr/action_map/openxr_action_map.cpp

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ void OpenXRActionMap::create_default_action_sets() {
227227
"/user/vive_tracker_htcx/role/chest,"
228228
"/user/vive_tracker_htcx/role/camera,"
229229
"/user/vive_tracker_htcx/role/keyboard,"
230+
"/user/vive_tracker_htcx/role/left_wrist,"
231+
"/user/vive_tracker_htcx/role/right_wrist,"
232+
"/user/vive_tracker_htcx/role/left_ankle,"
233+
"/user/vive_tracker_htcx/role/right_ankle,"
230234
"/user/eyes_ext");
231235
Ref<OpenXRAction> aim_pose = action_set->add_new_action("aim_pose", "Aim pose", OpenXRAction::OPENXR_ACTION_POSE, "/user/hand/left,/user/hand/right");
232236
Ref<OpenXRAction> grip_pose = action_set->add_new_action("grip_pose", "Grip pose", OpenXRAction::OPENXR_ACTION_POSE, "/user/hand/left,/user/hand/right");
@@ -246,7 +250,11 @@ void OpenXRActionMap::create_default_action_sets() {
246250
"/user/vive_tracker_htcx/role/waist,"
247251
"/user/vive_tracker_htcx/role/chest,"
248252
"/user/vive_tracker_htcx/role/camera,"
249-
"/user/vive_tracker_htcx/role/keyboard");
253+
"/user/vive_tracker_htcx/role/keyboard,"
254+
"/user/vive_tracker_htcx/role/left_wrist,"
255+
"/user/vive_tracker_htcx/role/right_wrist,"
256+
"/user/vive_tracker_htcx/role/left_ankle,"
257+
"/user/vive_tracker_htcx/role/right_ankle");
250258

251259
// Create our interaction profiles.
252260
Ref<OpenXRInteractionProfile> profile = OpenXRInteractionProfile::new_profile("/interaction_profiles/khr/simple_controller");
@@ -508,7 +516,11 @@ void OpenXRActionMap::create_default_action_sets() {
508516
"/user/vive_tracker_htcx/role/waist/input/grip/pose,"
509517
"/user/vive_tracker_htcx/role/chest/input/grip/pose,"
510518
"/user/vive_tracker_htcx/role/camera/input/grip/pose,"
511-
"/user/vive_tracker_htcx/role/keyboard/input/grip/pose");
519+
"/user/vive_tracker_htcx/role/keyboard/input/grip/pose,"
520+
"/user/vive_tracker_htcx/role/left_wrist/input/grip/pose,"
521+
"/user/vive_tracker_htcx/role/right_wrist/input/grip/pose,"
522+
"/user/vive_tracker_htcx/role/left_ankle/input/grip/pose,"
523+
"/user/vive_tracker_htcx/role/right_ankle/input/grip/pose");
512524
profile->add_new_binding(haptic,
513525
// "/user/vive_tracker_htcx/role/handheld_object/output/haptic," <-- getting errors on this one.
514526
"/user/vive_tracker_htcx/role/left_foot/output/haptic,"
@@ -522,7 +534,11 @@ void OpenXRActionMap::create_default_action_sets() {
522534
"/user/vive_tracker_htcx/role/waist/output/haptic,"
523535
"/user/vive_tracker_htcx/role/chest/output/haptic,"
524536
"/user/vive_tracker_htcx/role/camera/output/haptic,"
525-
"/user/vive_tracker_htcx/role/keyboard/output/haptic");
537+
"/user/vive_tracker_htcx/role/keyboard/output/haptic,"
538+
"/user/vive_tracker_htcx/role/left_wrist/output/haptic,"
539+
"/user/vive_tracker_htcx/role/right_wrist/output/haptic,"
540+
"/user/vive_tracker_htcx/role/left_ankle/output/haptic,"
541+
"/user/vive_tracker_htcx/role/right_ankle/output/haptic");
526542
add_interaction_profile(profile);
527543

528544
// Create our eye gaze interaction profile.

modules/openxr/extensions/openxr_htc_vive_tracker_extension.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ PackedStringArray OpenXRHTCViveTrackerExtension::get_suggested_tracker_names() {
5757
"/user/vive_tracker_htcx/role/chest",
5858
"/user/vive_tracker_htcx/role/camera",
5959
"/user/vive_tracker_htcx/role/keyboard",
60+
"/user/vive_tracker_htcx/role/left_wrist",
61+
"/user/vive_tracker_htcx/role/right_wrist",
62+
"/user/vive_tracker_htcx/role/left_ankle",
63+
"/user/vive_tracker_htcx/role/right_ankle",
6064
};
6165
return arr;
6266
}
@@ -82,6 +86,10 @@ void OpenXRHTCViveTrackerExtension::on_register_metadata() {
8286
openxr_metadata->register_top_level_path("Chest tracker", "/user/vive_tracker_htcx/role/chest", XR_HTCX_VIVE_TRACKER_INTERACTION_EXTENSION_NAME);
8387
openxr_metadata->register_top_level_path("Camera tracker", "/user/vive_tracker_htcx/role/camera", XR_HTCX_VIVE_TRACKER_INTERACTION_EXTENSION_NAME);
8488
openxr_metadata->register_top_level_path("Keyboard tracker", "/user/vive_tracker_htcx/role/keyboard", XR_HTCX_VIVE_TRACKER_INTERACTION_EXTENSION_NAME);
89+
openxr_metadata->register_top_level_path("Left wrist tracker", "/user/vive_tracker_htcx/role/left_wrist", XR_HTCX_VIVE_TRACKER_INTERACTION_EXTENSION_NAME);
90+
openxr_metadata->register_top_level_path("Right wrist tracker", "/user/vive_tracker_htcx/role/right_wrist", XR_HTCX_VIVE_TRACKER_INTERACTION_EXTENSION_NAME);
91+
openxr_metadata->register_top_level_path("Left ankle tracker", "/user/vive_tracker_htcx/role/left_ankle", XR_HTCX_VIVE_TRACKER_INTERACTION_EXTENSION_NAME);
92+
openxr_metadata->register_top_level_path("Right ankle tracker", "/user/vive_tracker_htcx/role/right_ankle", XR_HTCX_VIVE_TRACKER_INTERACTION_EXTENSION_NAME);
8593

8694
{ // HTC Vive tracker
8795
// Interestingly enough trackers don't have buttons or inputs, yet these are defined in the spec.
@@ -102,6 +110,10 @@ void OpenXRHTCViveTrackerExtension::on_register_metadata() {
102110
"/user/vive_tracker_htcx/role/chest",
103111
"/user/vive_tracker_htcx/role/camera",
104112
"/user/vive_tracker_htcx/role/keyboard",
113+
"/user/vive_tracker_htcx/role/left_wrist",
114+
"/user/vive_tracker_htcx/role/right_wrist",
115+
"/user/vive_tracker_htcx/role/left_ankle",
116+
"/user/vive_tracker_htcx/role/right_ankle",
105117
}) {
106118
openxr_metadata->register_io_path(profile_path, "Grip pose", user_path, user_path + "/input/grip/pose", "", OpenXRAction::OPENXR_ACTION_POSE);
107119

0 commit comments

Comments
 (0)