Roundabout

In this task, the ego-vehicle if approaching a roundabout with flowing traffic. It will follow its planned route automatically, but has to handle lane changes and longitudinal control to pass the roundabout as fast as possible while avoiding collisions.

https://raw.githubusercontent.com/Farama-Foundation/HighwayEnv/gh-media/docs/media/roundabout-env.gif

Usage

env = gym.make("roundabout-v0")

Versions

ID

Description

roundabout-v0

Initial version. Same-segment neighbour search only. Preserved for reproducibility.

roundabout-v1

Connected-lane neighbour search enabled by default. Recommended for new experiments.

roundabout-generic-v0

Initial generic roundabout map. Same-segment neighbour search only.

roundabout-generic-v1

Generic roundabout map with connected-lane neighbour search enabled.

See Neighbour vehicles for details.

Default configuration

{
    "observation": {
        "type": "TimeToCollision"
    },
    "action": {
        "type": "DiscreteMetaAction"
    },
    "incoming_vehicle_destination": None,
    "duration": 11, # [s] If the environment runs for 11 seconds and still hasn't done(vehicle is crashed), it will be truncated. "Second" is expressed as the variable "time", equal to "the number of calls to the step method" / policy_frequency.
    "simulation_frequency": 15,  # [Hz]
    "policy_frequency": 1,  # [Hz]
    "other_vehicles_type": "highway_env.vehicle.behavior.IDMVehicle",
    "screen_width": 600,  # [px] width of the pygame window
    "screen_height": 600,  # [px] height of the pygame window
    "centering_position": [0.5, 0.6],  # The smaller the value, the more southeast the displayed area is. K key and M key can change centering_position[0].
    "scaling": 5.5,
    "show_trajectories": False,
    "render_agent": True,
    "offscreen_rendering": False
}

More specifically, it is defined in:

classmethod RoundaboutEnv.default_config() dict[source]

Default environment configuration.

Can be overloaded in environment implementations, or by calling configure(). :return: a configuration dict

API

class highway_env.envs.roundabout_env.RoundaboutEnv(config: dict = None, render_mode: str | None = None)[source]
classmethod default_config() dict[source]

Default environment configuration.

Can be overloaded in environment implementations, or by calling configure(). :return: a configuration dict