Page 1 of 1

Confusion regarding frames of reference

Posted: Mon Apr 26, 2021 10:17 am
by gustafaman
Hi, I have a question regarding how the euler angles of the CrazyFlie body is defined.
In the post "Problems modeling Crazyflie Controller" (viewtopic.php?f=6&hilit=NED&p=14020&t=2 ... 6fa68128e1) it is said that the roll, pitch and yaw are defined as:
wikiAng.png
and in the documentations, "The Coordinate System of the Crazyflie 2.X" as:
crazyAngle.png
However, to me it seems that this is contradictory for Yaw around the Z-axis. In the upper image going from 0 to 45 degrees would result in the plane turning to its right, while in the bottom picture the same change in yaw would make the CrazyFlie turn left. Could you help me understand how the CrazyFlies angles are defined?

The reason for my question is that I want to use the position and angle data gathered from the lighthouse sensors to actuate the propellers for a body that is modelled in the NED (upper) frame of reference.

Best Regards

Gustaf

Re: Confusion regarding frames of reference

Posted: Tue Apr 27, 2021 3:21 pm
by kristoffer
Hi!

The roll/pitch/yaw in the picture with the plane does not look completely correct to me.
The easiest way to check is probably to connect the Crazyflie to the client and observe the numbers in the lower part of the flight tab when moving the CF around.

Roll: positive when lifting the left "wing"
Pitch: positive when lifting the "nose"
Yaw: positive counter clock wise when seen from above

This means that roll and pitch is matching the picture while yaw is reversed.
The roll/pitch/yaw you get from the log sub system are in degrees.

The X/Y/Z coordinate system with the Crazyflie is correct, that is X is forward, Y to the left and Z up.