Driving Actions
In the driving stack, the actions
lie one level below the behaviors
. While the behaviors
provide the high level decision making, the actions enable the execution of these decisions in the simulation.
Interface
AutomotiveSimulator.propagate
— Functionpropagate(veh::Entity{S,D,I}, action::A, roadway::R, Δt::Float64) where {S,D,I,A,R}
Take an entity of type {S,D,I} and move it over Δt seconds to produce a new entity based on the action on the given roadway.
Propagate vehicle forward in time using a desired acceleration and turn rate
propagate(veh::Entity{VehicleState,D,I}, action::AccelDesang, roadway::Roadway, Δt::Float64; n_integration_steps::Int=4) where {D,I}
Propagate vehicle forward in time using a desired acceleration and heading angle
propagate vehicle forward in time given a desired acceleration and steering angle. If steering angle higher than 0.1 radian, the vehicle drives in a circle
Action types available
AutomotiveSimulator.AccelDesang
— TypeAccelDesang
An action type with a longitudinal acceleration and a desired heading angle
Fields
a::Float64
longitudinal acceleration [m/s^2]ϕdes::Float64
desired heading angle
AutomotiveSimulator.AccelSteeringAngle
— TypeAccelSteeringAngle
Allows driving the car in a circle based on the steering angle If steering angle less than threshold 0.01 radian, just drives straight
Fields
a::Float64
longitudinal acceleration [m/s^2]δ::Float64
Steering angle [rad]
AutomotiveSimulator.AccelTurnrate
— TypeAccelTurnrate
An action type with a longitudinal acceleration and a turn rate
Fields
a::Float64
longitudinal acceleration [m/s^2]ω::Float64
desired turn rate [rad/sec]
AutomotiveSimulator.LaneFollowingAccel
— TypeLaneFollowingAccel
Longitudinal acceleration. The resulting vehicle velocity is capped below at 0 (i.e. standstill). Negative velocities are not allowed.
Fields
a::Float64
longitudinal acceleration [m/s^2]
AutomotiveSimulator.LatLonAccel
— TypeLatLonAccel
Acceleration in the frenet frame
Fields
a_lat::Float64
Lateral acceleration [m/s^2]a_lon::Float64
Longitudinal acceleration [m/s^2]
AutomotiveSimulator.PedestrianLatLonAccel
— TypePedestrianLatLonAccel
Pedestrian walking action. Acceleration in the Frenet frame, along with desired lane after crossing the street.
Fields
a_lat::Float64
lateral acceleration [m/s^2]a_lon::Float64
longitudinal accelaration [m/s^2]lane_des::Lane
desired lane to move to