Frame and Rotation Converter
One rotation in every representation and frame convention, live in your browser.
Converted
3D axes, Z up
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.
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.
Homogeneous 4x4 transform
Rotation plus translation, as a debugger or tf echo prints it.
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.
Frame convention converter
Re-express the rotation and a position in another frame convention.
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
- Hamilton quaternions, active rotations: v' = R v.
- Each frame is defined by where its axes point. The converter applies that basis change and flags handedness flips.
- Runs in your browser. The maths is plain functions in the page source.