Vive Tracker Implementation using OpenXR in Unity

Поділитися
Вставка
  • Опубліковано 11 вер 2024

КОМЕНТАРІ • 101

  • @burrgurrman2433
    @burrgurrman2433 2 роки тому +2

    I don't even have any vive trackers, i just love your content

  • @clarkbaker8064
    @clarkbaker8064 Рік тому +11

    Hey everyone, in case it does not work for you, maybe also ensure the following:
    When I opened a new project and did everything as Andrew suggested, all was good. BUT:
    When in the Project Setting -> XR-Plugin-Management, I have found a yellow sign behind the OpenXR which told me that there is an issue:
    I cannot remember the exact wording, but it said something like:
    "InputSystem....PoseControl will be deprecated, click to change to OpenXR...PoseControl" (or the other way around...).
    I did that and... "swoosh" -> tracking does not work anymore. Unity does not list me all the trackers under "Devices" in the "Input Debug" anymore.
    So maybe that is iritating someone (like me), because you have hit that button in an earlier project state and couldnt remember even doing so...
    Probably the script you are importing from the forum still relies on that and can maybe even be easily fixed by using the updated "PoseControl" type but that's for a different post :D
    Also, of course, thanks a lot for the video, Andrew :)
    Cheers!

    • @yuanqing2772
      @yuanqing2772 Рік тому

      look like.....Could not create a device for 'HTC HTC Vive Tracker OpenXR (XRInputV1)' (exception: System.ArgumentException: Expected control 'devicePose' to be of type 'PoseControl' but is of type 'PoseControl' instead! ????

    • @clarkbaker8064
      @clarkbaker8064 Рік тому

      Yes, pretty sure that is exactly the error message i got before!

    • @lukeyager5883
      @lukeyager5883 Рік тому

      Thanks for clarifying this. Was your solution just to not fix the errors at all?

    • @clarkbaker8064
      @clarkbaker8064 Рік тому

      @@lukeyager5883 yes, exactly :)

    • @pjilipp
      @pjilipp 9 місяців тому

      Unity seems to have switched things around a bit. If you have stumbled upon this issue, simply go into the HTCVive Tracker Profile and change the line
      using PoseControl = UnityEngine.XR.OpenXR.Input.PoseControl;
      to
      using PoseControl = UnityEngine.InputSystem.XR.PoseControl;
      Hope this helps!

  • @yuanqing2772
    @yuanqing2772 2 роки тому +5

    Hello When I saw this video, I felt I saw hope, but I could not reproduce the contents of the video tutorial. Input debug could not detect any tracker except VR helmet.
    I'm sure every step of my operation is exactly the same as in the video.
    Including the version of unity.
    Because I am currently working on a DXR project, open VR does not seem to support dx12 API
    If I use open VR, ray tracing will not work
    If I use open XR, the tracker will fail
    This problem has been bothering me for six months

    • @athenaairis6422
      @athenaairis6422 Рік тому

      I have been having the same issue, and honestly I don't find any solution whatsoever. What has to be the DX12 with the tracking? Un real does this for Virtual Production and is a shame that nor Vive nor Unity are doing anything to solve this. I am moving to unreal losing thousands of dollars in assets.

  • @Skarredghost
    @Skarredghost Рік тому +1

    Thank you, very useful video!

    • @Hypothic
      @Hypothic Рік тому +1

      Are you using this tutorial? I am currently working with this but using with Tundra Tracker. Was able to get it working with Unity 2020.3.28 and 2021.3.18, with some issues but resolved by following solutions in the forums.
      Next step is to try to get this to work with Trigger input sent from the Tundra Tracker (or Vive Pogo Pins), seems no one has been able to do that yet.
      Reach out if you have any questions or want to try to figure out the Trigger input with me.

    • @Skarredghost
      @Skarredghost Рік тому +1

      @@Hypothic Thank you! I'm using the tutorial and it worked very well with Vive Trackers and Unity 2021.3 LTS

    • @Hypothic
      @Hypothic Рік тому +1

      @Skarredghost glad to hear it. I also got it working, but unfortunately wasn't able to get it working with the input pins, even though I tried a lot of things. Hopefully someone else can figure it out.

  • @hiteshkaplesh813
    @hiteshkaplesh813 2 місяці тому

    When using the tracker role as chest and controlling the virtual object using SteamVR tracked object using SteamVR , it looks more realistic when 3d object is in hand .
    But when I tried to do the same thing using Tracked Pose Driver (Input System) The position of tracker does not match the real world position ,
    Could you tell what could be the problem?

  • @bharanidharan8716
    @bharanidharan8716 13 днів тому

    Hi, I finsih this setup and This is working fine but i want to perform pogo pins. Can you tell how to acheive this in unity

  • @alexanderbaikyn7240
    @alexanderbaikyn7240 2 роки тому +2

    Just trying this a week later and looks like InputActionManager no longer exists? Has it been deprecated?

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому +1

      It's still there, are you sure you have XR Toolkit added?

    • @morris.d5562
      @morris.d5562 Рік тому

      Hi how are you?

  • @manojgembali178
    @manojgembali178 8 місяців тому

    Does this work without any headset ; just the base station and tracker or can with work with only tracker?

  • @mewtindewcat
    @mewtindewcat Рік тому +2

    where did you get the Input Action Manager? i cant find it

    • @VRwithAndrew
      @VRwithAndrew  Рік тому

      It should just be an additional component you can add.

    • @cameronboyd448
      @cameronboyd448 Рік тому +1

      Did you ever figure this out? I dont see the Input Action Manager Script either.

    • @guanlinli8734
      @guanlinli8734 Рік тому +1

      same issue

    • @cameron9687
      @cameron9687 Рік тому

      @@guanlinli8734 i figured it out, i will reply to u tomorrow when i get to my workstation

    • @ophelia6044
      @ophelia6044 Рік тому

      search for this video: "XR Toolkit 2.0 Crash Course using Unity 2021", it's made by the same guy, it explains how to get the XR Toolkit and all of that...

  • @jameswang7910
    @jameswang7910 9 місяців тому

    I've followed your instructions and created a new project with a cube, everything was looking good,
    except the tracker image was showing on top the cube always, how can I make it invisible, Thanks!

  • @vjanomolee
    @vjanomolee 2 роки тому

    Great explanation. Thank you!

  • @budhechiranjiv
    @budhechiranjiv Рік тому

    Hi, Is it possible to get update on the tracker status if it gets enabled/ activated after the Unity starts playing.

  • @boughedadaaymen1323
    @boughedadaaymen1323 Рік тому +1

    i did reproduce what u did but it didn't work for me, i add all packaging of XR and OpenXr also i add HTC controller Profile but when it comes to see the responses of my htc tracker it gives nothing only Zero, i'm using the same version as you
    any helps please thank you !

    • @imjyun
      @imjyun Місяць тому

      same problems lol 2024

    • @maryamboumrah3380
      @maryamboumrah3380 Місяць тому

      @@imjyun where to get the asset ViveTracker before adding the cs file?

  • @cwloki
    @cwloki Рік тому +2

    followed 1:1 but cant get it to track
    tracked state is also 0

    • @imjyun
      @imjyun Місяць тому

      same, all these fixes are trash

  • @thomasspalter5958
    @thomasspalter5958 Рік тому +1

    Hello! I'm trying to set up my tracker, it's definitely connected and I correctly added the tracker profile and I was seeing the tracker's position being read in the input debugger, however the one difference between what I'm doing and what I've seen in the video is that I'm not getting the extension/device added debug message and I'm not seeing Trackers for each type listed in the input debugger, aka I'm only seeing one tracker. Do you know how to help with this? I'd greatly appreciate it!

    • @thomasspalter5958
      @thomasspalter5958 Рік тому

      Also if it helps, the resulting output is that the cube I attached the tracked pose driver to sinks halfway through the plane and moving the tracker doesn't do anything.

  • @ChaosContrl
    @ChaosContrl 2 роки тому +1

    I take it you need to make a unique input map for each type of body part? So if I want both a left foot and a right foot type of tracker, they would have a HTCVIve Tracker Input [left foot] and HTCVIve Tracker Input [right foot] respectively?

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому +1

      You can most likely use the same Action Map. You would just need to be more specific with naming each Action.

  • @JelleWolbersTNO
    @JelleWolbersTNO Рік тому

    Awesome, thanks!

  • @siddiqBouharam
    @siddiqBouharam 10 місяців тому +1

    can this work with oculus quest 2?

    • @lukeyager5039
      @lukeyager5039 9 місяців тому +1

      Unfortunately not. There are round about ways of getting the trackers to technically work with an oculus headset, but it is not very accurate and is an extreme pain to setup every single time

    • @siddiqBouharam
      @siddiqBouharam 8 місяців тому

      @@lukeyager5039 🤝 thx

  • @laramoric9240
    @laramoric9240 9 місяців тому

    Do you know any way of activating the presence sensor without a headset? I've managed to connect a single tracker (I'm writing an application for the Hololens so I'm not using the Vice Hmd), but you were saying it won't work if the presence sensor is not activated.

    • @manojgembali178
      @manojgembali178 8 місяців тому

      Hey did you come up with any solution? I also want to integrate the Vivetracker with hololens

  • @flamingpizzareuploads4724
    @flamingpizzareuploads4724 Рік тому +1

    For some reason when I play my scene my tracked object is not centred on my vive tracker. It's following the correct position and rotation but is offset from the origin by a good amount. I tried changing the offsets in the profile script and that didn't work as well as moving my object in it's prefab but then it was rotating around the wrong point. Anyone had this issue?

    • @flamingpizzareuploads4724
      @flamingpizzareuploads4724 Рік тому +1

      Figured it out. I attached the trackers to the XRRig and that got them tracking correctly. Then I changed their positions in the prefabs to match the models I gave them.

  • @ShacharWeis
    @ShacharWeis Рік тому +2

    Has anyone managed to get this working WITHOUT a headset? (Null driver). No data arrives at the Input Debugger no matter what I do.

    • @ZhongleiHou
      @ZhongleiHou Рік тому

      I face the same problem too, can you help to try to use this method to get vive tracker position and rotation without headset?

    • @ShacharWeis
      @ShacharWeis Рік тому

      @@ZhongleiHou I wish I could, it just doesn't work.

    • @boughedadaaymen1323
      @boughedadaaymen1323 Рік тому

      the same case for me i reproduce the same as him but without headset , ididn't any values from debugger ?
      did any resolve the problem

    • @ShacharWeis
      @ShacharWeis Рік тому

      @@boughedadaaymen1323 I was not able to get it working despite a lot of effort. We eventually gave up and hooked up a headset (that does nothing) but then it works. Really annoying and completer failure on part of HTC and Steam. It seems that nobody is testing this usecase.

    • @boughedadaaymen1323
      @boughedadaaymen1323 Рік тому

      @@ShacharWeis could you please share how did un resolve the problem , i'm strugling with n i didn't get any good results tracker still not giving any position

  • @cometneon
    @cometneon Рік тому

    Is it possible to use valve index finger tracking in OpenXR? And if so can you make a tutorial on that? Or any way to get finger tracker values from the valve index controllers

    • @VRwithAndrew
      @VRwithAndrew  Рік тому

      Not at the moment, the only finger tracking for Index I'm aware of is through SteamVR.

    • @cometneon
      @cometneon Рік тому

      @@VRwithAndrew oh nooo. Well thank you. Is there any way to use OpenXR and SteamVR in the same project without them canceling each other out?

    • @VRwithAndrew
      @VRwithAndrew  Рік тому

      @@cometneon Not really? SteamVR needs to use OpenVR to work. However, OpenVR is just an implementation of the OpenXR standard. The unfortunately reality is that SteamVR hasn't been updated in like a year and a half. So, I'm starting to thing they're working on a new solution.

    • @cometneon
      @cometneon Рік тому

      @@VRwithAndrew yeah it feels like it to me too. It just doesn’t make sense that the star-of-the-show of their controllers is left inaccessible in OpenXR.

  • @scmentowski
    @scmentowski 2 роки тому

    This worked for one test. Now, neither controllers nor trackers are detected anymore. In any project and with any SteamVR version :O

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      That's really strange! I've used the project multiple times at this point and haven't had any issues.

  • @feyu5569
    @feyu5569 2 роки тому

    Hi! Thank you for this amazing tutorial. I want to know how do you extract the rotation/position data of the trackers so I can further use them to control elements in the unity scene? Thank you

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому +2

      Once you have the Input Actions setup, you can read their value in a script. You can look into my videos on Input Actions or a more generic video on Unity's Input System.

  • @mollymind
    @mollymind 2 роки тому

    Is it possible to export the tracked data into .fbx? I would like to use htc vive tracker as a mocap and use it on other apps.

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      I believe it would be possible. However, I'm not sure how I would go about doing it. I know you can at least record, and store the data in a .txt or .json file. It would then just come down to getting the data into a timeline or .fbx.

  • @francescapeveri1647
    @francescapeveri1647 Рік тому

    Hi! I'm trying to use the Tracker with OpenXR (with StreamVR everything works). I followed all your steps, but I still don't see any value in the "input debugger" related to the tracker . What could be the problem?

    • @VRwithAndrew
      @VRwithAndrew  Рік тому

      Double-checked that it's mapped properly in SteamVR, and you may also need to put on your headset, or cover up the player sensor for Unity to actually start tracking.

    • @francescapeveri1647
      @francescapeveri1647 Рік тому

      @@VRwithAndrew yes of course, I covered the sensor in the headset, the controllers work, with OpenXR With steamVR pointing device index to the SteamVR tracked Object script the tracker works...

    • @maracoduri6315
      @maracoduri6315 3 місяці тому

      @@francescapeveri1647 didi you find a solution? I have the some problem

  • @codeling42
    @codeling42 Рік тому

    Quite new to Unity; tried this in Unity 2022.3.2f1, and nearly everything worked well (except for, at the first try the ...PoseControl stuff, but figured that out thanks to the comments below); I'm stuck in the very last step though: I do not have the "Input Action Manager" available it seems?

    • @VRwithAndrew
      @VRwithAndrew  Рік тому +1

      Do you have XR Toolkit added to your project?

    • @codeling42
      @codeling42 Рік тому +1

      @@VRwithAndrew I indeed did not have the "XR Interaction Toolkit", installing that fixed the problem! Thanks for the fast reply and the great video!

  • @HenrikHuehn
    @HenrikHuehn 2 роки тому

    Does it work in Unity 2021 aswell ? Its not workeing for me. The Input debugger shows Zero Values for all input Types :/

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      I'm not sure! I'd check to see if you get the same results in 2020. Or, it could potentially be your project setup.

  • @mpomiss
    @mpomiss 2 роки тому

    Hi, thanks a lot for your video, it saved my butt :D Just a quick question... when I want to use 2 Vive Trackers, do I need to duplicate anything? How to separate them? I can see left and right controller when selecting path for a position/rotation but I can't see more than one Vive Tracker there. Thanks for your time :))

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      You'd need to make sure you have them set up with different roles in SteamVR. In the Input Manager, you would then need to set up some additional actions for each of the roles corresponding to the appropriate roles. I do this at 4:50 in the video.

    • @mpomiss
      @mpomiss 2 роки тому

      @@VRwithAndrew Thanks for your reply :)) I double checked everything and I set everything correctly (in project and in SteamVR settings). Right now, I have a different problem... the right tracker sticks to the left one. Similar problem has been discussed in the Unity thread you mention in this video. Do you have any suggestion what to do, please? :))

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      @@mpomiss Not at the moment, it's not something I've attempted to do unfortunately.

  • @horacemai7032
    @horacemai7032 2 роки тому

    Great video, thanks for sharing! I wonder how to make full-body motion capture in Unity with OpenXR and Vive trackers, really hope you can make a video like this, it would be really nice!

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому +2

      It's possible! I haven't done it, but I'm pretty sure you can start with recording the transforms over time and then interpolating the values.
      I'm still trying to come up with Vive Tracker-specific things I could do.

    • @horacemai7032
      @horacemai7032 2 роки тому +1

      @@VRwithAndrew Seems like Final IK can do it. It contains a function called VRIK.

  • @thatguitarguy99
    @thatguitarguy99 2 роки тому

    I followed steps exactly and the tracker appears in SteamVR, but I'm getting "HTC Vive Tracker Extension Not Enabled" in Unity console. Anyone have an idea why?

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      Most likely your project settings? Make sure that OpenXR is enabled and working, and that you can use a normal XR Rig without issue.

  • @LALESPETROS
    @LALESPETROS 2 роки тому

    How far these trackers can reach before disconnecting? Unfortunately, the OCULUS VR controllers can only move away from the headset no more than 2 meters :/ Thank you for the amazing video

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому +1

      Vive Trackers can be as far as the lighthouses track, which varies between models.

    • @LALESPETROS
      @LALESPETROS Рік тому

      @@VRwithAndrew Is that more or less than ten meters?

  • @yuanqing2772
    @yuanqing2772 2 роки тому

    Do you have patreon or discord?
    I think I can sponsor you

  • @imjyun
    @imjyun Місяць тому

    not working, all zeros from vive tracker, didnt even clear the first step.... followed exactly the same steps lol smh

  • @bkentffichter
    @bkentffichter Рік тому

    Anyone get this working without a headset? Yes I have done all of the required config settings and the tracker tracks in Unreal. I have set everything up here and no data in the Input analysis view. He does say to cover the sensor on the headset to get it working but I do not have one.

    • @michaelgonzalez8131
      @michaelgonzalez8131 Рік тому

      In the SteamVR video settings I know you can show advanced settings and then toggle off "Pause VR when headset is idle" which helps with tracking objects even without my headset on. I'm not sure if it would help if you don't have a headset at all, but worth a try!

  • @packsolite
    @packsolite Рік тому

    Sadly not working with tundra trackers.

    • @GeomeTeamCraft
      @GeomeTeamCraft 7 місяців тому

      Did you ever figure out how to make it work with tundra trackers?

    • @packsolite
      @packsolite 7 місяців тому

      @@GeomeTeamCraft no :/

  • @highvis_supply
    @highvis_supply 2 роки тому

    The only reason why I don't implement vive tracking in Unity using this method is that it is impossible to assign roles to vive controllers and therefore you are subject to a blackbox autoselecting lefthand & righthand controllers which may or may not flip at certain points in time if not using them in both your hands. A very specific use-case but still one nonedetheless

  • @darthtiberiu5
    @darthtiberiu5 9 місяців тому

    Anyone have this for Unreal 5.3?

  • @laranacolcappello
    @laranacolcappello Рік тому

    I'm following the video step by step, but i get in the console "HTC Vive Tracker Extension Not Enabled". Could anyone tell me why?

    • @erosviola7086
      @erosviola7086 Рік тому +1

      I have the same problem, did you find any solution?

    • @laranacolcappello
      @laranacolcappello Рік тому

      ​@@erosviola7086 I noticed that when I used my usual version of Unity (2022.2.9) it gave me this problem, but when I changed to an older version (I'm using 2020.3.34) it gave me no problems and I solved the problem. Let me know if you fix it :)

    • @erosviola7086
      @erosviola7086 Рік тому +1

      For me was just the xr runtime. I was using oculus instead of steamvr. Mb