chrono::vehicle::ChPathFollowerDriverSR Class Reference

Description

#include <ChPathFollowerDriver.h>

Inheritance diagram for chrono::vehicle::ChPathFollowerDriverSR:
Collaboration diagram for chrono::vehicle::ChPathFollowerDriverSR:

Public Member Functions

 ChPathFollowerDriverSR (ChVehicle &vehicle, std::shared_ptr< ChBezierCurve > path, const std::string &path_name, double target_speed, bool isClosedPath=false, double maxWheelTurnAngle=0.0, double axle_space=2.5)
 Construct using the specified Bezier curve. More...
 
 ChPathFollowerDriverSR (ChVehicle &vehicle, const std::string &steering_filename, const std::string &speed_filename, std::shared_ptr< ChBezierCurve > path, const std::string &path_name, double target_speed, bool isClosedPath=false, double maxWheelTurnAngle=0.0, double axle_space=2.5)
 Construct using JSON specification files. More...
 
void SetDesiredSpeed (double val)
 Set the desired vehicle speed.
 
void SetThresholdThrottle (double val)
 Specify the throttle value below which braking is enabled. More...
 
ChPathSteeringControllerSRGetSteeringController ()
 Get the underlying steering controller object.
 
ChSpeedControllerGetSpeedController ()
 Get the underlying speed controller object.
 
void Reset ()
 Reset the underlying controllers.
 
virtual void Advance (double step) override
 Advance the state of this driver system by the specified duration.
 
void ExportPathPovray (const std::string &out_dir)
 Export the Bezier curve for POV-Ray postprocessing.
 
- Public Member Functions inherited from chrono::vehicle::ChDriver
 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.
 
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.
 

Additional Inherited Members

- Protected Attributes inherited from chrono::vehicle::ChDriver
ChVehiclem_vehicle
 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

◆ ChPathFollowerDriverSR() [1/2]

chrono::vehicle::ChPathFollowerDriverSR::ChPathFollowerDriverSR ( ChVehicle vehicle,
std::shared_ptr< ChBezierCurve path,
const std::string &  path_name,
double  target_speed,
bool  isClosedPath = false,
double  maxWheelTurnAngle = 0.0,
double  axle_space = 2.5 
)

Construct using the specified Bezier curve.

Parameters
vehicleassociated vehicle
pathBezier curve with target path
path_namename of the path curve
target_speedconstant target speed
isClosedPathTreat the path as a closed loop
maxWheelTurnAngleneeded for wheeled vehicles, use default for tracked vehicles
axle_spaceneeded for course prediction

◆ ChPathFollowerDriverSR() [2/2]

chrono::vehicle::ChPathFollowerDriverSR::ChPathFollowerDriverSR ( ChVehicle vehicle,
const std::string &  steering_filename,
const std::string &  speed_filename,
std::shared_ptr< ChBezierCurve path,
const std::string &  path_name,
double  target_speed,
bool  isClosedPath = false,
double  maxWheelTurnAngle = 0.0,
double  axle_space = 2.5 
)

Construct using JSON specification files.

The two files must contain specification for the path-follower steering controller and the constant-speed controller, respectively.

Parameters
vehicleassociated vehicle
steering_filenameJSON file with steering controller specification
speed_filenameJSON file with speed controller specification
pathBezier curve with target path
path_namename of the path curve
target_speedconstant target speed
isClosedPathTreat the path as a closed loop
maxWheelTurnAngleneeded for wheeled vehicles, use default for tracked vehicles
axle_spaceneeded for course prediction

Member Function Documentation

◆ SetThresholdThrottle()

void chrono::vehicle::ChPathFollowerDriverSR::SetThresholdThrottle ( double  val)
inline

Specify the throttle value below which braking is enabled.

If the vehicle is moving faster than the set speed, the controller attempts to reduce speed either by reducing the throttle input (if the current throttle input is above the threshold value) or by applying brakes (otherwise).


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_vehicle/driver/ChPathFollowerDriver.h
  • /builds/uwsbel/chrono/src/chrono_vehicle/driver/ChPathFollowerDriver.cpp