orientation - help

Asked by danilo del console

Hi Fabio, I am running the "FreeImu_yaw pitch roll" arduino sketch but I am a little bit confused about orientation.
referring to the axis printed on FreeImu Roll should be rotation on X axis, Yaw rotation on Z axis, pitch on Y axis. Am I right?
I can see that Yaw "Zero" is always in the same position (magnetic nord?) but often it slowly rotate 360° to go back in the right position. Is it right? How are yaw pitch roll related to magnetc field? thanks, bye

Question information

Language:
English Edit question
Status:
Answered
For:
FreeIMU Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #736461.

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

Converting this to a question.

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

Hi Danilo,

The yaw angle is the angle between the Earth North and FreeIMU X axis (rotation on Z).
The pitch angle is the angle between X axis and the horizontal plane (rotation on Y).
Roll is the angle between the Y axis and the horizontal plane (rotation on X).

You should note that these three angles are intended as Euler Angles thus are correlated: the orientation of FreeIMU frame with respect to the World frame can be expressed by the following successive rotations from alignment of FreeIMU frame with World frame: a rotation of yaw around Z, a rotation of pitch around Ys and a rotation of roll around Xs (where s means sensors frame FreeIMU).

See http://www.varesano.net/blog/fabio/ahrs-sensor-fusion-orientation-filter-3d-graphical-rotating-cube for more informations.

The rotation around Yaw you are experiencing it's probably what happens when you start the sketch: the algorithm assumes an initial position of yaw=pitch=roll=0 (sensor frame aligned with world frame).. but when you start the sketch in a different position (yaw=90deg) the algorithm will slowly approximate till the correct orientation (the approximation is slow as it won't detect any rotation from the gyroscope which is the main source of orientation so it simply approximate).

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

All of this will be covered on my thesis which I will release to the public in 2-3 weeks...

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

Danilo, I rewrote the getYawPitchRoll to no more using Euler angles.
See https://answers.launchpad.net/freeimu/+question/150323

Can you help with this problem?

Provide an answer of your own, or ask danilo del console for more information if necessary.

To post a message you must log in.