chrono::vehicle::ChPacejkaTire Class Reference

Description

Concrete tire class that implements the Pacejka tire model.

#include <ChPacejkaTire.h>

Inheritance diagram for chrono::vehicle::ChPacejkaTire:
Collaboration diagram for chrono::vehicle::ChPacejkaTire:

Public Member Functions

 ChPacejkaTire (const std::string &name, const std::string &pacTire_paramFile)
 Default constructor for a Pacejka tire. More...
 
 ChPacejkaTire (const std::string &name, const std::string &pacTire_paramFile, double Fz_override, bool use_transient_slip=true)
 Construct a Pacejka tire with specified vertical load, for testing purposes. More...
 
virtual std::string GetTemplateName () const override
 Get the name of the vehicle subsystem template.
 
void SetDrivenWheel (bool val)
 Specify whether or not the associated wheel is driven. More...
 
virtual void Initialize (std::shared_ptr< ChBody > wheel, VehicleSide side) override
 specify the file name to read the Pactire input from More...
 
virtual void AddVisualizationAssets (VisualizationType vis) override
 Add visualization assets for the rigid tire subsystem.
 
virtual void RemoveVisualizationAssets () override
 Remove visualization assets for the rigid tire subsystem.
 
virtual double GetRadius () const override
 Get the tire radius.
 
virtual double GetVisualizationWidth () const
 Get visualization tire width.
 
virtual TerrainForce GetTireForce () const override
 Get the tire force and moment. More...
 
virtual TerrainForce ReportTireForce (ChTerrain *terrain) const override
 Report the tire force and moment.
 
TerrainForce GetTireForce_pureSlip (const bool local=true) const
 Return the reactions for the pure slip EQs, in local or global coords.
 
TerrainForce GetTireForce_combinedSlip (const bool local=true) const
 Return the reactions for the combined slip EQs, in local or global coords. More...
 
virtual void Synchronize (double time, const WheelState &wheel_state, const ChTerrain &terrain, CollisionType collision_type=CollisionType::SINGLE_POINT) override
 Update the state of this tire system at the current time. More...
 
double GetSlipAngle_internal () const
 Get the tire slip angle computed internally by the Pacejka model (in radians). More...
 
double GetLongitudinalSlip_internal () const
 Get the tire longitudinal slip computed internally by the Pacejka model. More...
 
double GetCamberAngle_internal () const
 Get the camber angle for the Pacejka tire model (in radians). More...
 
virtual void Advance (double step) override
 Advance the state of this tire by the specified time step. More...
 
void WriteOutData (double time, const std::string &outFilename)
 Write output data to a file.
 
void set_Fz_override (double Fz)
 Manually set the vertical wheel load as an input.
 
WheelState getState_from_KAG (double kappa, double alpha, double gamma, double Vx)
 Return orientation, Vx (global) and omega/omega_y (global). More...
 
double get_average_Advance_time ()
 Get the average simulation time per step spent in advance()
 
double get_average_ODE_time ()
 Get the average simulation time per step spent in calculating ODEs.
 
double get_kappa () const
 Get current wheel longitudinal slip.
 
double get_alpha () const
 Get current wheel slip angle.
 
double get_gamma () const
 Get current wheel camber angle.
 
double get_kappaPrime () const
 Get current long slip rate used in Magic Formula EQs.
 
double get_alphaPrime () const
 Get current slip angle using in Magic Formula.
 
double get_gammaPrime () const
 Get current camber angle used in Magic Formula.
 
double get_min_long_slip () const
 Get minimum longitudinal slip rate.
 
double get_max_long_slip () const
 Get maximum longitudinal slip rate.
 
double get_min_lat_slip () const
 Get the minimum allowable lateral slip angle, alpha.
 
double get_max_lat_slip () const
 Get the maximum allowable lateral slip angle, alpha.
 
double get_longvl () const
 Get the longitudinal velocity.
 
double get_tire_rolling_rad () const
 Get the tire rolling radius, ideally updated each step.
 
- Public Member Functions inherited from chrono::vehicle::ChTire
 ChTire (const std::string &name)
 
void SetStepsize (double val)
 Set the value of the integration step size for the underlying dynamics (if applicable). More...
 
double GetStepsize () const
 Get the current value of the integration step size.
 
virtual double GetMass () const =0
 Get the tire mass. More...
 
virtual double ReportMass () const
 Report the tire mass. More...
 
virtual ChVector GetInertia () const =0
 Get the tire moments of inertia. More...
 
double GetSlipAngle () const
 Return the tire slip angle calculated based on the current state of the associated wheel body. More...
 
double GetLongitudinalSlip () const
 Return the tire longitudinal slip calculated based on the current state of the associated wheel body. More...
 
double GetCamberAngle () const
 Return the tire camber angle calculated based on the current state of the associated wheel body. More...
 
