unilab.base.base.ABEnv¶
- class unilab.base.base.ABEnv[source]¶
Bases:
ABCMethods
__init__()Capture one RGB frame through the env-facing video contract.
close()Clean up environment resources
Return a physics snapshot for offline playback/video export.
get_playback_model([env_index])Return a model object suitable for backend-specific playback tooling.
init_play_renderer([render_spacing, ...])Initialize env-facing playback rendering when supported.
Initialize environment and return initial state
Render one frame through the env-facing interactive playback contract.
resolve_play_render_plan(*, ...)Resolve high-level playback mode through the backend contract.
run_playback(*, initialize, step, num_steps)Execute playback through the backend contract.
run_playback_mode(*, play_render_mode, ...)Resolve configured playback mode and execute it through the backend contract.
step(actions)Step the environment with given actions, return new state
Attributes
Action space
The configuration of the environment
return the size of the env if it is vectorized
Map from observation group name to its dimension.
Observation space
Return env-facing play/render capabilities.
Current environment state (None before first reset)
- property play_capabilities: EnvPlayCapabilities¶
Return env-facing play/render capabilities.
- resolve_play_render_plan(*, play_render_mode, play_steps, output_video)[source]¶
Resolve high-level playback mode through the backend contract.
- run_playback(*, initialize, step, num_steps, output_video=None, render_spacing=None, render_offset_mode=None, headless=None, record_video=None, frame_state_getter=None, camera_kwargs=None, extra_data_getter=None)[source]¶
Execute playback through the backend contract.
- Parameters:
- Return type:
- run_playback_mode(*, play_render_mode, play_steps, output_video, initialize, step, render_spacing=None, render_offset_mode=None, frame_state_getter=None, camera_kwargs=None, extra_data_getter=None, on_plan=None)[source]¶
Resolve configured playback mode and execute it through the backend contract.
- Parameters:
on_plan (
Callable[[BackendPlayRenderPlan],None] |None)
- Return type:
- abstract property obs_groups_spec: dict[str, int]¶
Map from observation group name to its dimension.
- init_play_renderer(render_spacing=None, render_offset_mode=None, *, headless=False, capture=False, width=1280, height=720, camera_kwargs=None)[source]¶
Initialize env-facing playback rendering when supported.
- render_play_frame()[source]¶
Render one frame through the env-facing interactive playback contract.
- Return type:
- capture_play_video_frame()[source]¶
Capture one RGB frame through the env-facing video contract.
- Return type:
- get_physics_state_snapshot()[source]¶
Return a physics snapshot for offline playback/video export.
- Return type: