Description

Base class for a suspension subsystem.

#include <ChSuspension.h>

Inheritance diagram for chrono::vehicle::ChSuspension:
Collaboration diagram for chrono::vehicle::ChSuspension:

Public Member Functions

 ChSuspension (const std::string &name)
 
virtual bool IsSteerable () const =0
 Specify whether or not this suspension can be steered.
 
virtual bool IsIndependent () const =0
 Specify whether or not this is an independent suspension.
 
const ChVectorGetLocation () const
 Get the location of the suspension subsystem relative to the chassis reference frame. More...
 
std::shared_ptr< ChBodyGetSpindle (VehicleSide side) const
 Get a handle to the spindle body on the specified side.
 
std::shared_ptr< ChShaftGetAxle (VehicleSide side) const
 Get a handle to the axle shaft on the specified side.
 
std::shared_ptr< ChLinkLockRevoluteGetRevolute (VehicleSide side) const
 Get a handle to the revolute joint on the specified side.
 
const ChVectorGetSpindlePos (VehicleSide side) const
 Get the global location of the spindle on the specified side.
 
ChQuaternion GetSpindleRot (VehicleSide side) const
 Get the orientation of the spindle body on the specified side. More...
 
const ChVectorGetSpindleLinVel (VehicleSide side) const
 Get the linear velocity of the spindle body on the specified side. More...
 
ChVector GetSpindleAngVel (VehicleSide side) const
 Get the angular velocity of the spindle body on the specified side. More...
 
double GetAxleSpeed (VehicleSide side) const
 Get the angular speed of the axle on the specified side.
 
void Synchronize ()
 Synchronize this suspension subsystem. More...
 
void ApplyAxleTorque (VehicleSide side, double torque)
 Apply the provided motor torque. More...
 
virtual void Initialize (std::shared_ptr< ChChassis > chassis, std::shared_ptr< ChSubchassis > subchassis, std::shared_ptr< ChSteering > steering, const ChVector<> &location, double left_ang_vel=0, double right_ang_vel=0)=0
 Initialize this suspension subsystem. More...
 
virtual double getSpindleRadius () const =0
 Return the radius of the spindle body (visualization only).
 
virtual double getSpindleWidth () const =0
 Return the width of the spindle body (visualization only).
 
virtual void AddVisualizationAssets (VisualizationType vis) override
 Add visualization assets for the suspension subsystem. More...
 
virtual void RemoveVisualizationAssets () override
 Remove visualization assets for the suspension subsystem.
 
virtual std::shared_ptr< ChBodyGetAntirollBody (VehicleSide side) const
 Specify the suspension body on the specified side to attach a possible antirollbar subsystem. More...
 
virtual std::shared_ptr< ChBodyGetBrakeBody (VehicleSide side) const
 Specify the body on the specified side for a possible connection to brake subsystem. More...
 
virtual double GetMass () const =0
 Get the total mass of the suspension subsystem.
 
virtual ChVector GetCOMPos () const =0
 Get the current global COM location of the suspension subsystem.
 
virtual double GetTrack ()=0
 Get the wheel track for the suspension subsystem.
 
virtual Force ReportSuspensionForce (VehicleSide side) const =0
 Return current suspension forces (spring and shock) on the specified side. More...
 
virtual void LogConstraintViolations (VehicleSide side)
 Log current constraint violations.
 
void ApplyParkingBrake (bool brake)
 Simple model of a parking brake.
 
- 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 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.
 

Protected Attributes

ChVector m_location
 location relative to chassis
 
std::shared_ptr< ChBodym_spindle [2]
 handles to spindle bodies
 
std::shared_ptr< ChShaftm_axle [2]
 handles to axle shafts
 
std::shared_ptr< ChShaftsBodym_axle_to_spindle [2]
 handles to spindle-shaft connectors
 
std::shared_ptr< ChLinkLockRevolutem_revolute [2]
 handles to spindle revolute joints
 
- 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

- 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 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.
 

Member Function Documentation

◆ AddVisualizationAssets()

◆ ApplyAxleTorque()

void chrono::vehicle::ChSuspension::ApplyAxleTorque ( VehicleSide  side,
double  torque 
)

Apply the provided motor torque.

The given torque is applied to the specified (left or right) axle. This function provides the interface to the drivetrain subsystem (intermediated by the vehicle system).

Parameters
sideindicates the axle (left or right) where the torque should be applied
torquevalue of applied torque

