Skip to content

novaphy.SceneShapeMetadata

Per-shape metadata recovered by the URDF scene-build path. Lets you walk every collision shape in the finalized Model and recover the URDF link and import path it came from — useful for sensor wiring, visualisation overlays, and exporters.

Attributes

Attribute Description
shape_index Shape index in the finalized Model.
body_index Body the shape is attached to. -1 means world-attached (for example a ground plane); an ordinary static body may still have a non-negative index.
articulation_index Legacy/misnamed field currently populated with the owning body/articulation-link ordinal; it is not necessarily a valid Model articulation ID.
urdf_link_index Index of the URDF link the shape was derived from (if the source was URDF).
link_name Original URDF / USD link name.
body_link_name Surviving body name after fixed-joint collapse.
collision_name Original named URDF collision entry, when available.
geometry_type Geometry type token ("box", "sphere", "cylinder", "mesh", ...).
source Import-source token: "collision" for an authored URDF collision or "visual_fallback" for a shape synthesized from a visual. This is not a file path.
mesh_filename Mesh path as authored in the source asset.
resolved_mesh_filename Resolved filesystem mesh path.
mesh_file_exists Whether the resolved mesh file exists.
material_name Source material name associated with the shape.

Example

import novaphy

result = novaphy.SceneBuilderEngine().build_from_urdf(data)
for s in result.metadata.shapes:
    print(f"shape {s.shape_index} on {s.link_name} ({s.geometry_type}) "
          f"from {s.source}")

See Also