Robotics in Manufacturing

Coordinates

Euler Angles

Euler angles describe an orientation in 3D space as three sequential rotations about coordinate axes, which FANUC controllers express as W, P, and R.

What it is

Euler angles are a way to pin down which way a tool is pointing using three numbers, each a rotation about an axis. You build up an orientation by rotating step by step: turn about one axis, then the next, then the last.

On a FANUC pendant the three values show up as W, P, and R alongside the X, Y, Z position of a point. X, Y, Z say where the tool tip sits; W, P, R say how it's tilted. Together they give a full 6-number pose.

How it actually works

The order matters because rotations don't commute. Rotating 90 degrees about X then 90 about Y lands somewhere different from doing Y first. So an Euler triple is only meaningful with a fixed convention for which axis turns first and whether each turn is about the world frame or the frame you just rotated. FANUC's W, P, R correspond to roll, pitch, and yaw applied in a set sequence, so the controller can always reconstruct the same orientation from the same three numbers.

The catch is gimbal lock. When the middle rotation reaches a value that lines two of the rotation axes up with each other, one degree of freedom collapses: two of the three angles now spin about the same physical direction, and the orientation can no longer be resolved uniquely. On a robot this coincides with a wrist singularity, where wrist axes 4 and 6 become colinear and the controller can't work out how to split motion between them.

yaw (Z)roll (X)pitch (Y)

How it differs

  • Quaternion · A quaternion pins orientation with four numbers and never hits gimbal lock, so it's the go-to for smooth interpolation and internal math. Euler angles use three human-readable numbers (W, P, R on a FANUC), which is friendlier at the pendant but carries gimbal-lock and order-dependence baggage.
  • Wrist Singularity · Gimbal lock is the math problem: the Euler representation loses a degree of freedom when axes align. A wrist singularity is the physical version on the arm, when wrist joints line up and the robot can't resolve the motion. The Euler triple can't uniquely describe the orientation exactly where the wrist can't uniquely achieve it.

Where you meet it in the field

  • FANUC LR Mate 200iD · A six-axis arm whose tool orientation is taught and displayed as W, P, R Euler angles on the pendant, right next to the X, Y, Z of each point.

Common questions

Why do my W, P, R values jump around when the wrist is near a certain pose?
You're near gimbal lock. When the middle rotation lines two axes up, the split between the other two angles becomes ill-defined, so tiny orientation changes can produce large swings in the reported numbers. It's a representation artifact, and it coincides with the wrist singularity on the arm.
Is the order W, P, R or R, P, W? Does it matter?
It matters a lot, because rotations don't commute. FANUC applies a fixed convention so the same three numbers always rebuild the same orientation. You don't get to reorder them freely; a triple only means something under its stated sequence.
Should I switch my program to quaternions to avoid gimbal lock?
You generally don't get that choice at the FANUC pendant, which speaks W, P, R. Quaternions live in the internal math and in offline tools. The practical fix for gimbal lock on the floor is planning motion so the wrist doesn't pass through the singular alignment.

Related terms

quaternionsingularitytool center pointuser frame