Forum Discussion
bullale
11 years agoHonored Guest
ovrQuatf from ovrTrackingState.RawSensorData?
Other than implementing my own sensor-fusion algorithm, what is the best way to get the RAW orientation of the HMD, even after ovrHmd_RecenterPose has been called?
See this post and the following two posts for details of what I am trying to do.
See this post and the following two posts for details of what I am trying to do.
6 Replies
- cyberealityGrand ChampionWhat are you actually trying to accomplish?
Can you not just use the pose rotation value?ovrTrackingState ts = ovrHmd_GetTrackingState(hmd, frameTiming.ScanoutMidpointSeconds);
Posef pose = ts.HeadPose.ThePose;
Quatf rot = pose.Rotation; - bullaleHonored GuestI'm trying to get the raw unrecentered rotation, even after ovrHmd_RecenterPose has been called. My understanding is that after ovrHmd_RecenterPose has been called, the ovrTrackingState poses are recentered. I need both the recentered value and the unrecentered rotations.
- cyberealityGrand ChampionI'm not sure I see anything in the API to do this.
However, if your app is the one calling the RecenterPose couldn't you keep track of it inside your app code? - bullaleHonored GuestI am making a UE4 plugin and someone else is working on Unity integration for the PSMove. We don't really have control over how the developer will ask the engine to call RecenterPose. Maybe there's an event we can bind to somewhere.
But because the PSMove has a magnetometer, and the HMD has a magnetometer, it is theoretically possible to use the true (world) yaw from both devices, figure out the HMD-game yaw offset, and apply that to the PSMove. This is probably true of any other device with a magnetometer.
So please consider this a request to expose the raw pose and/or the offset which I assume exist anyway internally in the SDK. Is there an official way for me to do a feature request? - jhericoAdventurer
"bullale" wrote:
I'm trying to get the raw unrecentered rotation, even after ovrHmd_RecenterPose has been called. My understanding is that after ovrHmd_RecenterPose has been called, the ovrTrackingState poses are recentered. I need both the recentered value and the unrecentered rotations.
There's not really any such thing as a 'raw' pose. The pose is always accumulated from a starting position when the tracking is started / when the headset first comes into the camera frustum. If you want to get the difference between the pose before you call recenter and the pose after, then what you should do is store the pose right before you call recenter.
You'll probably also find it easier to manipulate if you convert the pose to a 4x4 matrix, as it's easier to find the difference between two matrices than the difference between a pair of quat/vec3 combinations.
Alternatively, you can gain some information out of the camera pose, before and after a recenter. But again, you're just finding the difference between two arbitrary poses, not a centered pose and some kind of absolute pose. As cyber said, maybe if you explain a little more about your problem, someone can provide a more detailed solution. - bullaleHonored Guest
"jherico" wrote:
There's not really any such thing as a 'raw' pose. The pose is always accumulated from a starting position when the tracking is started / when the headset first comes into the camera frustum.
Ah, I didn't know that. So if I want an absolute pose then I would need some supplemental sensor fusion applied to ovrTrackingState.RawSensorData?"jherico" wrote:
As cyber said, maybe if you explain a little more about your problem, someone can provide a more detailed solution.
I think the post I linked to in my first post is pretty detailed and even has a diagram to explain it, at least generally. And the follow-up post two below that describes it with references to specific API functions. I'm not sure what else to say... but I'll try.
I would like to represent my PSMove controller in the game world with the correct Yaw (only yaw) without relying on any "aim forward and press a button" actions to recenter. The PSMove and the HMD both have magnetometers, so it should be possible to do this by comparing the HMDs absolute yaw to its yaw in game to determine its yaw offset then applying that yaw offset to the PSMove's absolute yaw. It's one less step for the user and it is also likely to be more accurate than relying on the user to correctly aim something they can't even see. I've found the yaw-drift to be not-bad when the magnetometer is properly calibrated.
Another feature request: let us calibrate the DK2 magnetometer.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 10 years ago