Description
A driver model that is very similar with ChPathFollowerACCDriver but it uses multiple path steering controllers.
This allows the driver to switch to other paths when needed.
- See also
- ChMultiplePathSteeringController
- ChAdaptiveSpeedController
#include <SynMultiPathDriver.h>
Public Member Functions | |
ChMultiPathFollowerACCDriver (vehicle::ChVehicle &vehicle, std::vector< std::shared_ptr< ChBezierCurve >> paths, const std::string &path_name, double target_speed, double target_following_time, double target_min_distance, double current_distance) | |
Construct using the specified Bezier curves. More... | |
void | SetDesiredSpeed (double val) |
Set the desired vehicle speed. | |
void | SetDesiredFollowingTime (double val) |
Set the desired number of seconds of following distance. | |
void | SetDesiredFollowingMinDistance (double val) |
Set the desired min distance to the vehicle in front. More... | |
void | SetCurrentDistance (double val) |
Set the distance to the vehicle in front that the control will track. More... | |
void | SetThreshholdThrottle (double val) |
Specify the throttle value below which braking is enabled. More... | |
ChMultiplePathSteeringController & | GetSteeringController () |
Get the underlying steering controller object. | |
vehicle::ChAdaptiveSpeedController & | GetSpeedController () |
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. | |
void | changePath (int path) |
Change to another path in the array. | |
unsigned | addPath (std::shared_ptr< ChBezierCurve > path) |
Add another path into the array. | |
Public Member Functions inherited from chrono::vehicle::ChDriver | |
ChDriver (ChVehicle &vehicle) | |
Construct a driver subsystem associated with the given 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]) | |
DriverInputs | 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 | |
ChVehicle & | m_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
◆ ChMultiPathFollowerACCDriver()
chrono::synchrono::ChMultiPathFollowerACCDriver::ChMultiPathFollowerACCDriver | ( | vehicle::ChVehicle & | vehicle, |
std::vector< std::shared_ptr< ChBezierCurve >> | paths, | ||
const std::string & | path_name, | ||
double | target_speed, | ||
double | target_following_time, | ||
double | target_min_distance, | ||
double | current_distance | ||
) |
Construct using the specified Bezier curves.
- Parameters
-
vehicle associated vehicle paths an array of Bezier curve with target path path_name name of the path curve target_speed constant target speed target_following_time seconds of following time target_min_distance min following distance current_distance current distance to the vehicle in front
Member Function Documentation
◆ SetCurrentDistance()
|
inline |
Set the distance to the vehicle in front that the control will track.
Typically this will be called at each time step.
◆ SetDesiredFollowingMinDistance()
|
inline |
Set the desired min distance to the vehicle in front.
This comes into play especially at low to zero speeds.
◆ SetThreshholdThrottle()
|
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_synchrono/controller/driver/SynMultiPathDriver.h
- /builds/uwsbel/chrono/src/chrono_synchrono/controller/driver/SynMultiPathDriver.cpp