MobileRoboticsSkoltech/OpenCamera-Sensors

Erroneous Rotation vector

nitin-ppnp opened this issue · 1 comments

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

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