sparkfun / SparkFun_ICM-20948_ArduinoLibrary

Arduino support for ICM_20948 w/ portable C backbone
Other
168 stars 72 forks source link

DMP Quaternions #135

Closed Amirhosein80 closed 10 months ago

Amirhosein80 commented 10 months ago

Hello, I’m planning to use quaternion data from the ICM DMP module for motion capture purposes, and I have a few questions about DMP:

  1. What are the differences between the INV_ICM20948_SENSOR_ROTATION_VECTOR and INV_ICM20948_SENSOR_ORIENTATION modes?
  2. How is the sensor calibration and what does the Accuracy value represent in the sensor data?
  3. When I convert the quaternions to roll, pitch, and yaw angles, the pitch value is constrained between 90 and -90 degrees. What might be the cause of this issue?

I would appreciate any insights or documentation you could provide on these matters.

Thank you!

PaulZC commented 10 months ago

Hi @Amirhosein80 ,

1) Please see: https://github.com/sparkfun/SparkFun_ICM-20948_ArduinoLibrary/blob/main/DMP.md#which-dmp-features-are-currently-supported. Both are "32-bit 9-axis quaternion + heading accuracy". All the information I have suggests the two modes are identical. The DMP may do something differently internally, but I have no information on that. Perhaps the quaternions use a different reference frame?

2) For Accel, Gyro and Compass Accuracy: The accuracy is expressed as 0~3. The lowest is 0 and 3 is the highest.

3) This is normal. A pitch of 90 degrees represents "straight up" or "straight down".

Best wishes, Paul

Amirhosein80 commented 9 months ago

Thanks I checked [DMP features](https://github.com/sparkfun/SparkFun_ICM-20948_ArduinoLibrary/blob/main/DMP.md#which-dmp-features-are-currently-supported) but there was no explanation about the difference in features.