Skip to content

02 · Import TurtleBot3 Lime (URDF → USD)

⏱ 15 min · Level: beginner · Script: isaac/02_import_urdf.py

Goal. Turn the robot description that ROS uses (URDF) into the format Isaac Sim simulates (USD), and understand what the importer creates.

Right after import the arm collapses: the joint drives have no stiffness yet. Tutorial 03 fixes that.

Concepts

URDF is ROS's XML robot description: links (rigid parts with meshes, mass, inertia, collision shapes) connected by joints (fixed, revolute, continuous, prismatic). The Lime's URDF lives in ros2_ws/src/turtlebot3_lime/turtlebot3_lime_description/urdf/*.xacro.

USD (Universal Scene Description) is the scene format of Omniverse and Isaac Sim. A robot in USD is a tree of prims. Physics is added with schemas such as RigidBodyAPI, ArticulationRootAPI and DriveAPI.

The URDF importer (isaacsim.asset.importer.urdf) converts one into the other.

We import a generated .urdf, not the .xacro

The importer does not read xacro. scripts/gen_urdf.sh expanded the xacro once and rewrote the mesh paths so they work without ROS. The result is committed as assets/urdf/turtlebot3_lime.urdf. You only need to run that script if you change the xacro files.

What the 6.2 importer creates

assets/usd/turtlebot3_lime/
├── turtlebot3_lime.usda          ← the file you open or reference ("interface" layer)
└── payloads/
    ├── base.usda                 ← the prim tree: Geometry/ (links) and Physics/ (joints)
    ├── geometries.usd            ← the meshes
    ├── materials.usda, instances.usda
    ├── robot.usda                ← Isaac robot schema (robot type, ordered links and joints)
    └── Physics/
        ├── physics.usda          ← engine-neutral USD Physics (bodies, joints, drives, masses)
        ├── physx.usda            ← PhysX-specific additions
        └── mujoco.usda           ← MuJoCo/Newton-specific additions

The interface file has a variant set called Physics with the choices none, physics, physx and mujoco. No variant is selected by default. Without a selection the robot has no physics: it would float, and no articulation would be found. Isaac Sim simulates with PhysX by default, so select physx.

Inside the robot, links are nested like the URDF tree under Geometry/, and joints sit under Physics/:

/turtlebot3_lime
├── Geometry/base_footprint/base_link            ← articulation root
│   ├── wheel_left_link, wheel_right_link
│   ├── caster_back_left_link, caster_back_right_link
│   ├── base_scan, imu_link, camera_bottom_screw_frame/camera_link/...
│   └── link1/link2/.../link7/{gripper_left_link, gripper_right_link, end_effector_link}
└── Physics/wheel_left_joint, joint1 … joint6, gripper_left_joint, ...

Import

  1. Start Isaac Sim: source scripts/isaac_env.sh && isaacsim.
  2. File ▸ Import, then select assets/urdf/turtlebot3_lime.urdf.
  3. The options for this file appear on the right side of the dialog:

    File ▸ Import options

    Section Option Value Why
    Model USD Output assets/usd the importer adds a turtlebot3_lime/ folder
    Colliders Collision From Visuals off the URDF already has simple collision shapes
    Colliders Allow Self-Collision off
    Options Robot Type Mobile Manipulators
    Options Base Type Mobile a mobile robot must not be welded to the world (Fixed)
    Options Add Reference to Stage on (default: off) adds the robot to the open stage; when off, the imported file is opened instead
    Options Merge Mesh off
  4. Click Import. Converting the 29 MB base mesh takes a couple of minutes.

  5. In the Stage panel select the robot prim. In Property ▸ Variants set Physics = physx.

    Property ▸ Variants ▸ Physics = physx

  6. Add a floor: Create ▸ Physics ▸ Ground Plane. Add a light if the scene is dark: Create ▸ Light ▸ Dome Light.

  7. Press Play ▶. The robot drops onto the floor and the arm folds down. That is expected.
  8. Press Stop ■, then save your stage: File ▸ Save As my_stages/02_import.usd. Tutorial 03 continues from it.
source scripts/isaac_env.sh
python isaac/02_import_urdf.py            # with window
python isaac/02_import_urdf.py --headless --test

git status shows geometries.usd as changed?

The repository already contains this import, so later tutorials work even if you skip this one. The script deletes assets/usd/turtlebot3_lime/ and imports it again. The result is the same robot, but the mesh file payloads/geometries.usd can differ by a few bytes, and git pull refuses to overwrite a changed file. Restore the committed copy before you pull:

git checkout assets/usd/turtlebot3_lime

The key lines:

app_utils.enable_extension("isaacsim.asset.importer.urdf")   # (1)!
from isaacsim.asset.importer.urdf import URDFImporter, URDFImporterConfig

config = URDFImporterConfig(
    urdf_path=str(LIME_URDF),
    usd_path=str(USD_DIR),           # (2)!
    fix_base=False,                  # mobile robot
    merge_fixed_joints=False,        # (3)!
    collision_from_visuals=False,
    robot_type="Mobile Manipulators",
)
usd_path = URDFImporter(config).import_urdf()

stage_utils.add_reference_to_stage(
    usd_path, "/World/turtlebot3_lime", variants=[("Physics", "physx")]   # (4)!
)
  1. The importer is an extension. The standalone app does not load it by default.
  2. This is an output folder. The importer never overwrites; if turtlebot3_lime/ already exists it writes turtlebot3_lime_1/. That is why the script deletes the old folder first.
  3. Keep the fixed joints so the sensor frames (base_scan, imu_link, camera_*_optical_frame) stay as separate prims. Later tutorials attach sensors to them.
  4. Select the PhysX physics variant (see above).
Full script: isaac/02_import_urdf.py
# SPDX-FileCopyrightText: 2026 An (an-robotics)
# SPDX-License-Identifier: Apache-2.0

"""Tutorial 02 - Import TurtleBot3 Lime from URDF into USD.

    python isaac/02_import_urdf.py              # import, then show the robot in the GUI
    python isaac/02_import_urdf.py --headless   # import only, no window

What it does
  1. Converts assets/urdf/turtlebot3_lime.urdf into a USD asset with the Isaac Sim 6.2
     URDF importer (``URDFImporter`` + ``URDFImporterConfig``).
  2. Opens a new stage, adds a ground plane + light, and references the new robot USD.
  3. Presses Play so you can watch the robot drop onto the ground.

The importer writes to assets/usd/turtlebot3_lime/ :
    turtlebot3_lime.usda      <- the file you open / reference (an "interface" layer)
    payloads/                 <- geometry, materials, physics (loaded through the interface layer)
"""

import shutil
import sys

from common.cli import parse_args

args = parse_args(
    __doc__.splitlines()[0],
    extra=lambda p: p.add_argument("--out", default=None, help="output folder (default: assets/usd)"),
)

# --- 1. Start Isaac Sim. Nothing from omni / isaacsim / pxr may be imported before this line. ---
from isaacsim import SimulationApp

simulation_app = SimulationApp({"headless": args.headless, "width": 1280, "height": 720})

import isaacsim.core.experimental.utils.app as app_utils
import isaacsim.core.experimental.utils.stage as stage_utils
from common.paths import LIME_IMPORTED_USD, LIME_URDF, USD_DIR
from isaacsim.core.experimental.objects import GroundPlane
from isaacsim.core.experimental.prims import Articulation
from isaacsim.core.simulation_manager import SimulationManager
from pxr import UsdLux

# The URDF importer is an extension; the default standalone app does not load it.
app_utils.enable_extension("isaacsim.asset.importer.urdf")
from isaacsim.asset.importer.urdf import URDFImporter, URDFImporterConfig

# --- 2. Convert URDF -> USD -----------------------------------------------------------------------
# The importer never overwrites: an existing folder would make it write "turtlebot3_lime_1".
# This tutorial re-creates the asset from scratch each time, so remove the previous output first.
from pathlib import Path

out_root = Path(args.out).resolve() if args.out else USD_DIR
out_dir = out_root / LIME_IMPORTED_USD.parent.name
if out_dir.exists():
    print(f"[02] removing previous import: {out_dir}")
    shutil.rmtree(out_dir)

config = URDFImporterConfig(
    urdf_path=str(LIME_URDF),
    usd_path=str(out_root),  # output *folder*; the importer adds a sub-folder named after the robot
    fix_base=False,  # a mobile robot must NOT be welded to the world
    merge_fixed_joints=False,  # keep sensor frames (base_scan, camera_*_optical_frame, imu_link) as prims
    collision_from_visuals=False,  # the URDF already has good collision shapes
    robot_type="Mobile Manipulators",
)
usd_path = URDFImporter(config).import_urdf()
print(f"[02] URDF imported -> {usd_path}")

# Housekeeping: the importer records the absolute path of its temporary files in a comment
# ("doc") of payloads/base.usda. Clear it so the asset does not depend on (or reveal) this machine.
from pxr import Sdf

base_layer = Sdf.Layer.FindOrOpen(str(out_dir / "payloads" / "base.usda"))
if base_layer is not None and base_layer.documentation:
    base_layer.documentation = ""
    base_layer.Save()

# --- 3. Build a small scene and add the robot -----------------------------------------------------
stage = stage_utils.create_new_stage(template="sunlight")
UsdLux.DomeLight.Define(stage, "/World/DomeLight").GetIntensityAttr().Set(500.0)
GroundPlane("/World/GroundPlane")
# The imported asset can carry physics for several engines. It has a "Physics" variant set
# (none / physics / physx / mujoco) and NO default selection - without a selection the robot has
# no physics at all. Isaac Sim simulates with PhysX by default, so pick "physx".
stage_utils.add_reference_to_stage(usd_path, "/World/turtlebot3_lime", variants=[("Physics", "physx")])

# Lift it 5 cm so it drops onto the ground when the simulation starts.
# reset_xform_op_properties=True gives the prim a standard translate/orient/scale transform first.
from isaacsim.core.experimental.prims import XformPrim

XformPrim("/World/turtlebot3_lime", reset_xform_op_properties=True).set_world_poses(positions=[0.0, 0.0, 0.05])

recorder = None
if args.record:
    from common.recorder import Recorder

    recorder = Recorder(args.record, eye=(0.9, -0.9, 0.6), target=(0.0, 0.0, 0.2))

# --- 4. Play ----------------------------------------------------------------------------------------
SimulationManager.setup_simulation(dt=1.0 / 60.0)
app_utils.play()
simulation_app.update()

# The importer marked the robot root as an articulation; find it and list its joints.
from pxr import UsdPhysics

root = next(
    p.GetPath().pathString
    for p in stage.Traverse()
    if p.HasAPI(UsdPhysics.ArticulationRootAPI) and p.GetPath().pathString.startswith("/World/turtlebot3_lime")
)
robot = Articulation(root)
print(f"[02] articulation root: {root}")
print(f"[02] {robot.num_dofs} degrees of freedom: {robot.dof_names}")

steps = 0
while simulation_app.is_running():
    simulation_app.update()
    if recorder:
        recorder.capture()
    steps += 1
    if (args.test or args.record) and steps >= 180:  # 3 s of simulated time
        break

ok = True
if args.test:
    expected = {"wheel_left_joint", "wheel_right_joint", *[f"joint{i}" for i in range(1, 7)], "gripper_left_joint"}
    missing = expected - set(robot.dof_names)
    z = float(robot.get_world_poses()[0].numpy()[0, 2])
    print(f"[02][test] missing joints: {missing or 'none'}; base height after 3 s: {z:.3f} m")
    ok = not missing and -0.02 < z < 0.2
    print(f"[02][test] {'PASS' if ok else 'FAIL'}")

if recorder:
    recorder.save()
app_utils.stop()
simulation_app.close(exit_code=0 if ok else 1)
sys.exit(0 if ok else 1)

Check the result

The script prints the articulation it found:

[02] articulation root: /World/turtlebot3_lime/Geometry/base_footprint/base_link
[02] 10 degrees of freedom: ['wheel_left_joint', 'wheel_right_joint', 'joint1', 'joint2', 'joint3',
     'joint4', 'joint5', 'joint6', 'gripper_left_joint', 'gripper_right_joint']
[02][test] missing joints: none; base height after 3 s: 0.060 m
[02][test] PASS
  • 10 DoF: 2 wheels + 6 arm joints + 2 gripper fingers. Fixed joints (casters, sensor mounts) add no DoF.
  • 0.060 m: base_link sits exactly one wheel radius above the floor. The wheels carry the robot.

Imported robot

What's wrong with it (on purpose)

You see Cause Fixed in
The arm collapses joint drives were imported with maxForce but stiffness = damping = 0 03
The wheels can't be driven same: a velocity drive needs damping > 0 03
The right gripper finger follows the left one through a mimic joint (NewtonMimicAPI, from the URDF <mimic> tag) works already
The robot is grey the URDF gives every link one plain colour; the real Lime is black and lime green 03

Next: 03 · Tune the robot