Description
Base class for the chassis vehicle subsystem.
ChChassis is the base class for a main vehicle chassis (a single chassis or a front chassis).
#include <ChChassis.h>
Classes | |
class | ExternalForce |
Base class for a user-defined custom force acting on the chassis body. More... | |
Public Member Functions | |
ChChassis (const std::string &name, bool fixed=false) | |
Construct a chassis subsystem with the specified name. More... | |
virtual double | GetMass () const =0 |
Get the chassis mass. | |
virtual const ChMatrix33 & | GetInertia () const =0 |
Get the inertia tensor of the chassis body. More... | |
virtual const ChVector & | GetLocalPosCOM () 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... | |
virtual const ChVector | GetLocalPosRearConnector () const |
Get the location (in the local frame of this chassis) of the connection to a rear chassis. | |
std::shared_ptr< ChBodyAuxRef > | GetBody () const |
Get a handle to the vehicle's chassis body. | |
ChSystem * | GetSystem () const |
Get a pointer to the containing system. | |
const ChVector & | GetPos () const |
Get the global location of the chassis reference frame origin. | |
ChQuaternion | GetRot () const |
Get the orientation of the chassis reference frame. More... | |
const ChVector & | GetCOMPos () const |
Get the global location of the chassis center of mass. | |
ChQuaternion | GetCOMRot () 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 | GetPointLocation (const ChVector<> &locpos) const |
Get the global position of the specified point. More... | |
ChVector | GetPointVelocity (const ChVector<> &locpos) const |
Get the global velocity of the specified point. 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, int collision_family=0) |
Initialize the chassis at the specified global position and orientation. More... | |
virtual void | SetCollide (bool state)=0 |
Enable/disable contact for the chassis. 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. | |
bool | HasBushings () const |
Return true if the vehicle model contains bushings. | |
void | AddMarker (const std::string &name, const ChCoordsys<> &pos) |
Add a marker on the chassis body at the specified position (relative to the chassis reference frame). More... | |
const std::vector< std::shared_ptr< ChMarker > > & | GetMarkers () const |
void | SetAerodynamicDrag (double Cd, double area, double air_density) |
Set parameters and enable aerodynamic drag force calculation. More... | |
virtual void | Synchronize (double time) |
Update the state of the chassis subsystem. More... | |
void | AddJoint (std::shared_ptr< ChVehicleJoint > joint) |
Utility function to add a joint (kinematic or bushing) to the vehicle system. | |
void | AddExternalForce (std::shared_ptr< ExternalForce > force) |
Utility force to add an external load to the chassis body. | |
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. | |
virtual std::string | GetTemplateName () const =0 |
Get the name of the vehicle subsystem template. | |
void | SetVisualizationType (VisualizationType vis) |
Set the visualization mode for this subsystem. | |
virtual void | AddVisualizationAssets (VisualizationType vis) |
Add visualization assets to this subsystem, for the specified visualization mode. | |
virtual void | RemoveVisualizationAssets () |
Remove all visualization assets from this subsystem. | |
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. | |
Static Public Member Functions | |
static void | RemoveJoint (std::shared_ptr< ChVehicleJoint > joint) |
Utility function to remove a joint (kinematic or bushing) from the vehicle system. | |
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... | |
Protected Attributes | |
std::shared_ptr< ChBodyAuxRef > | m_body |
handle to the chassis body | |
std::shared_ptr< ChLoadContainer > | m_bushings |
load container for vehicle bushings | |
std::vector< std::shared_ptr< ChMarker > > | m_markers |
list of user-defined markers | |
bool | m_fixed |
is the chassis body fixed to ground? | |
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 | |
Additional Inherited Members | |
Protected Member Functions inherited from chrono::vehicle::ChPart | |
virtual void | Create (const rapidjson::Document &d) |
Create a vehicle subsystem from JSON data. 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< ChLinkTSDA >> 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. | |
Constructor & Destructor Documentation
◆ ChChassis()
chrono::vehicle::ChChassis::ChChassis | ( | const std::string & | name, |
bool | fixed = false |
||
) |
Construct a chassis subsystem with the specified name.
- Parameters
-
[in] name name of the subsystem [in] fixed is the chassis body fixed to ground?
Member Function Documentation
◆ AddMarker()
void chrono::vehicle::ChChassis::AddMarker | ( | const std::string & | name, |
const ChCoordsys<> & | pos | ||
) |
Add a marker on the chassis body at the specified position (relative to the chassis reference frame).
If called before initialization, this function has no effect.
- Parameters
-
[in] name marker name [in] pos marker position relative to chassis reference frame
◆ GetCOMRot()
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.
◆ GetCOMSpeed()
|
inline |
Get the speed of the chassis COM.
Return the speed measured at the chassis center of mass.
◆ GetInertia()
|
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::RigidChassisRear, chrono::vehicle::rccar::RCCar_Chassis, chrono::vehicle::citybus::CityBus_Chassis, chrono::vehicle::feda::FEDA_Chassis, chrono::vehicle::gator::Gator_Chassis, chrono::vehicle::hmmwv::HMMWV_Chassis, chrono::vehicle::m113::M113_Chassis, chrono::vehicle::man::MAN_10t_Chassis, chrono::vehicle::man::MAN_5t_Chassis, chrono::vehicle::man::MAN_7t_Chassis, chrono::vehicle::marder::Marder_Chassis, chrono::vehicle::mrole::mrole_Chassis, chrono::vehicle::sedan::Sedan_Chassis, chrono::vehicle::uaz::UAZBUS_Chassis, chrono::vehicle::fmtv::FMTV_ChassisFront, chrono::vehicle::kraz::Kraz_trailer_Chassis, chrono::vehicle::fmtv::LMTV_ChassisRear, chrono::vehicle::fmtv::MTV_ChassisRear, chrono::vehicle::RigidChassis, chrono::vehicle::generic::Generic_Chassis, and chrono::vehicle::kraz::Kraz_tractor_Chassis.
◆ GetLocalDriverCoordsys()
|
pure virtual |
Get the local driver position and orientation.
This is a coordinate system relative to the chassis reference frame.
Implemented in chrono::vehicle::hmmwv::HMMWV_Chassis, chrono::vehicle::mrole::mrole_Chassis, chrono::vehicle::rccar::RCCar_Chassis, chrono::vehicle::sedan::Sedan_Chassis, chrono::vehicle::uaz::UAZBUS_Chassis, chrono::vehicle::fmtv::FMTV_ChassisFront, chrono::vehicle::citybus::CityBus_Chassis, chrono::vehicle::feda::FEDA_Chassis, chrono::vehicle::gator::Gator_Chassis, chrono::vehicle::m113::M113_Chassis, chrono::vehicle::man::MAN_10t_Chassis, chrono::vehicle::man::MAN_5t_Chassis, chrono::vehicle::man::MAN_7t_Chassis, chrono::vehicle::marder::Marder_Chassis, chrono::vehicle::RigidChassis, chrono::vehicle::kraz::Kraz_tractor_Chassis, and chrono::vehicle::generic::Generic_Chassis.
◆ GetPointAcceleration()
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.
◆ GetPointLocation()
Get the global position of the specified point.
The point is assumed to be given relative to the chassis reference frame. The returned location is expressed in the global reference frame.
◆ GetPointVelocity()
Get the global velocity of the specified point.
The point is assumed to be given relative to the chassis reference frame. The returned velocity is expressed in the global reference frame.
◆ GetRot()
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.
◆ GetSpeed()
|
inline |
Get the vehicle speed.
Return the speed measured at the origin of the chassis reference frame.
◆ Initialize()
|
virtual |
Initialize the chassis at the specified global position and orientation.
The initial position and forward velocity are assumed to be given in the current world frame.
- Parameters
-
[in] system containing system [in] chassisPos absolute chassis position [in] chassisFwdVel initial chassis forward velocity [in] collision_family chassis collision family
Reimplemented in chrono::vehicle::ChRigidChassis.
◆ SetAerodynamicDrag()
void chrono::vehicle::ChChassis::SetAerodynamicDrag | ( | double | Cd, |
double | area, | ||
double | air_density | ||
) |
Set parameters and enable aerodynamic drag force calculation.
By default, aerodynamic drag force calculation is disabled.
- Parameters
-
[in] Cd drag coefficient [in] area reference area [in] air_density air density
◆ SetCollide()
|
pure virtual |
Enable/disable contact for the chassis.
This function controls contact of the chassis with all other collision shapes in the simulation.
Implemented in chrono::vehicle::ChRigidChassisRear, and chrono::vehicle::ChRigidChassis.
◆ Synchronize()
|
virtual |
Update the state of the chassis subsystem.
The base class implementation applies all defined external forces to the chassis body.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_vehicle/ChChassis.h
- /builds/uwsbel/chrono/src/chrono_vehicle/ChChassis.cpp