build#

NyxCameraSensor.build()[source]#

Finalize the sensor and lazily start the shared Nyx renderer.

Called by the Genesis sensor manager once per sensor after the scene has been built. Each call:

  1. Resolves the optional rig attachment via RigidSensorMixin.

  2. Verifies CUDA is available (Nyx is GPU-only).

  3. Registers this camera in the shared metadata, assigns it a Nyx camera index, and captures its configuration as a definition dict.

  4. If this is the final NyxCameraSensor left to build, collects lights / env maps / light fields from all sibling sensors, writes the scene-description JSON via NyxSceneExporter, and constructs the shared NyxPyRenderer.

  5. Pre-allocates this sensor’s slot in the shared image cache: (B, H, W, 3) uint8 CUDA tensor.

Raises:

genesis.GenesisException – If CUDA is unavailable, or if sibling NyxCameraSensor instances disagree on render_mode (the shared renderer can serve only one mode).