Agent Definition
Agent Definitions describe the static properties of a traffic participants such as the length and width of the vehicle. It also contains information on the type of agent (car, pedestrian, motorcycle...).
Interface
You can implement your own agent definition by creating a new type inheriting from the AbstractAgentDefinition
type. The following three functions must be implemented for your custom type:
AutomotiveSimulator.AbstractAgentDefinition
— TypeAbstractAgentDefinition
An Agent definition represents static parameters characterizing an agent, such as its physical dimensions.
Base.length
— Functionlength(def::AbstractAgentDefinition)
return the length of the vehicle
AutomotiveSimulator.width
— Functionwidth(def::AbstractAgentDefinition)
return the width of the vehicle
AutomotiveSimulator.class
— Functionclass(def::AbstractAgentDefinition)
return the class of the vehicle
Agent classes such as car, truck, and pedestrian are defined by integer constant in a submodule AgentClass.
AutomotiveSimulator.AgentClass
— ModuleA module to represent the different class of agents:
- Motorcycle
- Car
- Truck
- Pedestrian
Available Agent Definitions
AutomotiveSimulator.VehicleDef
— TypeVehicleDef(;class::Float64, length::Float64, width::Float64)
Vehicle definition which contains a class and a bounding box.
AutomotiveSimulator.BicycleModel
— TypeBicycleModel
BicycleModel(def::VehicleDef; a::Float64 = 1.5, b::Float64 = 1.5)
Vehicle definition representing the bicycle model
Fields
def::VehicleDef
a::Float64
distance between cg and front axle [m]b::Float64
distance between cg and rear axle [m]