unisim.backend.mjwarp.playback

Cold-path MuJoCo offline playback bridge for mjwarp.

The implementation lives in unisim.backend.playback_common so other snapshot-based adapters (Newton) share one offline MuJoCo pipeline; the wrappers below keep the historical mjwarp names, signatures, and messages.

Functions

run_mjwarp_playback(*, backend, env, ...[, ...])

Render detached mjwarp host snapshots with the existing MuJoCo pipeline.

validate_mjwarp_visual_model(*, mujoco, ...)

Validate the detached MuJoCo visual twin used for offline playback.

unisim.backend.mjwarp.playback.validate_mjwarp_visual_model(*, mujoco, physics_model, model_file)[source]

Validate the detached MuJoCo visual twin used for offline playback.

Parameters:
Return type:

str

unisim.backend.mjwarp.playback.run_mjwarp_playback(*, backend, env, initialize, step, num_steps, output_video, render_spacing, headless, record_video, snapshot_shape, frame_state_getter, camera_kwargs, debug_overlay_getter=None, on_frame=None)[source]

Render detached mjwarp host snapshots with the existing MuJoCo pipeline.

Parameters:
  • backend (Any)

  • env (Any)

  • initialize (Callable[[], ObsT])

  • step (Callable[[ObsT], ObsT])

  • num_steps (int | None)

  • output_video (str | PathLike[str] | None)

  • render_spacing (float | None)

  • headless (bool)

  • record_video (bool)

  • snapshot_shape (tuple[int, int])

  • frame_state_getter (Callable[[], np.ndarray] | None)

  • camera_kwargs (CameraCfg | Mapping[str, Any] | None)

  • debug_overlay_getter (DebugOverlayGetter | None)

  • on_frame (Callable[[int, np.ndarray], np.ndarray | None] | None)

Return type:

str | None