verse.agents.example_agent.car_agent.NPCAgent
- class verse.agents.example_agent.car_agent.NPCAgent(id, initial_state=None, initial_mode=None)
Bases:
BaseAgent
Methods
TC_simulate
(mode, init, time_bound, time_step)Abstract simulation function
action_handler
(mode, state, lane_map)Computes steering and acceleration based on current lane, target lane and current state using a Stanley controller-like rule
set_initial
(initial_state, initial_mode[, ...])Initialize the states
dynamic
set_initial_mode
set_initial_state
set_static_parameter
set_uncertain_parameter
- TC_simulate(mode: Tuple[str], init, time_bound, time_step, lane_map: LaneMap = None) ndarray[Any, dtype[float64]]
Abstract simulation function
- Parameters:
- mode: str
The current mode to simulate
- initialSet: List[float]
The initial condition to perform the simulation
- time_horizon: float
The time horizon for simulation
- time_step: float
time_step for performing simulation
- map: LaneMap, optional
Provided if the map is used
- __init__(id, initial_state=None, initial_mode=None)
Constructor of agent base class.
- Parameters:
- idstr
id of the agent.
- code: str
actual code of python controller
- file_name: str
file name to the python controller
- action_handler(mode, state, lane_map: LaneMap) Tuple[float, float]
Computes steering and acceleration based on current lane, target lane and current state using a Stanley controller-like rule
- set_initial(initial_state, initial_mode, static_param=None, uncertain_param=None)
Initialize the states