Skip to content

Commit

Permalink
[PicoXR] Use a different input profile for Pico4U
Browse files Browse the repository at this point in the history
Pico has defined a input profile for the Pico4U which is different
to the ones for the Pico4 or the Pico4E. It is not in any OpenXR
doc so we were not aware of it. We got that info from the Pico
customer service.

The problem was that the runtime was selecting the generic Khronos
profile instead of the Pico4 profile because we were not suggesting
the specific profile for the 4U but for the 4 (or 4E). Actually
the runtime should probably select the Pico4 profile over the generic
one but that's their decision anyway.

Apart from specifying the specific profile, we're also removing the
interaction profile we used to use for the Pico4 which was actually
designed for the Neo3. No device should be using that nowadays as
they should have support for the newer ones.
  • Loading branch information
svillar committed Feb 4, 2025
1 parent 5306610 commit 1223f35
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions app/src/openxr/cpp/OpenXRInputMappings.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,31 +239,6 @@ namespace crow {
},
};

// Pico controller: this definition was created for the Pico 4, but the Neo 3 will likely also be compatible
const OpenXRInputMapping Pico4xOld {
"/interaction_profiles/pico/neo3_controller",
"vr_controller_pico4_left.obj",
"vr_controller_pico4_right.obj",
device::Pico4x,
std::vector<OpenXRInputProfile> { "pico-4", "generic-trigger-squeeze-thumbstick" },
std::vector<OpenXRButton> {
{ OpenXRButtonType::Trigger, kPathTrigger, OpenXRButtonFlags::ValueTouch, OpenXRHandFlags::Both },
{ OpenXRButtonType::Squeeze, kPathSqueeze, OpenXRButtonFlags::Value, OpenXRHandFlags::Both },
{ OpenXRButtonType::Thumbstick, kPathThumbstick, OpenXRButtonFlags::ClickTouch, OpenXRHandFlags::Both },
{ OpenXRButtonType::ButtonX, kPathButtonX, OpenXRButtonFlags::ClickTouch, OpenXRHandFlags::Left },
{ OpenXRButtonType::ButtonY, kPathButtonY, OpenXRButtonFlags::ClickTouch, OpenXRHandFlags::Left, },
{ OpenXRButtonType::ButtonA, kPathButtonA, OpenXRButtonFlags::ClickTouch, OpenXRHandFlags::Right },
{ OpenXRButtonType::ButtonB, kPathButtonB, OpenXRButtonFlags::ClickTouch, OpenXRHandFlags::Right },
{ OpenXRButtonType::Back, kPathBack, OpenXRButtonFlags::Click, OpenXRHandFlags::Left, ControllerDelegate::Button::BUTTON_APP, true }
},
std::vector<OpenXRAxis> {
{ OpenXRAxisType::Thumbstick, kPathThumbstick, OpenXRHandFlags::Both },
},
std::vector<OpenXRHaptic> {
{ kPathHaptic, OpenXRHandFlags::Both },
},
};

const OpenXRInputMapping Pico4x {
"/interaction_profiles/bytedance/pico4_controller",
"vr_controller_pico4_left.obj",
Expand All @@ -289,7 +264,7 @@ namespace crow {
};

const OpenXRInputMapping Pico4U {
"/interaction_profiles/bytedance/pico4_controller",
"/interaction_profiles/bytedance/pico4s_controller",
"vr_controller_pico4u_left.obj",
"vr_controller_pico4u_right.obj",
device::Pico4U,
Expand Down Expand Up @@ -475,8 +450,8 @@ namespace crow {
},
};

const std::array<OpenXRInputMapping, 15> OpenXRInputMappings {
OculusTouch, OculusTouch2, MetaQuestTouchPro, Pico4U, Pico4x, Pico4xOld, PicoNeo3, Hvr6DOF, Hvr3DOF, LenovoVRX, MagicLeap2, MetaTouchPlus, HandInteraction, MSFTHandInteraction, KHRSimple
const std::array<OpenXRInputMapping, 14> OpenXRInputMappings {
OculusTouch, OculusTouch2, MetaQuestTouchPro, Pico4U, Pico4x, PicoNeo3, Hvr6DOF, Hvr3DOF, LenovoVRX, MagicLeap2, MetaTouchPlus, HandInteraction, MSFTHandInteraction, KHRSimple
};

} // namespace crow

0 comments on commit 1223f35

Please sign in to comment.