chrono::vehicle::ChTrackTestRig Class Reference

Description

Definition of a suspension test rig.

#include <ChTrackTestRig.h>

Inheritance diagram for chrono::vehicle::ChTrackTestRig:
Collaboration diagram for chrono::vehicle::ChTrackTestRig:

Public Member Functions

 ChTrackTestRig ()
 Default constructor.
 
 ChTrackTestRig (const std::string &filename, const ChVector<> &location, ChMaterialSurface::ContactMethod contact_method=ChMaterialSurface::NSC)
 Construct a test rig from specified track assembly JSON file. More...
 
 ChTrackTestRig (std::shared_ptr< ChTrackAssembly > assembly, const ChVector<> &location, ChMaterialSurface::ContactMethod contact_method=ChMaterialSurface::NSC)
 Construct a test rig using the specified track assembly and subsystem locations. More...
 
 ~ChTrackTestRig ()
 Destructor.
 
void SetActuator_func (const std::shared_ptr< ChFunction > &func)
 Set the actuator function.
 
double GetActuatorDisp ()
 
double GetActuatorForce ()
 
double GetActuatorMarkerDist ()
 
void SetMaxTorque (double val)
 Set maximum sprocket torque.
 
virtual double GetVehicleMass () const override
 Get the rig total mass. More...
 
const ChVectorGetPostPosition () const
 Return the location of the shaker post.
 
std::shared_ptr< ChTrackAssemblyGetTrackAssembly () const
 Get the track assembly subsystem.
 
virtual std::shared_ptr< ChShaftGetDriveshaft () const override
 Get a handle to the vehicle's driveshaft body.
 
virtual double GetDriveshaftSpeed () const override
 Get the angular speed of the driveshaft.
 
virtual void Initialize (const ChCoordsys<> &chassisPos, double chassisFwdVel=0) override
 Initialize this chassis at the specified global location and orientation. More...
 
void SetCollide (int flags)
 Set collision flags for the various subsystems. More...
 
void Synchronize (double time, double disp, double throttle, const TrackShoeForces &shoe_forces)
 Update the state at the current time. More...
 
virtual void LogConstraintViolations () override
 Log current constraint violations.
 
- Public Member Functions inherited from chrono::vehicle::ChVehicle
virtual ~ChVehicle ()
 Destructor.
 
ChSystemGetSystem ()
 Get a pointer to the Chrono ChSystem.
 
double GetChTime () const
 Get the current simulation time of the underlying ChSystem.
 
std::shared_ptr< ChChassisGetChassis () const
 Get a handle to the vehicle's chassis subsystem.
 
std::shared_ptr< ChBodyAuxRefGetChassisBody () const
 Get a handle to the vehicle's chassis body.
 
const ChVectorGetVehiclePos () const
 Get the vehicle location. More...
 
const ChQuaternionGetVehicleRot () const
 Get the vehicle orientation. More...
 
double GetVehicleSpeed () const
 Get the vehicle speed. More...
 
double GetVehicleSpeedCOM () const
 Get the speed of the chassis COM. More...
 
ChVector GetVehicleAcceleration (const ChVector<> &locpos) const
 Get the acceleration at the specified point. More...
 
ChVector GetDriverPos () const
 Get the global location of the driver.
 
void SetChassisVisualizationType (VisualizationType vis)
 Set visualization mode for the chassis subsystem.
 
void SetChassisCollide (bool state)
 Enable/disable collision for the chassis usbsystem. More...
 
virtual void SetChassisVehicleCollide (bool state)
 Enable/disable collision between the chassis and all other vehicle subsystems. More...
 
virtual void Advance (double step)
 Advance the state of this vehicle by the specified time step.
 
void SetStepsize (double val)
 Set the integration step size for the vehicle system.
 
double GetStepsize () const
 Get the current value of the integration step size for the vehicle system.
 

Additional Inherited Members

- Protected Member Functions inherited from chrono::vehicle::ChVehicle
 ChVehicle (ChMaterialSurface::ContactMethod contact_method=ChMaterialSurface::NSC)
 Construct a vehicle system with a default ChSystem.
 
 ChVehicle (ChSystem *system)
 Construct a vehicle system using the specified ChSystem.
 
- Protected Attributes inherited from chrono::vehicle::ChVehicle
ChSystemm_system
 pointer to the Chrono system
 
bool m_ownsSystem
 true if system created at construction
 
std::shared_ptr< ChChassism_chassis
 handle to the chassis subsystem
 
double m_stepsize
 integration step-size for the vehicle system
 

Constructor & Destructor Documentation

chrono::vehicle::ChTrackTestRig::ChTrackTestRig ( const std::string &  filename,
const ChVector<> &  location,
ChMaterialSurface::ContactMethod  contact_method = ChMaterialSurface::NSC 
)

Construct a test rig from specified track assembly JSON file.

Parameters
[in]filenameJSON file with test rig specification
[in]locationtrack assembly location
[in]contact_methodcontact method
chrono::vehicle::ChTrackTestRig::ChTrackTestRig ( std::shared_ptr< ChTrackAssembly assembly,
const ChVector<> &  location,
ChMaterialSurface::ContactMethod  contact_method = ChMaterialSurface::NSC 
)

Construct a test rig using the specified track assembly and subsystem locations.

Parameters
[in]assemblyhandle to the track assembly
[in]locationtrack assembly location
[in]contact_methodcontact method

Member Function Documentation

double chrono::vehicle::ChTrackTestRig::GetVehicleMass ( ) const
overridevirtual

Get the rig total mass.

This is simply the mass of the track subsystem.

Implements chrono::vehicle::ChVehicle.

void chrono::vehicle::ChTrackTestRig::Initialize ( const ChCoordsys<> &  chassisPos,
double  chassisFwdVel = 0 
)
overridevirtual

Initialize this chassis at the specified global location and orientation.

Parameters
[in]chassisPosinitial global position and orientation
[in]chassisFwdVelinitial forward velocity (ignored)

Implements chrono::vehicle::ChVehicle.

void chrono::vehicle::ChTrackTestRig::SetCollide ( int  flags)

Set collision flags for the various subsystems.

By default, collision is enabled for sprocket, idler, road wheels, and track shoes. To override these default settings, this function must be called after the call to Initialize().

void chrono::vehicle::ChTrackTestRig::Synchronize ( double  time,
double  disp,
double  throttle,
const TrackShoeForces shoe_forces 
)

Update the state at the current time.

steering between -1 and +1, and no force need be applied if using external actuation

Parameters
[in]timecurrent time
[in]disppost displacement
[in]throttlethrottle input
[in]shoe_forcesvector of track shoe forces