F110 Environment

Top-level F1TENTH multi-agent JAX environment.

JAX-compatible f1tenth_gym_jax environment.

class f1tenth_gym_jax.envs.f110_env.F110Env(num_agents=1, params=Param(mu=1.0489, C_Sf=4.718, C_Sr=5.4562, lf=0.15875, lr=0.17145, h=0.074, m=3.74, I=0.04712, s_min=-0.4189, s_max=0.4189, sv_min=-3.2, sv_max=3.2, v_switch=7.319, a_max=9.51, v_min=-5.0, v_max=20.0, width=0.31, length=0.58, timestep=0.01, timestep_ratio=1, longitudinal_action_type='acceleration', steering_action_type='steeringvelocity', integrator='rk4', model='st', produce_scans=False, collision_on=True, theta_dis=2000, fov=4.7, num_beams=64, eps=0.01, max_range=10.0, observe_others=True, map_name='Spielberg', max_num_laps=1, max_steps=9000, reward_type='progress'), **kwargs)

Bases: MultiAgentEnv

JAX-compatible multi-agent environment for F1TENTH.

Parameters:
  • num_agents (int, default=1) – Number of agents in the environment.

  • params (Param, default=Param()) – Vehicle, map, reward, control, and simulation parameters.

step_env(key, state, actions)
Parameters:
  • key (Array)

  • state (State)

  • actions (Dict[str, Array | ndarray | bool | number])

Return type:

Tuple[Dict[str, Array | ndarray | bool | number], State, Dict[str, float], Dict[str, bool], Dict]

reset(key)

Performs resetting of the environment.

Parameters:

key (Array)

Return type:

Tuple[Dict[str, Array | ndarray | bool | number], State]

get_obs(state)

Applies observation function to state.

Parameters:

state (State)

Return type:

Dict[str, Array | ndarray | bool | number]

get_avail_actions(state)

Returns the available action dimensions for each continuous-control agent.

Parameters:

state (State)

Return type:

Dict[str, Array | ndarray | bool | number]

property agent_classes: dict

Returns homogeneous car agent classes for multi-agent consumers.

check_done(state)
Parameters:

state (State)

Return type:

Tuple[Dict[str, bool], State]

get_reward(state)
Parameters:

state (State)

Return type:

Dict[str, float]