rlightning.env.maniskill_env¶
ManiSkill environment wrapper.
- class rlightning.env.maniskill_env.ManiskillEnv(config: Any, worker_index: int | None = None, preprocess_fn: Callable | None = <function default_env_preprocess_fn>, **kwargs: Any)[source]¶
Bases:
BaseEnvManiSkill environment wrapper for vision-based tasks.
- add_new_frames(infos: Dict[str, Any], rewards: MockModule('torch.Tensor') | None = None) None[source]¶
Append a rendered frame to the video buffer.
- capture_image(infos: Dict[str, Any] | None = None)[source]¶
Render the environment and optionally overlay info.
- property device: MockModule('torch.device')¶
Return the device used by the underlying environment.
- property elapsed_steps: MockModule('torch.Tensor')¶
Return the elapsed steps tensor from the environment.
- flush_video(video_sub_dir: str | None = None) None[source]¶
Write buffered frames to disk and reset the buffer.
- offload()[source]¶
Offload the environment to free GPU memory. Only deletes the environment object, other variables are preserved.
- reload()[source]¶
Reload the environment. Recreates the environment object only, other variables are preserved.
- reset(options: Dict[str, Any] | None = None, **kwargs: Any) EnvRet[source]¶
Reset the environment and return an EnvRet.
- restore_evaluate_cfg() None[source]¶
Restore previously overridden member variables from evaluate_cfg.
- step(policy_resp: PolicyResponse, auto_reset: bool = True) EnvRet[source]¶
Step the environment with a policy response.