◆ GetAntirollBody()

virtual std::shared_ptr<ChBody> chrono::vehicle::ChSuspension::GetAntirollBody ( VehicleSide  side) const
inlinevirtual

Specify the suspension body on the specified side to attach a possible antirollbar subsystem.

The default implementation returns a NULL pointer.

Reimplemented in chrono::vehicle::ChMacPhersonStrut, chrono::vehicle::ChDoubleWishbone, chrono::vehicle::ChThreeLinkIRS, chrono::vehicle::ChSemiTrailingArm, chrono::vehicle::ChMultiLink, chrono::vehicle::ChSingleWishbone, and chrono::vehicle::ChDoubleWishboneReduced.

◆ GetBrakeBody()

virtual std::shared_ptr<ChBody> chrono::vehicle::ChSuspension::GetBrakeBody ( VehicleSide  side) const
inlinevirtual

Specify the body on the specified side for a possible connection to brake subsystem.

The default implementation returns a NULL pointer (indicating that a brake should connect to the chassis).

◆ GetLocation()

const ChVector& chrono::vehicle::ChSuspension::GetLocation ( ) const
inline

Get the location of the suspension subsystem relative to the chassis reference frame.

The suspension reference frame is always aligned with the chassis reference frame.

◆ GetSpindleAngVel()

ChVector chrono::vehicle::ChSuspension::GetSpindleAngVel ( VehicleSide  side) const
inline

Get the angular velocity of the spindle body on the specified side.

Return the angular velocity of the spindle frame, expressed in the global reference frame.

◆ GetSpindleLinVel()

const ChVector& chrono::vehicle::ChSuspension::GetSpindleLinVel ( VehicleSide  side) const
inline

Get the linear velocity of the spindle body on the specified side.

Return the linear velocity of the spindle center, expressed in the global reference frame.

◆ GetSpindleRot()

ChQuaternion chrono::vehicle::ChSuspension::GetSpindleRot ( VehicleSide  side) const

Get the orientation of the spindle body on the specified side.

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

◆ Initialize()

virtual void chrono::vehicle::ChSuspension::Initialize ( std::shared_ptr< ChChassis chassis,
std::shared_ptr< ChSubchassis subchassis,
std::shared_ptr< ChSteering steering,
const ChVector<> &  location,
double  left_ang_vel = 0,
double  right_ang_vel = 0 
)
pure virtual

Initialize this suspension subsystem.

The suspension subsystem is initialized by attaching it to the specified chassis and (if provided) to the specified subchassis, at the specified location (with respect to and expressed in the reference frame of the chassis). It is assumed that the suspension reference frame is always aligned with the chassis reference frame. If a steering subsystem is provided, the suspension tierods are to be attached to the steering's central link body (steered suspension); otherwise they are to be attached to the chassis (non-steered suspension).

Parameters
[in]chassisassociated chassis subsystem
[in]subchassisassociated subchassis subsystem (may be null)
[in]steeringassociated steering subsystem (may be null)
[in]locationlocation relative to the chassis frame
[in]left_ang_velinitial angular velocity of left wheel
[in]right_ang_velinitial angular velocity of right wheel

Implemented in chrono::vehicle::ChSAELeafspringAxle, chrono::vehicle::ChToeBarLeafspringAxle, chrono::vehicle::ChLeafspringAxle, chrono::vehicle::ChSolidBellcrankThreeLinkAxle, chrono::vehicle::ChRigidPinnedAxle, chrono::vehicle::ChSolidThreeLinkAxle, chrono::vehicle::ChThreeLinkIRS, chrono::vehicle::ChHendricksonPRIMAXX, chrono::vehicle::ChSolidAxle, chrono::vehicle::ChDoubleWishboneReduced, chrono::vehicle::ChMacPhersonStrut, chrono::vehicle::ChMultiLink, chrono::vehicle::ChRigidSuspension, chrono::vehicle::ChSemiTrailingArm, chrono::vehicle::ChDoubleWishbone, and chrono::vehicle::ChSingleWishbone.

◆ ReportSuspensionForce()

◆ Synchronize()

void chrono::vehicle::ChSuspension::Synchronize ( )

Synchronize this suspension subsystem.

This function must be called before synchronizing any wheels associated with this suspension.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_vehicle/wheeled_vehicle/ChSuspension.h
  • /builds/uwsbel/chrono/src/chrono_vehicle/wheeled_vehicle/ChSuspension.cpp