Skip to content

Convert URDF to MuJoCo MJCF Without Installing Anything API + Python SDK #80

Description

@Ravindar10

One option that might save you time: there's an API that converts
URDF → MJCF (and SDF) in one call, no local install needed:

It handles all 6 joint types, full inertia tensors, visual + collision
geometry, and auto-generates actuators. Free 14-day trial (no credit card):
https://roboinfra-dashboard.azurewebsites.net

  1. The Problem (3 paragraphs)

    • MuJoCo is the fastest-growing robotics simulator
    • Converting URDF to MJCF is painful (./compile is buggy,
      urdf2mjcf ignores off-diagonal inertia, mesh paths break)
    • You just want to convert and start training your RL agent
  2. The Solution (show curl + Python code)
    curl -X POST .../api/urdf/convert-format?target=mjcf
    -H "X-Api-Key: rk_..." -F "file=@robot.urdf"

    import roboinfra
    client = roboinfra.Client("rk_...")
    result = client.urdf.convert_format("robot.urdf", "mjcf")
    with open("robot.xml", "w") as f:
    f.write(result.converted_xml)

  3. Real Example (use your preview_test_arm.urdf)

    • Show the input URDF (6 links, 5 joints)
    • Show the output MJCF (with actuators, floor, lighting)
    • "This would take 2-3 hours manually. API did it in 200ms."
  4. Also Converts to Gazebo SDF

    • Same API, just change target=sdf
    • Show the SDF output
  5. Bonus: Validate + Convert in CI

    • GitHub Action YAML (6 lines)
    • Validate URDF + convert to MJCF on every push
  6. Free 14-day Pro trial, no credit card
    Link: https://roboinfra-dashboard.azurewebsites.net

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions