Two URDF elements answer different geometric questions. The joint origin places and orients the joint frame relative to the parent link. The axis then defines the permitted rotation or translation direction in that joint frame. Treating the axis vector as if it were written directly in the parent link or world frame is a common source of robots that move around the wrong line even though the XML parses cleanly.

The official urdfdom headers make the frame relationship explicit: the origin is the transform from the parent link frame to the joint frame, and the child link frame is the same as the joint frame. The same Joint structure stores the axis for revolute and prismatic motion. Those fields must be interpreted together.

Place first, move second

Imagine a revolute shoulder joint. The origin xyz selects the pivot location relative to the parent. The origin orientation rotates the joint coordinate frame. The axis xyz selects a direction inside that rotated frame. Motion about that axis carries the child link away from its zero configuration.

Changing origin xyz moves the pivot without changing which local axis the joint uses. Changing origin rotation reorients the entire joint frame, including how its local axis appears from the parent. Changing the axis rotates or translates along a different direction within the already placed joint frame.

This order explains why copying a CAD axis vector into URDF can fail. CAD may report the vector in an assembly, component, or world coordinate system. URDF expects a vector in the joint frame established by the origin. Convert the direction into that frame or choose an origin orientation that makes the intended direction easy to state.

Axis defaults and joint types

For revolute and continuous joints, the axis is the rotation direction. For a prismatic joint, it is the translation direction. Fixed joints have no motion degree of freedom. Floating and planar joint behavior should be checked against the consumer because a single three-component axis does not describe every possible degree of freedom.

Do not rely on an omitted axis when a release process can write the intended value explicitly. Parser defaults may make a model appear functional, but an explicit normalized vector is easier to review and compare with mechanical drawings. Reject a zero-length or non-finite vector even if a downstream tool later normalizes it.

The right-hand rule determines positive revolute motion around the axis. A sign reversal can therefore invert command, limit, and calibration interpretations. For a prismatic joint, the sign chooses positive travel. Frame diagrams should show positive directions rather than only a line without an arrow.

Origin is not visual geometry origin

URDF links can have separate origins for visual, collision, and inertial elements. Those origins place geometry or inertia relative to the link frame. They do not relocate the joint by themselves. A model can render correctly while its collision or inertial frame is offset incorrectly, or vice versa.

Keep a frame ledger: parent link frame, joint frame, child link frame at zero, visual frame, collision frame, and inertial frame. For each, record the transform source and convention. This prevents a mesh-export correction from being pasted into a joint origin without understanding which frame the exporter used.

Rotation representation requires care

URDF versions can support origin orientation through roll, pitch, and yaw and, in newer specification versions, quaternion attributes. The values are not interchangeable text. Confirm the declared URDF version and parser support. Do not provide both forms when the specification forbids that combination.

Euler angles are especially easy to misread because people describe them using different active or passive and intrinsic or extrinsic conventions. Preserve a rotation matrix or quaternion from the authoritative source and verify the resulting basis vectors. A screenshot showing a plausible arm pose is weaker evidence than numeric frame transforms.

Construct a small geometric test

Use a parent frame P, a joint frame J, and a child frame C. At zero joint coordinate, verify the parsed parent-to-joint transform against the design value. Because the child link frame coincides with the joint frame in the urdfdom model, the zero-coordinate child placement should follow that relationship.

For a revolute joint, choose a test point on the child away from the axis. Apply a small positive angle and predict the point's motion with the right-hand rule. A point on the axis should remain on the axis. These two controls reveal a shifted pivot, wrong sign, or wrong frame.

For a prismatic joint, apply a small positive displacement. The child origin should move parallel to the transformed axis by the commanded distance. Measure the displacement in both the joint frame and parent frame. The magnitude should agree while the components differ according to origin rotation.

Test more than a zero pose

An incorrect axis can be invisible at zero because the origin still places the link correctly. Evaluate at positive and negative joint coordinates, near both limits, and at one interior value. Compare the full transform, not only a rendered mesh position.

Use asymmetric geometry or marked fiducials so a 180-degree orientation error cannot hide in a symmetric cylinder. Check collision shapes and inertial axes at the same poses. Planning failures often come from collision geometry that was not reviewed with the kinematic frames.

Round-trip tests are useful. Transform a known point from child to parent and back, then verify the original coordinates are recovered within numeric tolerance. Also compare a forward-kinematics result with an independently calculated transform for a simple one-joint model.

Control and hardware must share the convention

The URDF positive direction should match encoder conversion and command sign. If a driver reports positive counts in the opposite direction, fix and document the conversion at a defined boundary rather than scattering negative signs through controllers. Verify the zero offset separately from the joint-frame origin; they solve different problems.

Record the exact URDF hash, parser version, and test poses used for acceptance. If the origin or axis changes, invalidate the previous kinematic evidence and rerun planning, collision, and hardware sign checks.

State the conclusion narrowly

A defensible result says that the joint origin placed the joint frame at a measured transform, the axis expressed in that frame produced the expected positive motion, and selected child points matched independent calculations across several poses. It does not say that a model is correct merely because it loads or looks right at zero.

URDF joint geometry becomes predictable when every vector has a named frame. Place the joint frame with origin, define motion with axis in that frame, and verify the composition with points and poses that can expose both translation and rotation errors.