registration

class real_robot.utils.registration.EnvSpec(uid: str, cls: Type[XArmBaseEnv], max_episode_steps=None, default_kwargs: dict | None = None)[source]

Bases: object

property gym_spec

Return a gym EnvSpec for this env

make(**kwargs)[source]
real_robot.utils.registration.make(env_id, as_gym=True, enable_segmentation=False, **kwargs)[source]

Instantiate a real_robot environment.

Parameters:
  • env_id (str) – Environment ID.

  • as_gym (bool, optional) – Add TimeLimit wrapper as gym.

  • enable_segmentation (bool, optional) – Whether to include Segmentation in observations.

  • **kwargs – Keyword arguments to pass to the environment.

real_robot.utils.registration.register(name: str, cls: Type[XArmBaseEnv], max_episode_steps: int | None = None, default_kwargs: dict | None = None)[source]

Register a real_robot environment.

real_robot.utils.registration.register_env(uid: str, max_episode_steps=None, override=False, **kwargs)[source]

A decorator to register real_robot environments.

Parameters:
  • uid – unique id of the environment.

  • max_episode_steps – maximum number of steps in an episode.

  • override – whether to override the environment if it is already registered.

Notes:

  • max_episode_steps is processed differently from other keyword arguments in gym.

    gym.make wraps the env with gym.wrappers.TimeLimit to limit the maximum number of steps.

  • gym.EnvSpec uses kwargs instead of **kwargs!