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

#include <discretized_path.h>

类 apollo::planning::DiscretizedPath 继承关系图:
apollo::planning::DiscretizedPath 的协作图:

Public 成员函数

 DiscretizedPath ()=default
 
 DiscretizedPath (std::vector< common::PathPoint > path_points)
 
double Length () const
 
common::PathPoint Evaluate (const double path_s) const
 
common::PathPoint EvaluateReverse (const double path_s) const
 

Protected 成员函数

std::vector< common::PathPoint >::const_iterator QueryLowerBound (const double path_s) const
 
std::vector< common::PathPoint >::const_iterator QueryUpperBound (const double path_s) const
 

详细描述

在文件 discretized_path.h31 行定义.

构造及析构函数说明

◆ DiscretizedPath() [1/2]

apollo::planning::DiscretizedPath::DiscretizedPath ( )
default

◆ DiscretizedPath() [2/2]

apollo::planning::DiscretizedPath::DiscretizedPath ( std::vector< common::PathPoint path_points)
explicit

在文件 discretized_path.cc33 行定义.

34 : std::vector<PathPoint>(std::move(path_points)) {}

成员函数说明

◆ Evaluate()

PathPoint apollo::planning::DiscretizedPath::Evaluate ( const double  path_s) const

在文件 discretized_path.cc43 行定义.

43 {
44 ACHECK(!empty());
45 auto it_lower = QueryLowerBound(path_s);
46 if (it_lower == begin()) {
47 return front();
48 }
49 if (it_lower == end()) {
50 return back();
51 }
53 *it_lower, path_s);
54}
std::vector< common::PathPoint >::const_iterator QueryLowerBound(const double path_s) const
#define ACHECK(cond)
Definition log.h:80
SLPoint InterpolateUsingLinearApproximation(const SLPoint &p0, const SLPoint &p1, const double w)

◆ EvaluateReverse()

PathPoint apollo::planning::DiscretizedPath::EvaluateReverse ( const double  path_s) const

在文件 discretized_path.cc64 行定义.

64 {
65 ACHECK(!empty());
66 auto it_upper = QueryUpperBound(path_s);
67 if (it_upper == begin()) {
68 return front();
69 }
70 if (it_upper == end()) {
71 return back();
72 }
74 *it_upper, path_s);
75}
std::vector< common::PathPoint >::const_iterator QueryUpperBound(const double path_s) const

◆ Length()

double apollo::planning::DiscretizedPath::Length ( ) const

在文件 discretized_path.cc36 行定义.

36 {
37 if (empty()) {
38 return 0.0;
39 }
40 return back().s() - front().s();
41}

◆ QueryLowerBound()

std::vector< PathPoint >::const_iterator apollo::planning::DiscretizedPath::QueryLowerBound ( const double  path_s) const
protected

在文件 discretized_path.cc56 行定义.

57 {
58 auto func = [](const PathPoint &tp, const double path_s) {
59 return tp.s() < path_s;
60 };
61 return std::lower_bound(begin(), end(), path_s, func);
62}

◆ QueryUpperBound()

std::vector< PathPoint >::const_iterator apollo::planning::DiscretizedPath::QueryUpperBound ( const double  path_s) const
protected

在文件 discretized_path.cc77 行定义.

78 {
79 auto func = [](const double path_s, const PathPoint &tp) {
80 return tp.s() < path_s;
81 };
82 return std::upper_bound(begin(), end(), path_s, func);
83}

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