This package extends the interfaces defined in DifferentialDynamicsModels.jl
to simple car dynamics of the form
The state consists of position and heading in the plane. The control inputs are speed and curvature , or some derivative of each of them (e.g., curvature rate as input ensures trajectories with continuous curvature) with the state and dynamics equation correspondingly augmented. This package exports the type SimpleCarDynamics{Dv,Dκ} <: DifferentialDynamics
to represent these dynamics, where Dv
and Dκ
denote the number of integrators in the speed and curvature control inputs respectively.
In addition to providing these dynamics and a few methods for exact propagation, this package also contains pure Julia implementations of minimum arc length Dubins and Reeds-Shepp steering for a simple car with minimum turning radius r
. These implementations aim to be non-allocating and highly performant (e.g., for use in robotic motion planning where computing millions of steering connections in a few seconds may be necessary), and may be accessed through the SteeringBVP
interface defined in DifferentialDynamicsModels.jl
:
DubinsSteering(; v=1, r=1)
returns aDubinsSteering
instance which may be called with twoSE2State
s as input, or any pair ofStaticVector
s of length 3.ReedsSheppSteering(; v=1, r=1)
returns aReedsSheppSteering
instance which may be called as above.
or through specialized functions:
dubins_length(q0, qf; r=1)
anddubins_waypoints(q0, qf, dt_or_N; v=1, r=1)
give the length and aVector
of states along the optimal Dubins steering curve respectively.dt_or_N
may be anAbstractFloat
or anInt
, corresponding to a desired time spacingdt
(with car speedv
) or a desired total number of equally spaced waypointsN
.reedsshepp_length(q0, qf; r=1)
andreedsshepp_waypoints(q0, qf, dt_or_N; v=1, r=1)
give the length and aVector
of states along the optimal Reeds-Shepp steering curve respectively.