Description

Base class for a suspension test rig driver system.

A driver system must be able to report the current values of the inputs (left post, right post, steering). A concrete driver class must set the member variables m_displacementLeft, m_displacementRight, and m_steering.

#include <ChDriverSTR.h>

Inheritance diagram for chrono::vehicle::ChDriverSTR:

Public Member Functions

double GetDisplacementLeft () const
 Get the left post vertical displacement (in the range [-1,+1])
 
double GetDisplacementRight () const
 Get the right post vertical displacement (in the range [-1,+1])
 
double GetSteering () const
 Get the driver steering input (in the range [-1,+1])
 
virtual void Initialize ()
 Initialize this driver system.
 
virtual void Synchronize (double time)
 Update the state of this driver system at the current time.
 
bool LogInit (const std::string &filename)
 Initialize output file for recording driver inputs.
 
bool Log (double time)
 Record the current driver inputs to the log file.
 
void SetTimeDelay (double delay)
 Set value of the time delay. More...
 
void SetDisplacementLeft (double val, double min_val=-1, double max_val=1)
 Overwrite the value for the driver left post displacement input.
 
void SetDisplacementRight (double val, double min_val=-1, double max_val=1)
 Overwrite the value for the driver right post displacement input.
 
void SetSteering (double val, double min_val=-1, double max_val=1)
 Overwrite the value for the driver steering input.
 

Protected Attributes

double m_displLeft
 current value of left post displacement
 
double m_displRight
 current value of right post displacement
 
double m_steering
 current value of steering input
 
double m_delay
 time delay before generating inputs
 

Member Function Documentation

void chrono::vehicle::ChDriverSTR::SetTimeDelay ( double  delay)

Set value of the time delay.

During this initial time period, no driver inputs are generated.