render#
- NyxPyRenderer.render(camera_index=0, env_index=None)[source]#
Return one camera’s image for one env, rendering the batch first if needed.
Kept for callers of the previous per-env API. The batch is rendered at most once per
update_scene(), so calling this for several cameras or envs in a row does not re-render.- Parameters:
camera_index (int, optional) – Index into the registered camera list (matches the order in which
NyxCameraSensorinstances were built, or the Genesis visualizer’s non-debug camera order when no sensors are registered). Default 0.env_index (int, optional) – Which parallel environment’s image to return. Defaults to the env last passed to
update_scene(), or 0.
- Returns:
torch.Tensor –
uint8image of shape(H, W, 3)ondevice, where(H, W)matches the camera’s configured resolution. The buffer is owned by the renderer — copy it if you need to keep the data past the next render.