chrono::vehicle::TrackedVehicle Class Reference

Description

Tracked vehicle model constructed from a JSON specification file.

#include <TrackedVehicle.h>

Inheritance diagram for chrono::vehicle::TrackedVehicle:
Collaboration diagram for chrono::vehicle::TrackedVehicle:

Public Member Functions

 TrackedVehicle (const std::string &filename, ChMaterialSurfaceBase::ContactMethod contact_method=ChMaterialSurfaceBase::DVI)
 
 TrackedVehicle (ChSystem *system, const std::string &filename)
 
virtual void Initialize (const ChCoordsys<> &chassisPos, double chassisFwdVel=0) override
 Initialize this vehicle at the specified global location and orientation.
 
- Public Member Functions inherited from chrono::vehicle::ChTrackedVehicle
 ChTrackedVehicle (const std::string &name, ChMaterialSurfaceBase::ContactMethod contact_method=ChMaterialSurfaceBase::DVI)
 Construct a vehicle system with a default ChSystem. More...
 
 ChTrackedVehicle (const std::string &name, ChSystem *system)
 Construct a vehicle system using the specified ChSystem. More...
 
virtual ~ChTrackedVehicle ()
 Destructor.
 
const std::string & GetName () const
 Get the name identifier for this vehicle system.
 
void SetName (const std::string &name)
 Set the name identifier for this vehicle system.
 
virtual double GetVehicleMass () const override
 Get the vehicle total mass. More...
 
std::shared_ptr< ChTrackAssemblyGetTrackAssembly (VehicleSide side) const
 Get the specified suspension subsystem.
 
std::shared_ptr< ChTrackDrivelineGetDriveline () const
 Get a handle to the vehicle's driveline 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. More...
 
size_t GetNumRoadWheelAssemblies (VehicleSide side) const
 Get the number of suspensions in the specified track assembly.
 
size_t GetNumTrackShoes (VehicleSide side) const
 Get the number of shoes in the specified track assembly.
 
std::shared_ptr< ChTrackShoeGetTrackShoe (VehicleSide side, size_t id) const
 Get a handle to the specified track shoe.
 
BodyState GetTrackShoeState (VehicleSide side, size_t shoe_id) const
 Get the complete state for the specified track shoe. More...
 
void GetTrackShoeStates (VehicleSide side, BodyStates &states) const
 Get the complete states for all track shoes of the specified track assembly. More...
 
void SetSprocketVisualizationType (VisualizationType vis)
 Set visualization type for the sprocket subsystem.
 
void SetIdlerVisualizationType (VisualizationType vis)
 
void SetRoadWheelAssemblyVisualizationType (VisualizationType vis)
 Set visualization type for the suspension subsystems.
 
void SetRoadWheelVisualizationType (VisualizationType vis)
 Set visualization type for the road-wheel subsystems.
 
void SetTrackShoeVisualizationType (VisualizationType vis)
 Set visualization type for the track shoe subsystems.
 
void SetCollide (int flags)
 Set collision flags for the various subsystems. More...
 
void MonitorContacts (int flags)
 Set contacts to be monitored. More...
 
void SetContactCollection (bool val)
 Turn on/off contact data collection. More...
 
void WriteContacts (const std::string &filename)
 Write contact information to file. More...
 
void Synchronize (double time, double steering, double braking, double powertrain_torque, const TrackShoeForces &shoe_forces_left, const TrackShoeForces &shoe_forces_right)
 Update the state of this vehicle at the current time. More...
 
virtual void Advance (double step) final
 Advance the state of this vehicle by the specified time step.
 
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 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 (ChMaterialSurfaceBase::ContactMethod contact_method=ChMaterialSurfaceBase::DVI)
 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::ChTrackedVehicle
std::string m_name
 name of the vehicle system
 
std::shared_ptr< ChTrackAssemblym_tracks [2]
 handles to the track assemblies (left/right)
 
std::shared_ptr< ChTrackDrivelinem_driveline
 handle to the driveline subsystem
 
ChTrackContactManagerm_contacts
 manager for internal contacts
 
- 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