f110_gym package

Subpackages

Module contents

This module registers the F1TENTH Gym environment.

f110_gym.register(id: str, entry_point: EnvCreator | str | None = None, reward_threshold: float | None = None, nondeterministic: bool = False, max_episode_steps: int | None = None, order_enforce: bool = True, disable_env_checker: bool = False, additional_wrappers: tuple[WrapperSpec, ...] = (), vector_entry_point: VectorEnvCreator | str | None = None, kwargs: dict | None = None)

Registers an environment in gymnasium with an id to use with gymnasium.make() with the entry_point being a string or callable for creating the environment.

The id parameter corresponds to the name of the environment, with the syntax as follows: [namespace/](env_name)[-v(version)] where namespace and -v(version) is optional.

It takes arbitrary keyword arguments, which are passed to the EnvSpec kwargs parameter.

Parameters:
  • id – The environment id

  • entry_point – The entry point for creating the environment

  • reward_threshold – The reward threshold considered for an agent to have learnt the environment

  • nondeterministic – If the environment is nondeterministic (even with knowledge of the initial seed and all actions, the same state cannot be reached)

  • max_episode_steps – The maximum number of episodes steps before truncation. Used by the gymnasium.wrappers.TimeLimit wrapper if not None.

  • order_enforce – If to enable the order enforcer wrapper to ensure users run functions in the correct order. If True, then the gymnasium.wrappers.OrderEnforcing is applied to the environment.

  • disable_env_checker – If to disable the gymnasium.wrappers.PassiveEnvChecker to the environment.

  • additional_wrappers – Additional wrappers to apply the environment.

  • vector_entry_point – The entry point for creating the vector environment

  • kwargs – arbitrary keyword arguments which are passed to the environment constructor on initialisation.

Changelogs:

v1.0.0 - autoreset and apply_api_compatibility parameter was removed