l5kit.environment.kinematic_model module¶
- class l5kit.environment.kinematic_model.KinematicModel¶
Bases:
abc.ABC
Base class interface for kinematic model.
- model_prefix: str¶
The prefix that will identify the model class
- abstract reset(init_state: numpy.ndarray) None ¶
Reset the model state when new episode starts.
- Parameters
init_state – the initial state of the ego
- abstract update(input_action: l5kit.simulation.unroll.TrajectoryStateIndices) Dict[str, numpy.ndarray] ¶
Update the model state based on the action at a particular time-step during the episode.
- Parameters
input_action – the prediction for next time-step
- Returns
reward at a particular frame index (time-step) during the episode.
- class l5kit.environment.kinematic_model.UnicycleModel(model_prefix: str = 'Unicycle', min_acc: float = - 0.6, max_acc: float = 0.6, min_steer: float = - 0.07853981633974483, max_steer: float = 0.07853981633974483)¶
Bases:
l5kit.environment.kinematic_model.KinematicModel
This class is responsible for controlling kinematics using the Unicycle model.
- Parameters
model_prefix – the prefix that will identify this model class
min_acc – the threshold for minimum acceleration
max_acc – the threshold for maximum acceleration
min_steer – the threshold for minimum steering
max_steer – the threshold for maximum steering
- model_prefix: str¶
The prefix that will identify the model class
- reset(init_state: numpy.ndarray) None ¶
Reset the model state when new episode starts.
- Parameters
init_state – the initial state of the ego
- update(input_action: numpy.ndarray) Dict[str, numpy.ndarray] ¶
Update the model state based on the action at a particular time-step during the episode.
- Parameters
input_action – the prediction [steer, acc] for next time-step
- Returns
reward at a particular frame index (time-step) during the episode.