Apollo 11.0
自动驾驶开放平台
apollo::planning::History类 参考

#include <history.h>

apollo::planning::History 的协作图:

Public 成员函数

 History ()=default
 
const HistoryFrameGetLastFrame () const
 
int Add (const ADCTrajectory &adc_trajectory_pb)
 
void Clear ()
 
size_t Size () const
 
HistoryStatusmutable_history_status ()
 

详细描述

在文件 history.h100 行定义.

构造及析构函数说明

◆ History()

apollo::planning::History::History ( )
default

成员函数说明

◆ Add()

int apollo::planning::History::Add ( const ADCTrajectory adc_trajectory_pb)

在文件 history.cc164 行定义.

164 {
165 if (history_frames_.size() >=
166 static_cast<size_t>(FLAGS_history_max_record_num)) {
167 history_frames_.pop_front();
168 }
169
170 HistoryFrame history_frame;
171 history_frame.Init(adc_trajectory_pb);
172 history_frames_.emplace_back(std::move(history_frame));
173
174 return 0;
175}

◆ Clear()

void apollo::planning::History::Clear ( )

在文件 history.cc162 行定义.

162{ history_frames_.clear(); }

◆ GetLastFrame()

const HistoryFrame * apollo::planning::History::GetLastFrame ( ) const

在文件 history.cc155 行定义.

155 {
156 if (history_frames_.empty()) {
157 return nullptr;
158 } else {
159 return &(history_frames_.back());
160 }
161}

◆ mutable_history_status()

HistoryStatus * apollo::planning::History::mutable_history_status ( )
inline

在文件 history.h107 行定义.

107{ return &history_status_; }

◆ Size()

size_t apollo::planning::History::Size ( ) const

在文件 history.cc177 行定义.

177{ return history_frames_.size(); }

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