virtual double GetDeflection () const
 Report the tire deflection.
 
- Public Member Functions inherited from chrono::vehicle::ChPart
 ChPart (const std::string &name)
 Construct a vehicle subsystem with the specified name. More...
 
const std::string & GetName () const
 Get the name identifier for this subsystem.
 
void SetName (const std::string &name)
 Set the name identifier for this subsystem.
 
void SetVisualizationType (VisualizationType vis)
 Set the visualization mode for this subsystem.
 
void SetContactFrictionCoefficient (float friction_coefficient)
 Set coefficient of friction. More...
 
void SetContactRestitutionCoefficient (float restitution_coefficient)
 Set coefficient of restitution. More...
 
void SetContactMaterialProperties (float young_modulus, float poisson_ratio)
 Set contact material properties. More...
 
void SetContactMaterialCoefficients (float kn, float gn, float kt, float gt)
 Set contact material coefficients. More...
 
float GetCoefficientFriction () const
 Get coefficient of friction for contact material.
 
float GetCoefficientRestitution () const
 Get coefficient of restitution for contact material.
 
float GetYoungModulus () const
 Get Young's modulus of elasticity for contact material.
 
float GetPoissonRatio () const
 Get Poisson ratio for contact material.
 
float GetKn () const
 Get normal stiffness coefficient for contact material.
 
float GetKt () const
 Get tangential stiffness coefficient for contact material.
 
float GetGn () const
 Get normal viscous damping coefficient for contact material.
 
float GetGt () const
 Get tangential viscous damping coefficient for contact material.
 
virtual void SetOutput (bool state)
 Enable/disable output for this subsystem.
 
bool OutputEnabled () const
 Return the output state for this subsystem.
 
virtual void ExportComponentList (rapidjson::Document &jsonDocument) const
 Export this subsystem's component list to the specified JSON object. More...
 
virtual void Output (ChVehicleOutput &database) const
 Output data for this subsystem's component list to the specified database.
 

Additional Inherited Members

- Public Types inherited from chrono::vehicle::ChTire
enum  CollisionType { SINGLE_POINT, FOUR_POINTS, ENVELOPE }
 
- Static Public Member Functions inherited from chrono::vehicle::ChTire
static ChVector EstimateInertia (double tire_width, double aspect_ratio, double rim_diameter, double tire_mass, double t_factor=2)
 Utility function for estimating the tire moments of inertia. More...
 
- Static Public Member Functions inherited from chrono::vehicle::ChPart
static ChMatrix33 TransformInertiaMatrix (const ChVector<> &moments, const ChVector<> &products, const ChMatrix33<> &vehicle_rot, const ChMatrix33<> &body_rot)
 Utility function for transforming inertia tensors between centroidal frames. More...
 
- Static Protected Member Functions inherited from chrono::vehicle::ChTire
static bool DiscTerrainCollision (const ChTerrain &terrain, const ChVector<> &disc_center, const ChVector<> &disc_normal, double disc_radius, ChCoordsys<> &contact, double &depth)
 Perform disc-terrain collision detection. More...
 
static bool DiscTerrainCollision4pt (const ChTerrain &terrain, const ChVector<> &disc_center, const ChVector<> &disc_normal, double disc_radius, double width, ChCoordsys<> &contact, double &depth, double &camber_angle)
 Perform disc-terrain collision detection considering the curvature of the road surface. More...
 
static bool DiscTerrainCollisionEnvelope (const ChTerrain &terrain, const ChVector<> &disc_center, const ChVector<> &disc_normal, double disc_radius, const ChFunction_Recorder &areaDep, ChCoordsys<> &contact, double &depth)
 Collsion algorithm based on a paper of J. More...
 
static void ConstructAreaDepthTable (double disc_radius, ChFunction_Recorder &areaDep)
 Utility function to construct a loopkup table for penetration depth as function of intersection area, for a given tire radius. More...
 
- Static Protected Member Functions inherited from chrono::vehicle::ChPart
static void ExportBodyList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChBody >> bodies)
 Export the list of bodies to the specified JSON document.
 
static void ExportShaftList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChShaft >> shafts)
 Export the list of shafts to the specified JSON document.
 
static void ExportJointList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChLink >> joints)
 Export the list of joints to the specified JSON document.
 
static void ExportCouplesList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChShaftsCouple >> couples)
 Export the list of shaft couples to the specified JSON document.
 
static void ExportMarkerList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChMarker >> markers)
 Export the list of markers to the specified JSON document.
 
static void ExportLinSpringList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChLinkSpringCB >> springs)
 Export the list of translational springs to the specified JSON document.
 
static void ExportRotSpringList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChLinkRotSpringCB >> springs)
 Export the list of rotational springs to the specified JSON document.
 
static void ExportBodyLoadList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChLoadBodyBody >> loads)
 Export the list of body-body loads to the specified JSON document.
 
