cmbruns / pyopenxr

Unofficial python bindings for OpenXR access to VR and AR devices
Apache License 2.0
103 stars 8 forks source link

Creating new Action Spaces with Custom Pose does not respect rotation #93

Open hendrikunger opened 1 year ago

hendrikunger commented 1 year ago

I am trying to set the origin of the action spaces for trackers in your "vive_tracker" example to a custom Posef in order to return tracked positions in a frame of reference that is more useful for my application.

I noticed that the orientation quaternion of the new pose I pass to "pose_in_action_space" during the creation of action spaces does not have any influence on the returned coordinates. The position vector does translate the coordinates, but the values of the vector seem to influence the new coordinates in the wrong order. The x value of the vectors influences the new z, the y value the new x and the z value the new y. After some further fiddeling I found that setting the x or y value of the position vector leads to the new returned position being sensitive to rotation of the tracker.

I tried to look deeper into your library to understand, or maybe identify a typo, but as mentioned in my other comment, I have no experience with connecting python to c librarys. It seems the parameters of "xr.ActionSpaceCreateInfo" are somehow shifted.

Could this be a bug? Can I somehow help you investigate?

I am on Windows 10 and python 3.9 if this matters.