MobileRoboticsSkoltech / OpenCamera-Sensors

Android app for synchronized recording of video and IMU data with advanced camera options, useful for 3D reconstruction, SLAM, AR, video stabilization. Supports remote control over network.
GNU General Public License v3.0
176 stars 19 forks source link

Erroneous Rotation vector #71

Open nitin-ppnp opened 2 years ago

nitin-ppnp commented 2 years ago

I am trying to get the Rotation vector data using the add_sensors branch. I have observed that the Rotation vector data has two modes and the values keep switching between these two modes. The data from other sensors are fine. The "x","y","z","t" plot for the rotation vector looks like this image

And the CSV files looks like this

image

For this data, I have kept the phone static lying on a table (not horizontal, slightly inclined).

azaat commented 2 years ago

Thank you for the report! I've checked the documentation and think I see the error in how this is computed now (incorrect usage of getrotationmatrix method), we'll fix this one

Also, I've adopted this approach from another contributor, but maybe a more correct way would be to just use the output of Sensor.TYPE_ROTATION_VECTOR itself