Skip to main content

urdf2any

CI PyPI Python License

Convert URDF robot descriptions to USD (OpenUSD / Isaac Sim) and MJCF (MuJoCo) — in pure Python, with no Isaac Sim, Omniverse, or GPU required.

  • Self-contained — runs anywhere pip works (usd-core, trimesh, numpy)
  • One source of truth — a single simulator-agnostic intermediate representation drives both backends, so USD and MJCF describe the same physical robot
  • Verified — output is checked in CI against the real reference implementations: the IsaacLab URDF importer (golden comparison) and MuJoCo's native URDF loader (live comparison)

Installation

pip install urdf2any

Quick start

The output format is inferred from the file extension:

urdf2any robot.urdf -o robot.usd   # USD (UsdPhysics articulation)
urdf2any robot.urdf -o robot.xml   # MJCF (with actuators)

Or from Python:

from urdf2any import convert, ConvertConfig, JointDriveCfg

convert(
    "robot.urdf",
    "robot.usd",
    ConvertConfig(joint_drive=JointDriveCfg(stiffness=100.0, damping=1.0)),
)

By default every URDF link becomes one body and no lossy transformation is applied — the same config yields the same robot in both formats.

Compatibility presets

To reproduce the behavior of an existing converter, start from a preset; individual flags still override it:

urdf2any robot.urdf -o robot.usd --preset isaaclab   # IsaacLab URDF importer defaults
urdf2any robot.urdf -o robot.xml --preset mujoco     # MuJoCo native URDF conversion
Preset Matches Effect
isaaclab IsaacLab UrdfConverter defaults merges all fixed-joint links
mujoco MuJoCo's built-in URDF loader merges fixed-joint links and derives missing link masses from collision geometry (needs pip install "urdf2any[mjcf-validate]")

The same presets are available in Python as ConvertConfig.isaaclab() / ConvertConfig.mujoco(), and their definitions are what the parity test suites validate against the real implementations.

Feature support

Joints revolute, continuous, prismatic, fixed (optional merging with inertia composition)
Geometry box, sphere, cylinder, capsule, mesh (STL / OBJ / DAE via trimesh)
Inertials authored mass/inertia/COM; optional geometry-derived backfill via MuJoCo
Drives position / velocity PD gains → USD DriveAPI / MJCF actuators
Materials URDF colors → UsdPreviewSurface / MJCF materials
Skins skinned Collada (DAE) → MuJoCo <skin> assets, bone weights rebound to link frames (pip install "urdf2any[skin]")
Not yet mimic joints, sensors, UsdSkel skins, package:// ROS package resolution beyond a search root

Robot-specific preprocessing (renaming links, removing parts) is deliberately out of scope: parse with parse_urdf, mutate the IR, then emit with convert_robot.

Development

uv sync
uv run pytest        # includes the parity suites (CPU only)
uv run ruff check .

Releases are published to PyPI by pushing a vX.Y.Z tag (Trusted Publishing via .github/workflows/release.yml).

Parity testing

  • USD vs IsaacLab importertests/test_golden_parity.py diffs urdf2any's output against committed golden summaries (tests/golden/) generated by the real importer. Regenerate them inside an IsaacLab container with scripts/generate_reference.py (the import itself needs no GPU).
  • MJCF vs MuJoCotests/test_mjcf_parity.py compiles both urdf2any's MJCF and the source URDF with MuJoCo and compares the resulting models live; no golden files needed.

Sample robots under tests/assets/ are vendored from IsaacLab (BSD-3-Clause) and Isaac Sim (Apache-2.0); see the NOTICE file next to each.

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

urdf2any-0.2.0.tar.gz (100.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

urdf2any-0.2.0-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file urdf2any-0.2.0.tar.gz.

File metadata

  • Download URL: urdf2any-0.2.0.tar.gz
  • Upload date:
  • Size: 100.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for urdf2any-0.2.0.tar.gz
Algorithm Hash digest
SHA256 84c3b1a9ddee3436faef47a2e4333fe0684783d5dd91f4acc25b4fc40c07b6f2
MD5 9f8dc6dda64ec3b4b117eb1634f4b4e5
BLAKE2b-256 4aba1377cf2fe3c45bd9eec7eb4c9921a65ff135e1c7efd5ffefa4b53badae4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for urdf2any-0.2.0.tar.gz:

Publisher: release.yml on syundo0730/urdf2any

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file urdf2any-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: urdf2any-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 45.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for urdf2any-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a76a9306376b180fcf17f11c5be0af12d4cfd04242cee2ae60d95057f23dc5b
MD5 467026d1403f2f2f6be421c393f6713e
BLAKE2b-256 6c625d7ba493fdf4ef95202b28952fc10c15245ec3d520e4796bc496d558f1ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for urdf2any-0.2.0-py3-none-any.whl:

Publisher: release.yml on syundo0730/urdf2any

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page