akito_n Posted March 17, 2021 Share Posted March 17, 2021 Hello, I'm writing a program to work with VIVE pro using the OpenVR SDK. Currently, there is a problem with the attitude information received from the HMD by GetDeviceToAbsoluteTrackingPose() or WaitGetPoses() of the OpenVR SDK. Specifically, the axis of posture that can be taken with GetDeviceToAbsoluteTrackingPose() may change. For example, the pitch angle may be inverted, or the pitch and roll may be swapped. Even with the same source code, different phenomena occur depending on the execution environment. Does anyone know the cause of these phenomena? Development environment GPU: NVIDIA GeForce GTX 1070 Ti OS: Ubuntu 18.04.2 LTS SteamVR: 1.16.10 (currently latest) OpenVR: 1.14.15 The HMD rotation matrix in the absolute coordinate system is calculated as follows. // Get poses of devices vr::TrackedDevicePose_t all_poses[vr::k_unMaxTrackedDeviceCount]; vr_system_->GetDeviceToAbsoluteTrackingPose(vr::ETrackingUniverseOrigin::TrackingUniverseStanding, 0, all_poses, vr::k_unMaxTrackedDeviceCount); vr::TrackedDevicePose_t hmd_pose = all_poses[vr::k_unTrackedDeviceIndex_Hmd]; // Get pose of HMD (DeviceToAbsolute) vr::HmdMatrix34_t abs_tracking = hmd_pose.mDeviceToAbsoluteTracking; // Get rotation matrix of HMD (DeviceToAbsolute) cv::Mat rmat = (cv::Mat_<double>(3,3) << abs_tracking.m, abs_tracking.m, abs_tracking.m, abs_tracking.m, abs_tracking.m, abs_tracking.m, abs_tracking.m, abs_tracking.m, abs_tracking.m); // Calculate rotation matrix of HMD (in Absolute coordinate system) cv::Mat rmat_inv = rmat.inv(); Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now