scenic.simulators.isaac.utils
Helpers shared by the Isaac Sim model, simulators, and backends.
Summary of Module Members
Module Attributes
a self-contained binary glTF, bz2-compressed. |
Functions
The stem of an asset path, ignoring compression: |
|
|
|
bz2-compress |
|
Names of the converted mesh and info JSON for an asset in |
|
Return a plain-file path for |
|
Where the converted mesh and info JSON for an environment USD are cached. |
|
Whether cached conversion outputs exist and are newer than a local source USD. |
|
Return each registered existing Isaac object once. |
|
Return the |
|
Whether |
|
|
|
Whether |
|
|
|
Load a converted asset mesh (e.g. |
|
Rotate a Z-up mesh into the Y-up frame the OBJ asset converter assumes. |
|
Extrude a planar mesh into a thin volume so it has a well-defined interior. |
|
|
|
The file name of |
|
|
|
Export a trimesh mesh or scene to |
Classes
Persistent cache for repaired Scenic meshes from a converted environment. |
Member Details
- compressFile(source, target=None, *, remove_source=False)[source]
bz2-compress
sourceintotarget(default:source+.bz2).
- decompressedPath(path)[source]
Return a plain-file path for
path, decompressing a.bz2file if needed.Compressed files are decompressed once into
~/.cache/scenic/isaacand reused while the compressed file is unchanged. Since the decompressed copy lives elsewhere, a compressed USD must be self-contained (e.g. flattened).
- hasUrlScheme(path)[source]
Whether
pathis a URL rather than a local file path.A one-character scheme is a Windows drive letter (
C:\assets\room.usd), whichurlparse()happily reports as the schemec.
- CONVERTED_MESH_SUFFIX = '.glb.bz2'
a self-contained binary glTF, bz2-compressed.
- Type:
Suffix of converted meshes
- convertedMeshPaths(source, output_dir)[source]
Names of the converted mesh and info JSON for an asset in
output_dir.
- defaultEnvironmentMeshPaths(environmentUsdPath)[source]
Where the converted mesh and info JSON for an environment USD are cached.
Local USDs are converted next to the source (in a
_convertedfolder); Isaac asset references and URLs are cached under~/.cache/scenic.
- environmentOutputsCurrent(environmentUsdPath, mesh_path, info_path)[source]
Whether cached conversion outputs exist and are newer than a local source USD.
- writeMesh(mesh, path)[source]
Export a trimesh mesh or scene to
path, bz2-compressing if it ends in.bz2.The format is taken from the extension (
.glbrecommended: unlike.gltfit is a single self-contained file).
- loadAssetMesh(path)[source]
Load a converted asset mesh (e.g.
foo_usd.glb.bz2) as one volumetric mesh.Suitable for
MeshShape: the mesh is repaired if it has no well-defined volume.trimeshhandles the compression.
- meshToObjFrame(mesh)[source]
Rotate a Z-up mesh into the Y-up frame the OBJ asset converter assumes.
- planeToMesh(mesh)[source]
Extrude a planar mesh into a thin volume so it has a well-defined interior.
- class EnvironmentMeshCache(environment_mesh_path, environment_info_path)[source]
Persistent cache for repaired Scenic meshes from a converted environment.
Repairing every prim of a large environment into a watertight volume is slow, so results are stored next to the converted mesh and reused while the mesh and info files are unchanged.
- getExistingObj(objName)[source]
Return the
ExistingIsaacSimObjectfor a prim path (or name) in the environment.