ashtuchkin / vive-diy-position-sensor

Code & schematics for position tracking sensor using HTC Vive's Lighthouse system and a Teensy board.
MIT License
916 stars 110 forks source link

Mismatch b/w coordinate axis mapping - real world and sensor values #54

Closed maker-ja closed 4 years ago

maker-ja commented 6 years ago

If we move the object in a particular axis wrt the ground and the light house, we get a change in all 3 axes, which is different in respect to the change given by the Vive controllers. As per our understanding there is a mismatch in the coordinate axes that unity uses and the one given by this repository. We could try to solve the problem by applying coordinate geometry on multiple points and find the shift and rotation in both coordinate spaces. Is there any other solution for the same? Please suggest a solution.

koen1993 commented 6 years ago

You are using the teensy? You used your own RotationMatrixes?(aka you configured the teensy) configuration and rotationmatrixes are referenced in issue #53 (i only work with steamvr so i can't be sure it is off help for you, but also try to exchange b0, and b1 rotmats i had one specific error where these where sometimes exchanged and resulting in 1-2 axis beeing pretty much *(-1) what they should be(Reson beeing that the wrong basestation is given out, and we take the wrong one as "zero point" to start building our coordinates))

ashtuchkin commented 4 years ago

I assume Unity applies it's own set of rotations/transformations, make sure you got them right. Otherwise I don't have a solution. It did work fine for me when I tried without additional rotations.