isaaclab.renderers#
Sub-package for renderer configurations and implementations.
This sub-package contains configuration classes and implementations for different renderer backends that can be used with Isaac Lab.
Classes
Abstract base class for renderer implementations. |
|
Factory for creating renderer instances. |
|
Configuration for a renderer. |
Base Renderer#
- class isaaclab.renderers.BaseRenderer[source]#
Bases:
ABCAbstract base class for renderer implementations.
Methods:
provides_temporal_camera_data(data_type)Whether this renderer's
data_typeoutput carries temporal information.Post-physics one-time initialization hook.
prepare_cameras(stage, spec)Pre-render per-camera setup the backend needs.
Per-output layout (channels + dtype) this renderer can produce.
prepare_stage(stage, num_envs)Prepare the stage for rendering before
create_render_data()is called.create_render_data(spec)Create render data for the given camera
CameraRenderSpec.set_outputs(render_data, output_data)Store reference to output buffers for writing during render.
Update scene transforms before rendering.
Update mutable geometry attributes before rendering.
update_camera(render_data, positions, ...)Update camera poses and intrinsics for the next render.
render(render_data)Perform rendering and write to output buffers.
read_output(render_data, camera_data)Read rendered outputs from the renderer into the camera data container.
cleanup(render_data)Release renderer resources associated with the given render data.
close()Release resources owned by the renderer itself rather than by a render data.
- classmethod provides_temporal_camera_data(data_type: str) bool[source]#
Whether this renderer’s
data_typeoutput carries temporal information.Under a physics backend without implicit damping (e.g. Newton), a camera policy needs a temporal cue to infer velocity. Renderers that accumulate frames over time (temporal AA / DLSS) supply it; pure rasterizers and non-beauty AOVs do not.
The base default is
False(assume no temporal information); renderer subclasses override per output type.- Parameters:
data_type¶ – The camera output type, e.g.
"rgb"or"depth".- Returns:
Whether the
data_typeoutput carries temporal information.
- prepare_cameras(stage: Any, spec: CameraRenderSpec) None[source]#
Pre-render per-camera setup the backend needs.
The default implementation is a no-op. Renderer subclasses override to perform whatever per-camera initialization their backend requires — e.g. authoring stage attributes on the resolved camera prims, configuring per-tile GPU buffers, or any other state setup.
- abstractmethod supported_output_types() dict[RenderBufferKind, RenderBufferSpec][source]#
Per-output layout (channels + dtype) this renderer can produce.
Outputs absent from the mapping are not produced by this backend.
- Returns:
Mapping from supported
RenderBufferKindto itsRenderBufferSpec.
- abstractmethod prepare_stage(stage: Any, num_envs: int) None[source]#
Prepare the stage for rendering before
create_render_data()is called.Some renderers need to export or preprocess the USD stage before creating render data. This method is called after the renderer is instantiated and before
create_render_data().
- abstractmethod create_render_data(spec: CameraRenderSpec) Any[source]#
Create render data for the given camera
CameraRenderSpec.- Parameters:
spec¶ – Immutable description of the tiled camera (paths, config, device).
- Returns:
Renderer-specific data for subsequent
render()/read_output()calls.
- abstractmethod set_outputs(render_data: Any, output_data: dict[str, ProxyArray]) None[source]#
Store reference to output buffers for writing during render.
- Parameters:
render_data¶ – The render data object from
create_render_data().output_data¶ – Dictionary mapping output names (e.g.
"rgb","depth") to pre-allocatedProxyArraywrappers where rendered data will be written. Use.warpfor the underlying warp array or.torchfor a zero-copy tensor view.
- abstractmethod update_transforms() None[source]#
Update scene transforms before rendering.
Called to sync physics/asset pose state into the renderer’s scene representation.
- abstractmethod update_geometries() None[source]#
Update mutable geometry attributes before rendering.
Called to sync physics-driven geometry such as mesh points, extents, or other per-frame geometry buffers into the renderer’s scene representation.
- abstractmethod update_camera(render_data: Any, positions: ProxyArray, orientations: ProxyArray, intrinsics: ProxyArray) None[source]#
Update camera poses and intrinsics for the next render.
- Parameters:
render_data¶ – The render data object from
create_render_data().positions¶ – Camera positions in world frame. Shape
(N,), dtypewp.vec3f. Use.torchfor a(N, 3)tensor view.orientations¶ – Camera orientations as quaternions
(x, y, z, w). Shape(N,), dtypewp.quatf. Use.torchfor a(N, 4)tensor view.intrinsics¶ – Camera intrinsic matrices. Shape
(N,), dtypewp.mat33f. Use.torchfor a(N, 3, 3)tensor view.
- abstractmethod render(render_data: Any) None[source]#
Perform rendering and write to output buffers.
- Parameters:
render_data¶ – The render data object from
create_render_data().
- abstractmethod read_output(render_data: Any, camera_data: CameraData) None[source]#
Read rendered outputs from the renderer into the camera data container.
- Parameters:
render_data¶ – The render data object from
create_render_data().camera_data¶ – The
CameraDatainstance to populate.
- abstractmethod cleanup(render_data: Any) None[source]#
Release renderer resources associated with the given render data.
- Parameters:
render_data¶ – The render data object to clean up, or
None.
- close() None[source]#
Release resources owned by the renderer itself rather than by a render data.
A renderer is shared by every camera whose configuration resolves to it (see
get_renderer()), so state it owns outlives any single camera and cannot be released fromcleanup().close()calls this once at simulation teardown, while the stage and the underlying renderer backend are still alive.The default implementation is a no-op, for backends whose state lives entirely on the render data. Implementations must be idempotent.
Renderer Factory#
- class isaaclab.renderers.Renderer[source]#
Bases:
FactoryBase,BaseRendererFactory for creating renderer instances.
Methods:
__new__(cls, cfg, *args, **kwargs)Create a new instance of a renderer based on the backend.
- static __new__(cls, cfg: RendererCfg, *args, **kwargs) BaseRenderer[source]#
Create a new instance of a renderer based on the backend.