Robo2u

Frame and Rotation Converter

One rotation in every representation and frame convention, live in your browser.

Input as
Axes
Presets

Converted

3D axes, Z up

Starting the 3D view.
X Y Z Reference frame Drag to orbit, scroll to zoom

Live conversion

Quaternion

Both component orders. Mixing them up is the most common orientation bug.

Euler angles

Intrinsic axes move with the body. Extrinsic axes stay fixed.

Values above are degrees.
radians
Gimbal state

Axis-angle and rotation vector

Angle in 0 to 180 degrees. The rotation vector is OpenCV’s rvec.

Rotation matrix

Row major, v' = R v. Paste one from a log to check it is still a rotation.

Orthonormality

Homogeneous 4x4 transform

Rotation plus translation, as a debugger or tf echo prints it.

4x4
9 numbers read as 3x3, 16 as 4x4, 4 as a quaternion x, y, z, w.

Code out

In the target tool’s syntax, with order and units handled.

loading

Compose and compare

A then B is qB × qA: the last rotation sits on the left.

A then B (x, y, z, w)
0, 0, 0, 1
B then A (x, y, z, w)
0, 0, 0, 1
order matters, so this usually differs
Angular distance A to B
0
shortest angle between the two orientations
Relative rotation A to B
0, 0, 0, 1
qA inverse times qB, as x, y, z, w

Frame convention converter

Re-express the rotation and a position in another frame convention.

Handedness Units
P

Which tool uses which convention

Check your source here before debugging signs.

Tool or standard Quaternion order Euler convention Axes and handedness Notes

FAQ

Which quaternion order does my tool use?

Same four numbers, two orders. ROS geometry_msgs, tf2, scipy, three.js and Eigen coeffs() use x, y, z, w. MuJoCo, most papers and the Eigen::Quaterniond constructor take w, x, y, z. Reading one order as the other gives a wrong rotation with no error.

What does a URDF rpy attribute mean?

Roll about the fixed X, then pitch about the fixed Y, then yaw about the fixed Z. That is extrinsic XYZ, identical to intrinsic ZYX, and it is also what tf2 sxyz and Blender XYZ mean.

When does gimbal lock happen?

When the middle Euler angle reaches plus or minus 90 degrees in a three axis sequence such as ZYX, or 0 or 180 degrees in a repeated axis sequence such as ZYZ. The first and third axes line up and one degree of freedom is lost. The converter warns within 5 degrees of that point. Quaternions and matrices have no such singularity.

How it works