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

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 ChVectorGetRelPosition () const
 Get the location of the suspension subsystem relative to the associated 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 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
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.
 
double GetMass () const
 Get the subsystem mass. More...
 
const ChFrameGetCOMFrame () const
 Get the current subsystem COM frame (relative to and expressed in the subsystem's reference frame). More...
 
const ChMatrix33GetInertia () const
 Get the current subsystem inertia (relative to the subsystem COM frame). More...
 
const ChFrameGetTransform () const
 Get the current subsystem position relative to the global frame. More...
 
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 Member Functions

 ChSuspension (const std::string &name)
 Construct a suspension subsystem with given name.
 
- Protected Member Functions inherited from chrono::vehicle::ChPart
 ChPart (const std::string &name)
 Construct a vehicle subsystem with the specified name.
 
virtual void InitializeInertiaProperties ()=0
 Initialize subsystem inertia properties. More...
 
virtual void UpdateInertiaProperties ()=0
 Update subsystem inertia properties. More...
 
void AddMass (double &mass)
 Add this subsystem's mass. More...
 
void AddInertiaProperties (ChVector<> &com, ChMatrix33<> &inertia)
 Add this subsystem's inertia properties. More...
 
virtual void Create (const rapidjson::Document &d)
 Create a vehicle subsystem from JSON data. More...
 

Protected Attributes

ChVector m_rel_loc
 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
 
std::shared_ptr< ChPartm_parent
 parent subsystem (empty if parent is vehicle)
 
double m_mass
 subsystem mass
 
ChMatrix33 m_inertia
 inertia tensor (relative to subsystem COM)
 
ChFrame m_com
 COM frame (relative to subsystem reference frame)
 
ChFrame m_xform
 subsystem frame expressed in the global frame
 

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...
 
- 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< ChLinkRSDA >> 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.
 
static void RemoveVisualizationAssets (std::shared_ptr< ChPhysicsItem > item)
 Erase all visual shapes from the visual model associated with the specified physics item (if any).
 
static void RemoveVisualizationAsset (std::shared_ptr< ChPhysicsItem > item, std::shared_ptr< ChVisualShape > shape)
 Erase the given shape from the visual model associated with the specified physics item (if any).
 

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::ChDoubleWishbone, chrono::vehicle::ChThreeLinkIRS, chrono::vehicle::ChMacPhersonStrut, 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).

◆ GetRelPosition()

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

Get the location of the suspension subsystem relative to the associated 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::feda::FEDA_DoubleWishboneRear, chrono::vehicle::ChSAELeafspringAxle, chrono::vehicle::ChToeBarLeafspringAxle, chrono::vehicle::ChLeafspringAxle, chrono::vehicle::ChRigidPinnedAxle, chrono::vehicle::ChSolidBellcrankThreeLinkAxle, chrono::vehicle::ChThreeLinkIRS, chrono::vehicle::ChSolidThreeLinkAxle, chrono::vehicle::ChDoubleWishboneReduced, chrono::vehicle::ChSolidAxle, chrono::vehicle::feda::FEDA_DoubleWishboneFront, chrono::vehicle::ChRigidSuspension, chrono::vehicle::ChSemiTrailingArm, chrono::vehicle::ChDoubleWishbone, chrono::vehicle::ChHendricksonPRIMAXX, chrono::vehicle::ChMacPhersonStrut, chrono::vehicle::ChMultiLink, 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