Sensor calibration: why quaternion instead of Euler angles?

Hi,

I just checked the calibrated_sensor.json file, and found that the rotation of a calibrated senor is represented by quaternion instead of Euler angles.
For me, most of the calibration methods output ratation matrix, which can be transformed into quaternion or Euler angles.
Is there a reason for choosing quaternion? Is it related to the gimbal lock problem of a rotation?

Best regards,
Chris

@Chris there are various advantages to representing rotation as a quaternion, rather than Euler angles - this article discusses some of those advantages, which include:

  • More compact representation
  • Computationally more efficient
  • Does not suffer from gimbal lock