delphyne
|
DynamicBicycleCar implements a planar rigid body bicycle model of an automobile with a non-linear brush tire model from Bobier (2012) [1].
This is a simplified model that assumes a vehicle that has two wheels: one at the front, and one at the rear. Also, this three-DOF model captures the dynamics in the lateral (Cy), longitudinal (Cx), and yaw (about Cz) directions but not the roll (about Cx) and pitch (about Cy) directions.
There are three coordinate frames of interest in this model: a local frame L fixed on earth with origin Lo, a frame attached to the vehicle's chassis C with the origin of C being Co located at a distance of Lf from the front axle along the center line of the vehicle, and a steering frame D with the origin Do located at the front axle along the center line of the vehicle. Note that the point Co is also referred to as the control point Cp, and although the location of the vehicle's center of mass Ccm can move depending on weight transfer dynamics, it is assumed that the location of Ccm is coincident with Co and Ccp. L is a cartesian, right handed coordinate system with Lz being gravity aligned (gravity acts in the negative Lz direction).
The states of the model are:
p_LoCp_x
[m]p_LoCp_y
[m]yaw_LC
[rad]v_LCp_x
[m/s]v_LCp_y
[m/s]yawDt_LC
[rad/s]Inputs to this system:
steer_CD
[rad]f_Cp_x
[N]Outputs of this system:
Note that the vehicle's angular velocity in L yawDt_LC
is sometimes referred to as the yaw rate r
, and the tire angle is sometimes referred to as δ.
Instantiated templates for the following kinds of T's are provided:
[1] C. Bobier. A Phase Portrait Approach to Vehicle Stability and Envelope Control. Ph. D. thesis (Stanford University), 2012. pp. 22 - 25, pp. 35.
[2] H. Pacejka, Tire and vehicle dynamics, 3rd ed. Society of Automotive Engineers and Butterworth-Heinemann, 2012.
[3] G. Heydinger, R. Bixel, W. Garrott, M. Pyne, J. Howe and D. Guenther, "Measured Vehicle Inertial Parameters-NHTSA’s Data Through November 1998", SAE Technical Paper Series, 1999. p. 24.
#include <src/systems/dynamic_bicycle_car.h>
Public Types | |
enum | Tire { kFrontTire, kRearTire } |
Specifies whether to use the front or rear tire for calculating various parameters. More... | |
Public Member Functions | |
DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN (DynamicBicycleCar) | |
DynamicBicycleCar () | |
Default constructor. More... | |
template<typename U > | |
DynamicBicycleCar (const DynamicBicycleCar< U > &) | |
Scalar-converting copy constructor. More... | |
const drake::systems::OutputPort< T > & | get_output_port () const |
Returns the port to output the state. More... | |
const drake::systems::InputPort< T > & | get_input_port () const |
Returns the input port to the tire angle and applied longitudinal force. More... | |
const DynamicBicycleCarState< T > & | get_state (const drake::systems::Context< T > &context) const |
DynamicBicycleCarState< T > & | get_mutable_state (drake::systems::Context< T > *context) const |
Static Public Member Functions | |
static T | CalcTireSlip (const DynamicBicycleCarState< T > &state, const DynamicBicycleCarParams< T > ¶ms, const T &steer_angle, Tire tire_select) |
Slip angle of front or rear tires. More... | |
static T | CalcNormalTireForce (const DynamicBicycleCarParams< T > ¶ms, const T &f_x, Tire tire_select) |
Normal forces on the front or rear tires. More... | |
static T | CalcLateralTireForce (const T &tire_slip_angle, const T &c_alpha, const T &f_z, const T &mu) |
Lateral tire forces on the front or rear tires. More... | |
|
strong |
Default constructor.
|
explicit |
Scalar-converting copy constructor.
|
static |
Lateral tire forces on the front or rear tires.
|
static |
Normal forces on the front or rear tires.
|
static |
Slip angle of front or rear tires.
DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN | ( | DynamicBicycleCar< T > | ) |
const drake::systems::InputPort< T > & get_input_port |
Returns the input port to the tire angle and applied longitudinal force.
DynamicBicycleCarState< T > & get_mutable_state | ( | drake::systems::Context< T > * | context | ) | const |
const drake::systems::OutputPort< T > & get_output_port |
Returns the port to output the state.
const DynamicBicycleCarState< T > & get_state | ( | const drake::systems::Context< T > & | context | ) | const |