Apollo 11.0
自动驾驶开放平台
apollo::control::PIDPlusController类 参考

A proportional-integral-derivative controller for speed and steering using defualt integral hold 更多...

#include <pid_plus_controller.h>

类 apollo::control::PIDPlusController 继承关系图:
apollo::control::PIDPlusController 的协作图:

Public 成员函数

void InitPID ()
 initialize pid controller
 
void SetPID (const PidPlusConf &pid_plus_conf)
 set pid controller coefficients for the proportional, integral, and derivative
 
- Public 成员函数 继承自 apollo::control::PIDController
void Init (const PidConf &pid_conf)
 initialize pid controller
 
void SetPID (const PidConf &pid_conf)
 set pid controller coefficients for the proportional, integral, and derivative
 
void Reset ()
 reset variables for pid controller
 
void Reset_integral ()
 reset integral for pid controller
 
virtual double Control (const double error, const double dt)
 compute control value based on the error
 
virtual ~PIDController ()=default
 
int IntegratorSaturationStatus () const
 get saturation status
 
bool IntegratorHold () const
 get status that if integrator is hold
 
void SetIntegratorHold (bool hold)
 set whether to hold integrator component at its current value.
 

额外继承的成员函数

- Protected 属性 继承自 apollo::control::PIDController
double kp_ = 0.0
 
double ki_ = 0.0
 
double kd_ = 0.0
 
double kaw_ = 0.0
 
double previous_error_ = 0.0
 
double previous_output_ = 0.0
 
double integral_ = 0.0
 
double integrator_saturation_high_ = 0.0
 
double integrator_saturation_low_ = 0.0
 
bool first_hit_ = false
 
bool integrator_enabled_ = false
 
bool integrator_hold_ = false
 
int integrator_saturation_status_ = 0
 
double output_saturation_high_ = 0.0
 
double output_saturation_low_ = 0.0
 
int output_saturation_status_ = 0
 

详细描述

A proportional-integral-derivative controller for speed and steering using defualt integral hold

在文件 pid_plus_controller.h 第 40 行定义.

成员函数说明

◆ InitPID()

void apollo::control::PIDPlusController::InitPID ( )

initialize pid controller

参数
pid_confconfiguration for pid controller

在文件 pid_plus_controller.cc 第 26 行定义.

◆ SetPID()

void apollo::control::PIDPlusController::SetPID ( const PidPlusConf &  pid_plus_conf)

set pid controller coefficients for the proportional, integral, and derivative

参数
Pidconfand speed

在文件 pid_plus_controller.cc 第 36 行定义.

36 {
37 kp_ = pid_plus_conf.pid_conf().kp();
38 ki_ = pid_plus_conf.pid_conf().ki();
39 kd_ = pid_plus_conf.pid_conf().kd();
40 kaw_ = pid_plus_conf.pid_conf().kaw();
41 integrator_enabled_ = pid_plus_conf.pid_conf().integrator_enable();
42 integrator_saturation_high_ = std::fabs(pid_plus_conf.pid_conf().integrator_saturation_level());
43 integrator_saturation_low_ = -std::fabs(pid_plus_conf.pid_conf().integrator_saturation_level());
44 output_saturation_high_ = std::fabs(pid_plus_conf.pid_conf().output_saturation_level());
45 output_saturation_low_ = -std::fabs(pid_plus_conf.pid_conf().output_saturation_level());
46 ADEBUG << "kp: " << kp_ << " ki: " << ki_ << " kd: " << kd_ << " integrator_enabled: " << integrator_enabled_
47 << " integrator_saturation_high: " << integrator_saturation_high_;
48}
#define ADEBUG
Definition log.h:41

该类的文档由以下文件生成: