Base class for a vehicle driver system.

A driver system must be able to report the current values of the inputs (throttle, steering, braking). A concrete driver class must set the member variables m_throttle, m_steering, and m_braking.

#include <ChDriver.h>

Inheritance diagram for chrono::vehicle::ChDriver:
Collaboration diagram for chrono::vehicle::ChDriver:

Public Member Functions

 ChDriver (ChVehicle &vehicle)
double GetThrottle () const
 Get the driver throttle input (in the range [0,1])
double GetSteering () const
 Get the driver steering input (in the range [-1,+1])
double GetBraking () const
 Get the driver braking input (in the range [0,1])
Inputs GetInputs () const
 Get all current inputs at once.
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 SetSteering (double val, double min_val=-1, double max_val=1)
 Overwrite the value for the driver steering input.
void SetThrottle (double val, double min_val=0, double max_val=1)
 Overwrite the value for the driver throttle input.
void SetBraking (double val, double min_val=0, double max_val=1)
 Overwrite the value for the driver braking input.

Protected Attributes

 reference to associated vehicle
double m_throttle
 current value of throttle input
double m_steering
 current value of steering input
double m_braking
 current value of braking input

Constructor & Destructor Documentation

◆ ChDriver()

chrono::vehicle::ChDriver::ChDriver ( ChVehicle vehicle)
vehicleassociated vehicle

The documentation for this class was generated from the following files:
  • C:/Users/udarn/Repositories/chrono/src/chrono_vehicle/ChDriver.h
  • C:/Users/udarn/Repositories/chrono/src/chrono_vehicle/ChDriver.cpp