Apollo 10.0
自动驾驶开放平台
apollo::control::CheckPit类 参考

#include <check_pit.h>

apollo::control::CheckPit 的协作图:

静态 Public 成员函数

static bool CheckInPit (SimpleLongitudinalDebug *debug, const LonBasedPidControllerConf *conf, double speed, bool replan)
 

详细描述

在文件 check_pit.h27 行定义.

成员函数说明

◆ CheckInPit()

bool apollo::control::CheckPit::CheckInPit ( SimpleLongitudinalDebug debug,
const LonBasedPidControllerConf *  conf,
double  speed,
bool  replan 
)
static

在文件 check_pit.cc22 行定义.

25 {
26 static std::pair<double, int> replan_count(0, 0);
27 // static double pre_station_error = 0;
28
30
31 if (now - replan_count.first > conf->pit_replan_check_time()) {
32 replan_count.first = 0;
33 replan_count.second = 0;
34 }
35
36 if (replan) {
37 if (now - replan_count.first > conf->pit_replan_check_time()) {
38 replan_count.first = now;
39 replan_count.second = 1;
40 } else {
41 replan_count.first = now;
42 replan_count.second++;
43 }
44 }
45
46 const auto& vehicle_param =
48 if (replan_count.second >= conf->pit_replan_check_count() &&
49 abs(speed) < vehicle_param.max_abs_speed_when_stopped()) {
50 return true;
51 } else {
52 return false;
53 }
54}
static const VehicleConfig & GetConfig()
Get the current vehicle configuration.
static double NowInSeconds()
gets the current time in second.
Definition clock.cc:56
optional VehicleParam vehicle_param

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