ast_toolbox.spaces.example_av_spaces module

Class to define the action and observation spaces for an example AV validation task.

class ast_toolbox.spaces.example_av_spaces.ExampleAVSpaces(num_peds=1, max_path_length=50, v_des=11.17, x_accel_low=-1.0, y_accel_low=-1.0, x_accel_high=1.0, y_accel_high=1.0, x_boundary_low=-10.0, y_boundary_low=-10.0, x_boundary_high=10.0, y_boundary_high=10.0, x_v_low=-10.0, y_v_low=-10.0, x_v_high=10.0, y_v_high=10.0, car_init_x=-35.0, car_init_y=0.0, open_loop=True)[source]

Bases: ast_toolbox.spaces.ast_spaces.ASTSpaces

Class to define the action and observation spaces for an example AV validation task.

Parameters:
  • num_peds (int, optional) – The number of pedestrians crossing the street.
  • max_path_length (int, optional) – Maximum length of a single rollout.
  • v_des (float, optional) – The desired velocity, in meters per second, for the ego vehicle to maintain
  • x_accel_low (float, optional) – The minimum x-acceleration of the pedestrian.
  • y_accel_low (float, optional) – The minimum y-acceleration of the pedestrian.
  • x_accel_high (float, optional) – The maximum x-acceleration of the pedestrian.
  • y_accel_high (float, optional) – The maximum y-acceleration of the pedestrian.
  • x_boundary_low (float, optional) – The minimum x-position of the pedestrian.
  • y_boundary_low (float, optional) – The minimum y-position of the pedestrian.
  • x_boundary_high (float, optional) – The maximum x-position of the pedestrian.
  • y_boundary_high (float, optional) – The maximum y-position of the pedestrian.
  • x_v_low (float, optional) – The minimum x-velocity of the pedestrian.
  • y_v_low (float, optional) – The minimum y-velocity of the pedestrian.
  • x_v_high (float, optional) – The maximum x-velocity of the pedestrian.
  • y_v_high (float, optional) – The maximum y-velocity of the pedestrian.
  • car_init_x (float, optional) – The initial x-position of the ego vehicle.
  • car_init_y (float, optional) – The initial y-position of the ego vehicle.
  • open_loop (bool, optional) – True if the simulation is open-loop, meaning that AST must generate all actions ahead of time, instead of being able to output an action in sync with the simulator, getting an observation back before the next action is generated. False to get interactive control, which requires that blackbox_sim_state is also False.
action_space

Returns a definition of the action space of the reinforcement learning problem.

Returns:gym.spaces.Space – The action space of the reinforcement learning problem.
observation_space

Returns a definition of the observation space of the reinforcement learning problem.

Returns:gym.spaces.Space – The observation space of the reinforcement learning problem.