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 — TypeAccelDesangAn action type with a longitudinal acceleration and a desired heading angle
Fields
a::Float64longitudinal acceleration [m/s^2]ϕdes::Float64desired heading angle
AutomotiveSimulator.AccelSteeringAngle — TypeAccelSteeringAngleAllows 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::Float64longitudinal acceleration [m/s^2]δ::Float64Steering angle [rad]
AutomotiveSimulator.AccelTurnrate — TypeAccelTurnrateAn action type with a longitudinal acceleration and a turn rate
Fields
a::Float64longitudinal acceleration [m/s^2]ω::Float64desired turn rate [rad/sec]
AutomotiveSimulator.LaneFollowingAccel — TypeLaneFollowingAccelLongitudinal acceleration. The resulting vehicle velocity is capped below at 0 (i.e. standstill). Negative velocities are not allowed.
Fields
a::Float64longitudinal acceleration [m/s^2]
AutomotiveSimulator.LatLonAccel — TypeLatLonAccelAcceleration in the frenet frame
Fields
a_lat::Float64Lateral acceleration [m/s^2]a_lon::Float64Longitudinal acceleration [m/s^2]
AutomotiveSimulator.PedestrianLatLonAccel — TypePedestrianLatLonAccelPedestrian walking action. Acceleration in the Frenet frame, along with desired lane after crossing the street.
Fields
a_lat::Float64lateral acceleration [m/s^2]a_lon::Float64longitudinal accelaration [m/s^2]lane_des::Lanedesired lane to move to