i
Roll, Pitch, Yaw daniel-hromada ()


Roll, Pitch, Yaw

Roll, pitch and yaw on a dancing body: one reference frame, six motion sensors, three rotations.

Why three angles?

Six small sensors on one dancer. Six streams of numbers. What do they actually say?

Each sensor answers one question: how am I turned, compared with the moment you pressed Calibrate?

The answer is always three numbers: roll, pitch and yaw.

Today: what these three words mean on a dancing body.

The body is the coordinate system

Reference%20frame%20and%20the%20six%20sensors%20(L%2FR%20hand%2C%20L%2FR%20leg%2C%20torso%2C%20head)

Reference frame and the six sensors (L/R hand, L/R leg, torso, head)

Origin: the sternum.

Calibration pose: standing straight, arms hanging, palms turned forward.

X points forward, out of the chest. Y points to the dancer's left. Z points up.

Like an aeroplane flying forward: nose, left wing, up.

Calibrate = declare this pose to be zero.

Six sensors, one skeleton

In%20ShivaSynth%20you%20mark%20where%20each%20sensor%20is%20worn%20(dancer%20seen%20from%20behind)

In ShivaSynth you mark where each sensor is worn (dancer seen from behind)

Two hands, two legs, torso, head.

Each sensor reports its orientation (roll, pitch, yaw), its rotation speed and its acceleration — at rest it feels gravity, 1 g pointing up.

Today we only need the first: orientation.

Three ways to turn

A rigid body in space can turn in exactly three independent ways.

Pilots named them. roll: tilt a wing down. pitch: nose up or down. yaw: nose left or right.

In our frame each one is a rotation about one axis: roll about X, pitch about Y, yaw about Z.

Which way is positive? The right-hand rule: thumb along the axis, fingers curl in the positive direction.

(In ShivaSynth the sign also depends on how a sensor is strapped on — more about that later.)

Roll, pitch, yaw are not parts of the body. They are rotations about the frame's axes.

Roll · about X

Roll%3A%20rotation%20about%20the%20forward%20X%20axis

Roll: rotation about the forward X axis

Turn about the axis that points out of your chest.

Torso: side bend. Head: tilt, ear to shoulder. Whole body: cartwheel.

Positive roll: leaning to the dancer's right.

In the app: twist.

Try it: tilt your head as if to say “hmm, I'm not so sure”.

Pitch · about Y

Pitch%3A%20rotation%20about%20the%20left-right%20Y%20axis

Pitch: rotation about the left-right Y axis

Turn about the axis that runs through you from right to left.

Torso: bow. Head: nod. Leg: kick forward.

Positive pitch: bowing forward.

In the app: lean.

Try it: nod “yes”.

Yaw · about Z

Yaw%3A%20rotation%20about%20the%20vertical%20Z%20axis%2C%20seen%20from%20above

Yaw: rotation about the vertical Z axis, seen from above

Turn about the vertical axis.

Torso: turn, pirouette. Head: look around, shake “no”.

Positive yaw: turning to the dancer's left (counter-clockwise, seen from above).

In the app: turn.

Yaw is special: nothing in gravity says which way you face. More about that in a minute.

Arms and legs: the axes follow the limb

Roll%2C%20pitch%20and%20yaw%20of%20an%20arm%20sensor

Roll, pitch and yaw of an arm sensor

On a limb the frame travels with the limb.

x runs along the bone towards the hand or foot; z points out of the skin; y completes the triple.

roll = twist the limb about its own axis (wrist, foot). pitch = raise / lower. yaw = swing aside.

Palms forward at calibration fixes what “zero twist” means.

One movement, two names

The%20same%20movement%20in%20two%20frames

The same movement in two frames

Lift your right arm sideways, like a jumping jack.

In the body frame that is a turn about X, the forward axis: a roll.

For the sensor on the wrist it is a turn about its own z: the app calls it yaw, swing aside.

Same rotation, same numbers. Only the name changed.

Always say which frame you are in.

Exercise · the order matters

Hold your phone flat in front of you, screen up.

A: turn it 90° to the left (yaw), then tip its far edge down 90° (pitch). Note where the screen points.

B: start again. Pitch first, then yaw.

Same two quarter-turns, two different poses.

Rotations do not commute. So “roll, pitch, yaw” needs an agreed order of application.

Gimbal lock

Gimbal%20lock%20in%20a%20deep%20bow

Gimbal lock in a deep bow

Bow deeply, torso horizontal: the axis out of your chest now points at the floor.

Now a turn about x (roll) and a turn about the vertical (yaw) are the same movement. The angles can no longer be told apart.

A glitch of the three-angle description — not of the body. Deep bows and raised arms bring any dancer there.

The cure: sensors compute with quaternions inside and use angles for display only. ShivaSynth's height is the angle between “up” now and “up” at calibration, which stays clean in every pose.

Three angles are a convenient language, not the truth of orientation.

Why yaw drifts

At rest, the accelerometer feels gravity. That gives roll and pitch — absolute.

Turning about the vertical does not change where gravity points. Yaw has no such anchor.

Two remedies: add up the gyroscope's rotation speed (small errors accumulate: drift) or consult a magnetic compass (disturbed by metal and electronics).

So: calibrate before you dance, and expect turn to be the least stable of the three.

From angles to music

ShivaSynth%20dashboard%3A%20roll%2C%20pitch%20and%20yaw%20per%20sensor%2C%20and%20the%20patch%20bay

ShivaSynth dashboard: roll, pitch and yaw per sensor, and the patch bay

In the dashboard every sensor plots its roll (red), pitch (blue) and yaw (yellow).

The patch bay turns them into controls: twist = roll, lean = pitch, turn = yaw.

In the Techno patch, for instance, the DJ filter follows lean, the acid line's cutoff follows twist.

If a signed feature goes the wrong way, flip the ± in the patch bay: the strap may sit the other way round.

Your body's rotations become the instrument's parameters.

Exercise · name that movement

Which sensor, which angle? Do each movement and say it aloud.

Nod “yes” → head, pitch

Shake “no” → head, yaw

Ear to shoulder → head, roll

Bow → torso, pitch  ·  Pirouette → torso, yaw  ·  Side bend → torso, roll

Wave sideways → hand, yaw  ·  Turn your foot out → leg, roll  ·  Kick → leg, pitch

And which of these gets you into gimbal lock?

Take home

Frame: origin at the sternum, X forward, Y left, Z up.

roll about X, pitch about Y, yaw about Z — and on a limb, the axes follow the limb.

The names depend on the frame; the order of rotations matters; yaw drifts; angles break down at 90°.

Next: from orientation to rhythm — what can we do with the speed of these rotations?