- Protected Attributes inherited from chrono::vehicle::ChTire
VehicleSide m_side
 tire mounted on left/right side
 
std::shared_ptr< ChBodym_wheel
 associated wheel body
 
double m_stepsize
 tire integration step size (if applicable)
 
- Protected Attributes inherited from chrono::vehicle::ChPart
std::string m_name
 subsystem name
 
bool m_output
 specifies whether or not output is generated for this subsystem
 
float m_friction
 contact coefficient of friction
 
float m_restitution
 contact coefficient of restitution
 
float m_young_modulus
 contact material Young modulus
 
float m_poisson_ratio
 contact material Poisson ratio
 
float m_kn
 normal contact stiffness
 
float m_gn
 normal contact damping
 
float m_kt
 tangential contact stiffness
 
float m_gt
 tangential contact damping
 

Constructor & Destructor Documentation

chrono::vehicle::ChPacejkaTire::ChPacejkaTire ( const std::string &  name,
const std::string &  pacTire_paramFile 
)

Default constructor for a Pacejka tire.

Construct a Pacejka tire for which the vertical load is calculated internally. The model includes transient slip calculations. chrono can suggest a time step for use with the ODE slips

Parameters
[in]namename of this tire
[in]pacTire_paramFilename of the parameter file
chrono::vehicle::ChPacejkaTire::ChPacejkaTire ( const std::string &  name,
const std::string &  pacTire_paramFile,
double  Fz_override,
bool  use_transient_slip = true 
)

Construct a Pacejka tire with specified vertical load, for testing purposes.

Parameters
[in]namename of this tire
[in]pacTire_paramFilename of the parameter file
[in]Fz_overrideprescribed vertical load
[in]use_transient_slipindicate if using transient slip model

Member Function Documentation

void chrono::vehicle::ChPacejkaTire::Advance ( double  step)
overridevirtual

Advance the state of this tire by the specified time step.

Use the new body state, calculate all the relevant quantities over the time increment.

Reimplemented from chrono::vehicle::ChTire.

double chrono::vehicle::ChPacejkaTire::GetCamberAngle_internal ( ) const

Get the camber angle for the Pacejka tire model (in radians).

The reported value will be the same as that reported by ChTire::GetCamberAngle.

double chrono::vehicle::ChPacejkaTire::GetLongitudinalSlip_internal ( ) const

Get the tire longitudinal slip computed internally by the Pacejka model.

The reported value will be the same as that reported by ChTire::GetLongitudinalSlip.

double chrono::vehicle::ChPacejkaTire::GetSlipAngle_internal ( ) const

Get the tire slip angle computed internally by the Pacejka model (in radians).

The reported value will be the same as that reported by ChTire::GetSlipAngle.

WheelState chrono::vehicle::ChPacejkaTire::getState_from_KAG ( double  kappa,
double  alpha,
double  gamma,
double  Vx 
)

Return orientation, Vx (global) and omega/omega_y (global).

Assumes the tire is going straight forward (global x-dir), and the returned state's orientation yields gamma and alpha, as x and z NASA angles

Parameters
[in]kappa...
[in]alpha...
[in]gamma...
[in]Vxtire forward velocity x-dir
TerrainForce chrono::vehicle::ChPacejkaTire::GetTireForce ( ) const
overridevirtual

Get the tire force and moment.

This represents the output from this tire system that is passed to the vehicle system. Typically, the vehicle subsystem will pass the tire force to the appropriate suspension subsystem which applies it as an external force one the wheel body.

Implements chrono::vehicle::ChTire.

TerrainForce chrono::vehicle::ChPacejkaTire::GetTireForce_combinedSlip ( const bool  local = true) const

Return the reactions for the combined slip EQs, in local or global coords.

Return the reactions for the combined slip EQs, in local or global coordinates.

void chrono::vehicle::ChPacejkaTire::Initialize ( std::shared_ptr< ChBody wheel,
VehicleSide  side 
)
overridevirtual

specify the file name to read the Pactire input from

Parameters
wheelhandle to the associated wheel body
[in]sideleft/right vehicle side

Reimplemented from chrono::vehicle::ChTire.

void chrono::vehicle::ChPacejkaTire::SetDrivenWheel ( bool  val)

Specify whether or not the associated wheel is driven.

By default, the wheel is assumed not driven.

void chrono::vehicle::ChPacejkaTire::Synchronize ( double  time,
const WheelState wheel_state,
const ChTerrain terrain,
CollisionType  collision_type = CollisionType::SINGLE_POINT 
)
overridevirtual

Update the state of this tire system at the current time.

Set the PacTire spindle state data from the global wheel body state.

Parameters
[in]timecurrent time
[in]wheel_statecurrent state of associated wheel body
[in]terrainreference to the terrain system
[in]collision_typecollision type

Reimplemented from chrono::vehicle::ChTire.