About Free-IMU algorithm

Asked by Fatih

Hello,

I am checking out the code of the FreeIMU and i see that there are
two ways to have yaw pitch and roll angles: one is with
"FreeIMU::getYawPitchRoll" function and the other is
"FreeIMU::getEuler". First i thought the first one is to determine
euler angles with respect to quaternion and the other is euler only.
But when i rotate the imu on pitch axis, after +90 degrees, the angle
gets to be smaller (i.e. lets say it is actually +135 degrees but the
imu gives me +45 degrees. But its calculations are OK in the 0-90
degrees interval) This problem is look like as if there is a
singularity point but (correct me if i am wrong) i think in quaternion
we should not be effected by any singular points. Or what am i missing
here?

What is more I think i messed up the gyro-accel-magnetometer
directions. Because when i move the IMU in one axis (lets say roll),
the other axis is also effected and moves at the same time (Or do you
have any other ideas about this problem?) Therefore, could you please
specify exactly what will be the values[] and their units? (i am using
ITG 3200 and placed as if it is on Freeimu then gyro x determines
roll, but in pitch(gyro y) and yaw (gyro z), the polarity of the
output will be multiplied by -1 right?(according to aeroplane rotation
order) Lastly, I am having problems with yaw angle. It is not giving
out proper angles. Do i have to calibrate magnetometer, or the raw
values would be enough?

Regards,

Fatih

Question information

Language:
English Edit question
Status:
Answered
For:
FreeIMU Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Fabio Varesano (fabio-varesano) said :
#1

The getEuler function will return Euler angles which by definition are correlated as they are the subsequent rotations angles to get from one orientation to another. In particular, the getEuler will return the 3 angles which used as subsequent rotations will produce the same orientation of the IMU.

If you need to know the angles between Imu's X, Y and Hearth plane, as well as the angle between IMU's X and the Earth north, then you should use getYawPitchRoll.

Revision history for this message
Fatih (fatihsenkul) said :
#2

Hmm, so if i will use the IMU for 3 axis camera mount, i should be preffering getYawPitchRoll function. (am I right on this?)

Still I have the problem in which both of roll and pitch axises move together, when i only move the imu in one axis. (lets say pitch) What do you think about it?

Thank you

Revision history for this message
Fabio Varesano (fabio-varesano) said :
#3

It shouldn't happen if you use getYawPitchRoll and you correctly set up the code for your IMU. The library expect the axis of the sensors aligned and this may not be true in your case.

Can you help with this problem?

Provide an answer of your own, or ask Fatih for more information if necessary.

To post a message you must log in.