Description

Irrlicht-based GUI driver for the a suspension test rig.

This class implements the functionality required by its base ChDriverSTR class using keyboard inputs. As an Irrlicht event receiver, its OnEvent() callback is used to keep track and update the current driver inputs.

#include <ChIrrGuiDriverSTR.h>

Inheritance diagram for chrono::vehicle::ChIrrGuiDriverSTR:
Collaboration diagram for chrono::vehicle::ChIrrGuiDriverSTR:

Public Member Functions

 ChIrrGuiDriverSTR (ChVehicleIrrApp &app)
 
virtual bool OnEvent (const irr::SEvent &event) override
 Override for OnEvent.
 
void SetSteeringDelta (double delta)
 Set the time response for steering control. More...
 
void SetDisplacementDelta (double delta)
 Set the time response for post displacement control. More...
 
- Public Member Functions inherited from chrono::vehicle::ChDriverSTR
 ChDriverSTR (ChSuspensionTestRig &rig)
 
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.
 
virtual void Advance (double step)
 Advance the state of this driver system by the specified time step.
 
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 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.
 

Additional Inherited Members

- Protected Attributes inherited from chrono::vehicle::ChDriverSTR
ChSuspensionTestRigm_rig
 reference to associated suspension test rig
 
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
 

Constructor & Destructor Documentation

chrono::vehicle::ChIrrGuiDriverSTR::ChIrrGuiDriverSTR ( ChVehicleIrrApp app)
Parameters
apphandle to the vehicle Irrlicht application

Member Function Documentation

void chrono::vehicle::ChIrrGuiDriverSTR::SetDisplacementDelta ( double  delta)

Set the time response for post displacement control.

The provided value represents the time (in seconds) for increasing the displacement input from 0 to 1 (or decreasing it from 0 to -1).

void chrono::vehicle::ChIrrGuiDriverSTR::SetSteeringDelta ( double  delta)

Set the time response for steering control.

The provided value represents the time (in seconds) for increasing the steering input from 0 to 1 (or decreasing it from 0 to -1).