Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:ARISE Initiative Robosuite USDExporter

From Leeroopedia
Knowledge Sources
Domains Robotics, 3D Rendering, USD Export
Last Updated 2026-02-15 07:00 GMT

Overview

The USDExporter class converts MuJoCo simulation scenes into Universal Scene Description (USD) format for rendering in external renderers such as NVIDIA Omniverse.

Description

The USDExporter class provides a bridge between MuJoCo physics simulations and USD-based rendering pipelines. It iterates through all geometry objects (geoms), lights, and cameras in a MuJoCo scene, creates corresponding USD representations, and exports them as USD files that can be loaded into high-fidelity external renderers.

The exporter handles three categories of scene geometry: predefined meshes (via USDMesh), primitive shapes (via USDPrimitiveMesh), and tendons (via USDTendon). It extracts textures from the MuJoCo model and saves them as PNG files in an assets directory. The exporter supports both online rendering (where the USD stage is shared with a live renderer like Isaac Sim) and offline rendering (where frames are saved to disk).

Cameras and lights are managed alongside geometry. The exporter supports adding post-hoc lights of various types (sphere, dome, rectangle, cylinder) and cameras with arbitrary positions and orientations. The save_scene method writes the accumulated animation data as a complete USD trajectory file.

Usage

Use this class when you need to export MuJoCo simulation trajectories to USD format for high-quality rendering in external tools such as NVIDIA Omniverse or other USD-compatible renderers. It is typically used in dataset rendering pipelines where photorealistic visuals are needed from recorded demonstrations.

Code Reference

Source Location

Signature

class USDExporter:
    def __init__(
        self,
        model: mujoco.MjModel,
        max_geom: int = 10000,
        output_directory_name: str = "robosuite_usd",
        light_intensity: int = 10000,
        framerate: int = 60,
        shareable: bool = False,
        online: bool = False,
        camera_names: Optional[List[str]] = None,
        stage: Optional[pxr.Usd.Stage] = None,
        verbose: bool = True,
    ) -> None

Import

import robosuite.utils.usd.exporter as exporter
# or
from robosuite.utils.usd.exporter import USDExporter

I/O Contract

Inputs

Name Type Required Description
model mujoco.MjModel Yes MuJoCo model instance containing the scene definition
max_geom int No Maximum number of geoms that can be rendered in the scene (default: 10000)
output_directory_name str No Name of root directory for output frames and assets (default: "robosuite_usd")
light_intensity int No Default intensity of lights in the external renderer (default: 10000)
framerate int No Framerate of the exported scene (default: 60)
shareable bool No Use relative paths to assets for cross-user sharing (default: False)
online bool No Enable online rendering mode for Isaac Sim integration (default: False)
camera_names Optional[List[str]] No List of fixed camera names defined in the MuJoCo model to render
stage Optional[pxr.Usd.Stage] No Predefined USD stage to add scene objects to
verbose bool No Whether to print progress updates (default: True)

Outputs

Name Type Description
usd str Property returning the generated USD as a string
scene MjvScene Property returning the internal MuJoCo visualization scene
output_dir str Property returning the absolute path to the output directory

Usage Examples

import mujoco
from robosuite.utils.usd.exporter import USDExporter

# Load a MuJoCo model
model = mujoco.MjModel.from_xml_path("scene.xml")
data = mujoco.MjData(model)

# Create the exporter
exp = USDExporter(
    model=model,
    output_directory_name="output_usd",
    camera_names=["agentview"],
    framerate=20,
)

# Update scene with simulation data
exp.update_scene(data=data)

# Add additional lighting
exp.add_light(pos=[0, 0, 3], intensity=1500, light_type="dome", light_name="dome_1")

# Save the scene to disk
exp.save_scene(filetype="usd")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment