﻿# SDF screw-joint migration: pitch changes units and handedness

Convert legacy thread_pitch to screw_thread_pitch using its documented rotation/translation convention instead of copying a number between differently defined fields.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/simulation-sdf-screw-pitch-legacy-units-handedness/
Language: en

## A renamed pitch can describe a different mechanism

A twin importer replaces a deprecated thread_pitch field with screw_thread_pitch while preserving the stored number. The screw now travels a different distance or moves in the opposite axial direction for the same rotation. This is not a harmless serialization update. The parameter definitions describe inverse kinds of ratio and different positive handedness. Establish the original convention before changing the field name, then verify the intended translation-rotation relation independently of a visually plausible initial assembly.

## Read both documented conventions

The [joint schema](https://raw.githubusercontent.com/gazebosim/sdformat/sdf15/sdf/1.12/joint.sdf) describes the legacy field as interpreted by gazebo-classic in radians per meter, with positive values corresponding to left-handed threads. The replacement expresses axial distance per complete revolution, with positive values corresponding to right-handed threads. Both magnitude and sign interpretation therefore change. Do not copy a physical manufacturer pitch directly into a legacy field without converting its units and identifying the intended joint-axis direction and rotation convention.

## Derive the nonzero conversion explicitly

For a nonzero legacy value p under those stated conventions, the corresponding replacement pitch is -2π divided by p. The full-turn factor converts radians to revolutions, the reciprocal changes rotation-per-distance to distance-per-rotation, and the sign reconciles handedness. This is a dimensional and convention-based derivation, not a claim that every simulator automatically performs the migration. A zero or otherwise invalid source value requires explicit handling rather than an arithmetic shortcut or an invented finite replacement.

## Check the API method boundary too

The [Joint API header](https://raw.githubusercontent.com/gazebosim/sdformat/sdf15/include/sdf/Joint.hh) keeps separate ThreadPitch and ScrewThreadPitch methods and documents the corresponding conventions. Migration can therefore fail in an in-memory adapter even when the XML was updated correctly. Record which accessor supplies the number and which setter consumes it. A shared floating-point type cannot encode the difference in units. Treat conversion ownership as explicit so the same value is neither converted twice nor passed unchanged through a renamed abstraction.

## Propose a signed-travel fixture

A proposed kinematic fixture should specify a known nonzero pitch and inspect axial displacement for a declared signed revolution under the consuming engine’s supported screw-joint implementation. Compare legacy and migrated descriptions with the same axis and initial pose. Inspect both magnitude and direction, not only absolute travel. Retain parser and engine revisions because schema representation alone does not establish runtime feature support. No screw-joint simulation or hardware travel measurement was performed for this article.

## Keep kinematic equivalence separate from mechanical fidelity

The [PartNet import guide](/journal/fg2-partnet-mobility-urdf-load-missing-mesh-cross-engine/) addresses another asset-equivalence problem; [software reproducibility](/journal/software-stack-reproducibility/) supports preserving conversion records. Here acceptance means the migrated model preserves the intended signed rotation-to-translation relation. It does not validate screw efficiency, friction, backlash or load response. Those require additional physical parameters and observations rather than being inferred from a successful field conversion and a correctly resolved ratio.
