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
Not yet mimic joints, sensors, 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.1.0.tar.gz (83.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.1.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: urdf2any-0.1.0.tar.gz
  • Upload date:
  • Size: 83.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.1.0.tar.gz
Algorithm Hash digest
SHA256 0a62f40bd1fd761e0e3544e3a30886277d1ae8e4b51572817c7650f8f9eefec0
MD5 4253002b9ce2356bdc6bf4c4ed204840
BLAKE2b-256 60249b8358edcbc9684b8bd9a59c2ef4dafe121c3315fc9edde66e6d1d2a021d

See more details on using hashes here.

Provenance

The following attestation bundles were made for urdf2any-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: urdf2any-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52a8aabde5e8e48a4e3a6e0882e2a030c8eb3339dad0c2186b9d8b2ea983d57a
MD5 e0edf777491263e283d93d96710538b5
BLAKE2b-256 e1a4628e649001f45830b661b88408814b54d2c35d7acc93cef3533c973bef33

See more details on using hashes here.

Provenance

The following attestation bundles were made for urdf2any-0.1.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