|
CARLA
|
Longitudinal PID controller. More...
#include <PIDController.h>
Public Member Functions | |
| void | ChangeParameters (float K_P, float K_I, float K_D, float dt) |
| PIDLongitudinalController (SharedPtr< client::Vehicle > vehicle, float K_P=1.0f, float K_I=0.0f, float K_D=0.0f, float dt=0.03f) | |
| float | RunStep (float target_speed_kmh, bool debug=false) |
| Returns the throttle/brake command (clamped to [-1, 1]). | |
Private Member Functions | |
| float | PidControl (float target_speed_kmh, float current_speed_kmh) |
Private Attributes | |
| float | _dt |
| std::deque< float > | _error_buffer |
| float | _k_d |
| float | _k_i |
| float | _k_p |
| SharedPtr< client::Vehicle > | _vehicle |
Longitudinal PID controller.
Mirrors agents.navigation.controller.PIDLongitudinalController.
Definition at line 25 of file agents/navigation/PIDController.h.
| carla::agents::navigation::PIDLongitudinalController::PIDLongitudinalController | ( | SharedPtr< client::Vehicle > | vehicle, |
| float | K_P = 1.0f, |
||
| float | K_I = 0.0f, |
||
| float | K_D = 0.0f, |
||
| float | dt = 0.03f |
||
| ) |
Definition at line 42 of file PIDController.cpp.
| void carla::agents::navigation::PIDLongitudinalController::ChangeParameters | ( | float | K_P, |
| float | K_I, | ||
| float | K_D, | ||
| float | dt | ||
| ) |
Definition at line 78 of file PIDController.cpp.
References _dt, _k_d, _k_i, and _k_p.
Referenced by carla::agents::navigation::VehiclePIDController::ChangeLongitudinalPID().
|
private |
Definition at line 59 of file PIDController.cpp.
References _dt, _error_buffer, _k_d, _k_i, and _k_p.
Referenced by RunStep().
| float carla::agents::navigation::PIDLongitudinalController::RunStep | ( | float | target_speed_kmh, |
| bool | debug = false |
||
| ) |
Returns the throttle/brake command (clamped to [-1, 1]).
Definition at line 51 of file PIDController.cpp.
References _vehicle, carla::agents::navigation::GetSpeed(), and PidControl().
Referenced by carla::agents::navigation::VehiclePIDController::RunStep().
|
private |
Definition at line 46 of file agents/navigation/PIDController.h.
Referenced by ChangeParameters(), and PidControl().
|
private |
Definition at line 47 of file agents/navigation/PIDController.h.
Referenced by PidControl().
|
private |
Definition at line 45 of file agents/navigation/PIDController.h.
Referenced by ChangeParameters(), and PidControl().
|
private |
Definition at line 44 of file agents/navigation/PIDController.h.
Referenced by ChangeParameters(), and PidControl().
|
private |
Definition at line 43 of file agents/navigation/PIDController.h.
Referenced by ChangeParameters(), and PidControl().
|
private |
Definition at line 42 of file agents/navigation/PIDController.h.
Referenced by RunStep().