scenic.simulators.isaac.backends.base
Summary of Module Members
Module Attributes
Values of |
Functions
|
|
Convert a Scenic Vector or any 3-sequence to a numpy array. |
|
Convert a scipy Rotation to an Isaac/USD scalar-first quaternion array. |
|
Convert one or more Isaac/USD scalar-first quaternions to a scipy Rotation. |
Classes
Interface implemented by Isaac Sim API backends. |
Member Details
- WHEEL_CONTROLLERS = frozenset({'ackermann', 'differential', 'holonomic'})
Values of
wheelControllerhandled by the built-in wheeled-robot support.
- wxyzToRotation(quat_wxyz)[source]
Convert one or more Isaac/USD scalar-first quaternions to a scipy Rotation.
- rotationToWxyz(rotation)[source]
Convert a scipy Rotation to an Isaac/USD scalar-first quaternion array.
- class IsaacBackend[source]
Interface implemented by Isaac Sim API backends.
Methods raising
NotImplementedErrormust be provided by each backend; the rest are shared helpers that only depend on USD (pxr) or on APIs common to every supported Isaac Sim release.- attachSimulationApp(app)[source]
Use an already-running app (e.g. the Isaac editor) instead of launching one.
- kitUsdPath(path)[source]
Resolve an
Isaac/...asset reference, URL, or local path for Kit.A bz2-compressed local USD is decompressed into a cache first.
- exportMeshToUsd(mesh, name, tmp_dir)[source]
Write a trimesh to
tmp_diras OBJ and convert it to a USD asset.
- ensureEnvironmentMeshPaths(environmentUsdPath, environment_mesh_path=None, environment_info_path=None, *, headless=True, overwrite=False)[source]
Return (mesh, info) paths for an environment USD, converting it if needed.
The converted GLTF mesh and JSON prim metadata are what the Scenic model uses to reason about existing objects in the environment.
- computePrimWorldBbox(prim_path)[source]
Return world-space bbox min, max, center, and size for a prim.
- computeUsdAssetBbox(usd_path)[source]
Return the composed bbox of a USD asset referenced at the origin.
- scenicToIsaacOrientation(orientation, initial_rotation=None)[source]
Convert a Scenic Orientation to an Isaac Sim wxyz quaternion.
initial_rotation(yaw, pitch, roll) is applied first, to align an asset’s native frame with Scenic’s (see e.g.model.scenic’s built-in wheeled robots, whose USD assets are authored with local +X as forward instead of Scenic’s local +Y). The composition is done as a full rotation, not just on yaw, so it is correct for any combination of yaw, pitch, and roll in eitherorientationorinitial_rotation.
- isaacQuatToScenicEulerAngles(quat, initial_rotation=None)[source]
Convert an Isaac Sim wxyz quaternion to Scenic yaw, pitch, roll.
initial_rotationmust be passed whenever the object was spawned with it (seescenicToIsaacOrientation), so the asset-frame correction is undone and the result is the object’s actual Scenic orientation rather than that orientation composed with the correction.
- computeUsdScaleAndRootPosition(obj, prim_path, scenic_position, orientation)[source]
Compute the scale and root position for a spawned prim (see
computeScaleAndRootPosition).
- computeUsdAssetScaleAndRootPosition(obj, usd_path, scenic_position, orientation)[source]
Compute the scale and root position for a USD asset before it is spawned.
- computeScaleAndRootPosition(obj, native_center, native_size, scenic_position, orientation)[source]
Compute the scale and root position so an asset matches Scenic’s dimensions.
- Returns:
root_position – position to give the USD root prim local_scale: x/y/z scale to apply to the USD root prim native_size: measured unscaled USD bbox size native_center: measured unscaled USD bbox center relative to the root