unisim.backend.genesis.playback

Genesis-owned playback execution helpers (in-process native rendering).

Mirrors isaacgym/playback.py: the interactive path drives a post-build Genesis viewer at ~60 Hz; the record path captures offscreen camera frames headlessly and writes them through the shared write_playback_video. Genesis attaches viewers/cameras lazily after scene.build (verified on genesis-world 1.3.3), so rendering never touches the training hot path.

Functions

camera_pose_from_kwargs(camera_kwargs, lookat)

Map the repo-wide MuJoCo-style camera configuration onto (pos, lookat).

camera_pose_matrix_z_up(pos, lookat)

Build the 4x4 camera-to-world matrix for a Z-up world.

display_available()

Return whether a display is reachable for the interactive viewer.

run_genesis_playback(*, backend, env, ...)

unisim.backend.genesis.playback.display_available()[source]

Return whether a display is reachable for the interactive viewer.

Return type:

bool

unisim.backend.genesis.playback.camera_pose_from_kwargs(camera_kwargs, lookat)[source]

Map the repo-wide MuJoCo-style camera configuration onto (pos, lookat).

MuJoCo’s negative-elevation convention is kept: cam_elevation=-20 places the camera above the horizon looking down. cam_lookat pins the lookat point when set.

Parameters:
Return type:

tuple[ndarray, ndarray]

unisim.backend.genesis.playback.camera_pose_matrix_z_up(pos, lookat)[source]

Build the 4x4 camera-to-world matrix for a Z-up world.

The interactive viewer’s set_camera_pose(pos, lookat) reuses the viewer’s current _camera_up, which genesis initializes from its own default camera pose — a tilted vector, not world Z-up (#1396). Passing the full pose= matrix bypasses that polluted state entirely.

Parameters:
Return type:

ndarray

unisim.backend.genesis.playback.run_genesis_playback(*, backend, env, initialize, step, num_steps, output_video, headless, record_video, camera_kwargs)[source]
Parameters:
Return type:

str | None