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: BaseEnv

ManiSkill 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.

add_new_frames_from_obs(raw_obs: Dict[str, Any]) None[source]

For debugging render

apply_evaluate_cfg() None[source]

Apply evaluate_cfg overrides to environment member variables.

capture_image(infos: Dict[str, Any] | None = None)[source]

Render the environment and optionally overlay info.

clear_memory()[source]
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.

get_action_space()[source]

Return the environment action space.

get_observation_space()[source]

Return the environment observation space.

property instruction: Any

Return the current language instruction.

property is_offloaded: bool

Check if the environment is currently offloaded.

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.

render(info: Any, rew: Any | None = None)[source]

Render a frame with optional info and rewards.

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.

sample_action_space() Any[source]

Sample a random action from the action space.

step(policy_resp: PolicyResponse, auto_reset: bool = True) EnvRet[source]

Step the environment with a policy response.

property total_num_group_envs: int

Return the total number of grouped environments.

update_reset_state_ids() None[source]

Update reset state IDs for fixed-reset episodes.