Jump to content

[Unity/XR Interaction Toolkit] Controller position and rotation freezed when leaving sleep mode after updating to Wave XR 5.6.0


Romain

Recommended Posts

Hello, I recently updated the Wave XR Plugin to version 5.6.0 (I was previously on version 5.2.1). Since I did the update when my app opens after leaving sleep mode the controllers position and rotation is not updated anymore as you can see in attached video. If I turn on and off the controllers repetitively they eventually work back correctly but it takes a lot of attempts. I checked the logs but I don't see any specific error logs when the issue happens.

I'm pretty sure the issue is related to the XR Interaction toolkit and the use of Action Based XR Controllers because I did the Wave XR Plugin update on several projects that are not using XR Interaction toolkit and everything work fine on them.

I initially though this was related to the error below that I had in the editor, but I fixed the error by uninstalling the OpenXR package that was creating the confusion between UnityEngine.InputSystem.XR.PoseControl and UnityEngine.XR.OpenXR.Input.PoseControl and I still got the issue.

ArgumentException: Expected control 'pose' to be of type 'PoseControl' but is of type 'PoseControl' instead!
Parameter name: path
UnityEngine.InputSystem.InputControl.GetChildControl[TControl] (System.String path) (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/Controls/InputControl.cs:667)
Wave.XR.ViveWaveWristTracker.FinishSetup () (at Library/PackageCache/com.htc.upm.wave.xrsdk@5.6.0-r.10/Runtime/ViveWaveWristTracker.cs:125)
UnityEngine.InputSystem.InputControl.CallFinishSetupRecursive () (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/Controls/InputControl.cs:937)
UnityEngine.InputSystem.Layouts.InputDeviceBuilder.Setup (UnityEngine.InputSystem.Utilities.InternedString layout, UnityEngine.InputSystem.Utilities.InternedString variants, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription) (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/Devices/InputDeviceBuilder.cs:60)
UnityEngine.InputSystem.InputDevice.Build[TDevice] (System.String layoutName, System.String layoutVariants, UnityEngine.InputSystem.Layouts.InputDeviceDescription deviceDescription, System.Boolean noPrecompiledLayouts) (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/Devices/InputDevice.cs:898)
UnityEngine.InputSystem.InputManager.RecreateDevice (UnityEngine.InputSystem.InputDevice oldDevice, UnityEngine.InputSystem.Utilities.InternedString newLayout) (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/InputManager.cs:663)
UnityEngine.InputSystem.InputManager.RecreateDevicesUsingLayout (UnityEngine.InputSystem.Utilities.InternedString layout, System.Boolean isKnownToBeDeviceLayout) (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/InputManager.cs:555)
UnityEngine.InputSystem.InputManager.PerformLayoutPostRegistration (UnityEngine.InputSystem.Utilities.InternedString layoutName, UnityEngine.InputSystem.Utilities.InlinedArray`1[TValue] baseLayouts, System.Boolean isReplacement, System.Boolean isKnownToBeDeviceLayout, System.Boolean isOverride) (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/InputManager.cs:473)
UnityEngine.InputSystem.InputManager.RegisterControlLayout (System.String name, System.Type type) (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/InputManager.cs:321)
UnityEngine.InputSystem.InputSystem.RegisterLayout (System.Type type, System.String name, System.Nullable`1[T] matches) (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/InputSystem.cs:239)
UnityEngine.InputSystem.InputSystem.RegisterLayout[T] (System.String name, System.Nullable`1[T] matches) (at Library/PackageCache/com.unity.inputsystem@1.4.3/InputSystem/InputSystem.cs:260)
UnityEngine.XR.OpenXR.Input.OpenXRInput.RegisterLayouts () (at Library/PackageCache/com.unity.xr.openxr@1.5.3/Runtime/input/OpenXRInput.cs:141)
UnityEngine.XR.OpenXR.Input.OpenXRInput.<RegisterFeatureLayouts>g__OnFirstFrame|7_0 () (at Library/PackageCache/com.unity.xr.openxr@1.5.3/Runtime/input/OpenX

Do anyone already had this issue and found a way to fix this ?

Here are the unity and package version i'm using:

- Unity: 2021.3.13f1
- Wave XR Plugin: 5.6.0-r.10
- XR Interaction Toolkit: 2.0.4
- XR plugin management: 4.2.1

Thanks,

Link to comment
Share on other sites

Hi @Romain,

Regarding the "PoseControl" error is caused by OpenXR 1.6.0 or newer version. Please make sure you uninstall the OpenXR package cleanly.
After uninstalled, please go to the menu Edit > Preferences and click "Regenerate project files".
If there is still compiled error, use the code below:

#if USE_INPUT_SYSTEM_POSE_CONTROL // Scripting Define Symbol added by using OpenXR Plugin 1.6.0.
using PoseControl = UnityEngine.InputSystem.XR.PoseControl;
#else
using PoseControl = UnityEngine.XR.OpenXR.Input.PoseControl;
#endif

About the controller pose issue after suspend/resume, this is known issue of Unity Input System.

So far, we don't have any solution, you need to reboot your controller to recover.

Link to comment
Share on other sites

Hi @VIVE_chengnay,

Thank you for the answer.

For the controller pose issue, should the controller recover after one reboot ? Because on my end I have to turn on/off the controller several times, sometimes 7-8 times. So if there is anything I could do to make sure the controller always recover after the first reboot that would be nice.

Thanks,

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...