chrono::vehicle::ChChassis Class Referenceabstract

Description

Base class for the chassis vehicle subsystem.

#include <ChChassis.h>

Inheritance diagram for chrono::vehicle::ChChassis:
Collaboration diagram for chrono::vehicle::ChChassis:

Public Member Functions

 ChChassis (const std::string &name, bool fixed=false)
 Construct a vehicle subsystem with the specified name. More...
 
virtual double GetMass () const =0
 Get the chassis mass.
 
virtual const ChMatrix33GetInertia () const =0
 Get the inertia tensor of the chassis body. More...
 
virtual const ChVectorGetLocalPosCOM () const =0
 Get the location of the center of mass in the chassis frame.
 
virtual ChCoordsys GetLocalDriverCoordsys () const =0
 Get the local driver position and orientation. More...
 
std::shared_ptr< ChBodyAuxRefGetBody () const
 Get a handle to the vehicle's chassis body.
 
const ChVectorGetPos () const
 Get the global location of the chassis reference frame origin.
 
const ChQuaternionGetRot () const
 Get the orientation of the chassis reference frame. More...
 
const ChVectorGetCOMPos () const
 Get the global location of the chassis center of mass.
 
const ChQuaternionGetCOMRot () const
 Get the orientation of the chassis centroidal frame. More...
 
ChVector GetDriverPos () const
 Get the global location of the driver.
 
double GetSpeed () const
 Get the vehicle speed. More...
 
double GetCOMSpeed () const
 Get the speed of the chassis COM. More...
 
ChVector GetPointAcceleration (const ChVector<> &locpos) const
 Get the acceleration at the specified point. More...
 
virtual void Initialize (ChSystem *system, const ChCoordsys<> &chassisPos, double chassisFwdVel)
 Initialize the chassis at the specified global position and orientation. More...
 
void SetFixed (bool val)
 Set the "fixed to ground" status of the chassis body.
 
bool IsFixed () const
 Return true if the chassis body is fixed to ground.
 
virtual void AddVisualizationAssets (VisualizationType vis) override
 Add visualization assets to this subsystem, for the specified visualization mode.
 
virtual void RemoveVisualizationAssets () overridefinal
 Remove all visualization assets from this subsystem.
 
- 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 track shoe subsystem.
 
void SetName (const std::string &name)
 Set the name identifier for this track shoe subsystem.
 
void SetVisualizationType (VisualizationType vis)
 Set the visualization mode for this subsystem.
 

Protected Attributes

std::shared_ptr< ChBodyAuxRefm_body
 handle to the chassis body
 
bool m_fixed
 is the chassis body fixed to ground?
 
- Protected Attributes inherited from chrono::vehicle::ChPart
std::string m_name
 

Constructor & Destructor Documentation

chrono::vehicle::ChChassis::ChChassis ( const std::string &  name,
bool  fixed = false 
)

Construct a vehicle subsystem with the specified name.

Parameters
[in]namename of the subsystem
[in]fixedis the chassis body fixed to ground?

Member Function Documentation

const ChQuaternion& chrono::vehicle::ChChassis::GetCOMRot ( ) const

Get the orientation of the chassis centroidal frame.

The chassis orientation is returned as a quaternion representing a rotation with respect to the global reference frame.

double chrono::vehicle::ChChassis::GetCOMSpeed ( ) const

Get the speed of the chassis COM.

Return the speed measured at the chassis center of mass.

virtual const ChMatrix33& chrono::vehicle::ChChassis::GetInertia ( ) const
pure virtual

Get the inertia tensor of the chassis body.

The return 3x3 symmetric matrix contains the following values:

 [ int{x^2+z^2}dm    -int{xy}dm    -int{xz}dm    ]
 [                  int{x^2+z^2}   -int{yz}dm    ]
 [                                int{x^2+y^2}dm ]

and represents the inertia tensor with respect to a centroidal frame aligned with the chassis reference frame.

Implemented in chrono::vehicle::RigidChassis, chrono::vehicle::hmmwv::HMMWV_Chassis, chrono::vehicle::m113::M113_Chassis, and chrono::vehicle::m113::M113a_Chassis.

virtual ChCoordsys chrono::vehicle::ChChassis::GetLocalDriverCoordsys ( ) const
pure virtual

Get the local driver position and orientation.

This is a coordinate system relative to the chassis reference frame.

Implemented in chrono::vehicle::RigidChassis, chrono::vehicle::hmmwv::HMMWV_Chassis, chrono::vehicle::m113::M113_Chassis, and chrono::vehicle::m113::M113a_Chassis.

ChVector chrono::vehicle::ChChassis::GetPointAcceleration ( const ChVector<> &  locpos) const

Get the acceleration at the specified point.

The point is assumed to be given relative to the chassis reference frame. The returned acceleration is expressed in the chassis reference frame.

const ChQuaternion& chrono::vehicle::ChChassis::GetRot ( ) const

Get the orientation of the chassis reference frame.

The chassis orientation is returned as a quaternion representing a rotation with respect to the global reference frame.

double chrono::vehicle::ChChassis::GetSpeed ( ) const

Get the vehicle speed.

Return the speed measured at the origin of the chassis reference frame.

void chrono::vehicle::ChChassis::Initialize ( ChSystem system,
const ChCoordsys<> &  chassisPos,
double  chassisFwdVel 
)
virtual

Initialize the chassis at the specified global position and orientation.

Parameters
[in]systemcontaining system
[in]chassisPosabsolute chassis position
[in]chassisFwdVelinitial chassis forward velocity