NyxCameraSharedMetadata#

class gs_nyx_plugin.nyx_camera_shared_metadata.NyxCameraSharedMetadata[source]#

Bases: KinematicSensorMetadataMixin, SharedSensorMetadata

Cross-sensor state shared by every NyxCameraSensor in a scene.

Genesis instantiates one SharedSensorMetadata per sensor type per sensor manager, and stamps it onto every sensor of that type via self._shared_metadata. The Nyx plugin uses it as the single source of truth for “things there should only ever be one of in the scene”: the native renderer, the scene exporter, the on-disk scene-description cache, and the per-sensor image cache that downstream consumers read.

Variables:
  • renderer (NyxPyRenderer or None) – The shared renderer instance. None until the last sibling sensor finishes NyxCameraSensor.build(), then constructed once and reused for every render across all sensors and environments.

  • scene_exporter (NyxSceneExporter or None) – Exporter that produced the on-disk scene-description JSON. Retained so NyxCameraSensor.pick_pixel() can re-resolve UUIDs back to Genesis entities via its _entity_uuid_pairs.

  • sensors (list of NyxCameraSensor or None) – Every Nyx camera sensor registered with the manager, in registration order. Each sensor’s camera index in the shared renderer matches its position in this list.

  • camera_defs (list of dict or None) – Per-camera configuration dicts passed to the renderer when it builds. One entry per sensor, in the same order as sensors.

  • image_cache (dict of int to torch.Tensor or None) – {sensor_idx: tensor} map of pre-allocated (B, H, W, 3) uint8 CUDA buffers that the renderer writes into each frame. Returned by NyxCameraSensor.read() without an extra copy.

  • last_render_timestep (int) – Scene timestep at which the renderer last ran. Used for staleness checks so multiple sensors querying the same step trigger only one render. -1 before the first frame.

  • scene_description_export_path (str or None) – Path component (under __nyx_cache__/) where the scene-description JSON and any per-vgeom .obj exports live. Generated once at construction; cleaned up by destroy().

Constructors

Methods

destroy

Tear down the renderer and remove the on-disk scene cache.

Attributes