[isaacsim.asset.importer.urdf] Omniverse URDF Importer Core#

Version: 3.11.0

Overview#

../../../../_images/preview13.png

To enable this extension, go to the Extension Manager menu and enable isaacsim.asset.importer.urdf extension.

High Level Code Overview#

Python#

The URDF Importer extension provides a Python API for importing URDF files into USD format. The main classes are:

  • URDFImporterConfig: A dataclass that stores configuration settings for the import operation, including:

    • urdf_path: Path to the URDF file to import

    • usd_path: Directory where the USD file will be saved

    • merge_mesh: Whether to merge meshes for optimization

    • debug_mode: Whether to enable debug mode with intermediate outputs

    • collision_from_visuals: Whether to generate collision geometry from visual geometries

    • collision_type: Type of collision geometry to use

    • allow_self_collision: Whether to allow self-collision

    • ros_package_paths: List of ROS package name/path mappings for resolving package:// URLs

  • URDFImporter: The main importer class that converts URDF files to USD format.

The import workflow is as follows:

  1. Create a URDFImporterConfig instance with the desired settings

  2. Create a URDFImporter instance with the config

  3. Call import_urdf() which:

    • Uses urdf-usd-converter to convert the URDF file to an intermediate USD format

    • Applies post-processing operations (rigid body schemas, joint schemas, mesh merging, collision geometry generation, etc.)

    • Runs the asset transformer profile to structure the output according to Isaac Sim conventions

    • Returns the path to the final USD file

When the import button is pressed in the UI, the extension creates a URDFImporter instance and calls import_urdf() with the user’s configuration settings.

Preview

Enable Extension#

The extension can be enabled (if not already) in one of the following ways:

Define the next entry as an application argument from a terminal.

APP_SCRIPT.(sh|bat) --enable isaacsim.asset.importer.urdf

Define the next entry under [dependencies] in an experience (.kit) file or an extension configuration (extension.toml) file.

[dependencies]
"isaacsim.asset.importer.urdf" = {}

Open the Window > Extensions menu in a running application instance and search for isaacsim.asset.importer.urdf. Then, toggle the enable control button if it is not already active.

URDF Import Extension [isaacsim.asset.importer.urdf]#

URDF Importer API#

The URDF importer provides a Python API for configuring and converting URDF files into USD assets. Below is a sample demonstrating how to import the Carter URDF included with this extension.

 1import os
 2
 3import omni.usd
 4from isaacsim.asset.importer.urdf import URDFImporter, URDFImporterConfig
 5
 6# Get path to extension data.
 7ext_manager = omni.kit.app.get_app().get_extension_manager()
 8ext_id = ext_manager.get_enabled_extension_id("isaacsim.asset.importer.urdf")
 9extension_path = ext_manager.get_extension_path(ext_id)
10
11urdf_path = os.path.join(extension_path, "data", "urdf", "robots", "carter", "urdf", "carter.urdf")
12output_dir = os.path.dirname(urdf_path)
13
14# Configure and import.
15import_config = URDFImporterConfig(
16    urdf_path=urdf_path,
17    usd_path=output_dir,
18    collision_from_visuals=False,
19    merge_mesh=False
20)
21
22importer = URDFImporter(import_config)
23output_path = importer.import_urdf()
24
25# Open the resulting USD stage.
26omni.usd.get_context().open_stage(output_path)