Jump to content

[Tutorial] OpenXR PC VR : How to use VIVE Tracker


Vivi Wu

Recommended Posts

 VIVE Tracker offers endless possibilities as a robust, unintrusive solution for adding high-precision positional tracking to any associated real-life object.

And VIVE OpenXR PC VR Plugin also support VIVE Tracker.

Here's some tutorial for VIVE Tracker:

  • What you will learn in the following tutorials:
    1. How to setup the VIVE Tracker on PC
    2. Get and setup OpenXR VIVE Tracker Plugin
    3. Use VIVE Tracker in UE5 or Unity project
       
  1. [VIVE Tracker] Using OpenXR in Unreal Engine:
    For VIVE Tracker Plugin is provided by Valve, and you can download it from their GitHub Here.
    Also we provide the guide here OpenXR_VIVE_Tracker_Tutorial_for_Unreal_Engine.pdf
  2.  [VIVE Tracker] Using OpenXR in Unity:
    Here's an awesome video we found on YouTube from an enthusiastic Unity developer - VR with Andrew:

Note If you're looking for the OpenXR tutorial for Wrist Tracker, please refer the tutorial Here.

Link to comment
Share on other sites

  • 4 months later...

I have tried the Vive Tracker Profile in Unity with OpenXR, it works but only if the trackers are connected before launching the app. 
If you launch the app directly it will start the SteamVR and then if you connect the tracker, SteamVR connects the tracker but the app doesn't receive any update that the tracker is connected. Is there a way to receive an update if the tracker gets connected after the launch of the app? 

Thank you!

Link to comment
Share on other sites

  • 5 months later...

I've been struggling the past few days trying to get this to work with POGO Pins for input from the Vive Tracker... as far as I can see, it is not possible. Can anyone at HTC Vive get this working with OpenXR? My guess is that the only way for the Action inputs to work, is to mark the Vive Tracker as a "handheld_object", but I am unable to get input passed to Unity when marking the tracker as "handheld_object" or (Held in Hand)... it will only appear as the other roles, but not as "handheld_object".

The OpenXR™ Specification (khronos.org)

roles.PNG

CodeRoles.PNG

MissingRole.PNG

Link to comment
Share on other sites

On 8/31/2023 at 3:49 AM, VIVE_chengnay said:

Hi @AEntropy,

May I know what's your project setup environment?

Could you please list the verions for Unity Editor and all installed plugins?

Thanks!

Sure, but not sure if that makes a difference, I am able to get the tracker POSE to work, just not the Pogo Pin Inputs. Have you been able to get them working?

Unity 2021.3.18f

image.png.392d4f22608577dbfa93aa832cd81287.png

Link to comment
Share on other sites

Great! Thank you.

And, no... the issue is that I cannot get pogo pins to work, AT ALL, using OpenXR, regardless of roles. On the Unity forums, it seems no one is able to get it working.

I am thinking that maybe the reason it is not working is because I need to assign the tracker to the "Held In Hand" role before the Actions will work, but maybe this is a wrong guess as to why it is not working. I, like many others, just need to be able to get Pogo Pins input, regardless of whichever role is assigned.

  • Sad 1
Link to comment
Share on other sites

Hi @AEntropy,

I just tested and I can get inputs from "Held in Hand" role.

Did you test by using SteamVR > Settings > Controllers > Test Controller

image.png.3afcd02d6449f562f30fb7c02e323363.png

NOTE: I just tested with other roles(Left Shoulder) and it did show up in "TEST CONTROLLER", but in content, I couldn't get input.

By the way, I use VIU's UGUI example scene in my test.

If you installed VIU, could you also try this too?

Link to comment
Share on other sites

On 9/14/2023 at 2:34 AM, VIVE_chengnay said:

Hi @AEntropy,

I just tested and I can get inputs from "Held in Hand" role.

Did you test by using SteamVR > Settings > Controllers > Test Controller

image.png.3afcd02d6449f562f30fb7c02e323363.png

NOTE: I just tested with other roles(Left Shoulder) and it did show up in "TEST CONTROLLER", but in content, I couldn't get input.

By the way, I use VIU's UGUI example scene in my test.

If you installed VIU, could you also try this too?

This Original Post is about getting the Vive Tracker to work with OpenXR.

If you are unaware, there are 3 major Input Schema's using SteamVR products.
1. OpenVR
2. OpenVR 2.0 (2018) which adds the SteamVR Input Actions system.
3. OpenXR which is the new standard and uses the Unity Input Actions system.

I am pretty sure that VIU was built using OpenVR 2.0, and maybe has been updated to work with OpenXR in some ways, but most likely doesn't add any Vive Tracker functionality with OpenXR.

If you look at the OP, they share a link to a YouTube video, which currently, is the only way to get the Vive Tracker to work with OpenXR. This is not a HTC Vive implemented way to get Vive Trackers to work with OpenXR, but instead is a custom script written by people on the Unity Forums. So it looks like currently, the Vive Tracker isn't currently officially supported by HTC Vive with OpenXR, only with OpenVR and OpenVR 2.0. It would be great if the Vive Trackers could be officially supported by HTC Vive to use OpenXR, which is the new standard.

I am able to get the Vive Tracker with input working in OpenVR 2.0, but not with OpenXR... so this is what I am trying to get solved here.

I tested what you suggested, installing VIU and running the UGUI scene, but running this makes no sense as it is a scene meant to work with Controllers, not with Trackers. The tracker doesn't show up, but it works with controller, so this doesn't help.

Link to comment
Share on other sites

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...