Skip to content

Orientation in the tracker's local coordinate system #888

@tomassykora

Description

@tomassykora

Hello,

From what I've seen, the orientation obtained by GetDeviceToAbsoluteTrackingPose seems to be in the coordinate system of the lighthouses although I'm not completely sure about that (either that or my obtaining of the euler angles from the rotation matrix is incorrect). How can I get the orientation in local coordinate system of the tracker? Is it possible? I couldn't find an answer to this in the documentation and the data I'm obtaining are a little weird, I cannot decide which directions correspond to specific axes and it's a mess (e.g. when I'm rotating in the yaw direction with the tracker, the roll value is changing also). This is what I use to get the euler angles from a vr::HmdMatrix34_t matrix:

double sy    = std::sqrt(std::pow(mPose.m[0][0], 2) + std::pow(mPose.m[0][1], 2));
double roll  = std::atan2(mPose.m[1][2], mPose.m[2][2]);
double pitch = std::atan2(mPose.m[0][2], sy);
double yaw   = std::atan2(mPose.m[0][1], mPose.m[0][0]);

Thanks for any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions