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

#include <st_boundary.h>

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

Public 类型

enum class  BoundaryType {
  UNKNOWN , STOP , FOLLOW , YIELD ,
  OVERTAKE , KEEP_CLEAR
}
 

Public 成员函数

 STBoundary ()=default
 Constructors: STBoundary must be initialized with a vector of ST-point pairs.
 
 STBoundary (const std::vector< std::pair< STPoint, STPoint > > &point_pairs, bool is_accurate_boundary=false)
 
 STBoundary (const common::math::Box2d &box)=delete
 
 STBoundary (std::vector< common::math::Vec2d > points)=delete
 
 ~STBoundary ()=default
 Default destructor.
 
bool IsEmpty () const
 
bool GetUnblockSRange (const double curr_time, double *s_upper, double *s_lower) const
 
bool GetBoundarySRange (const double curr_time, double *s_upper, double *s_lower) const
 
bool GetBoundarySlopes (const double curr_time, double *ds_upper, double *ds_lower) const
 
void PrintDebug (std::string suffix="") const
 
BoundaryType boundary_type () const
 
const std::string & id () const
 
double characteristic_length () const
 
void set_id (const std::string &id)
 
void SetBoundaryType (const BoundaryType &boundary_type)
 
void SetCharacteristicLength (const double characteristic_length)
 
double min_s () const
 
double min_t () const
 
double max_s () const
 
double max_t () const
 
std::vector< STPointupper_points () const
 
std::vector< STPointlower_points () const
 
bool IsPointInBoundary (const STPoint &st_point) const
 
STBoundary ExpandByS (const double s) const
 
STBoundary ExpandByT (const double t) const
 
STBoundary CutOffByT (const double t) const
 
STPoint upper_left_point () const
 
STPoint upper_right_point () const
 
STPoint bottom_left_point () const
 
STPoint bottom_right_point () const
 
void set_upper_left_point (STPoint st_point)
 
void set_upper_right_point (STPoint st_point)
 
void set_bottom_left_point (STPoint st_point)
 
void set_bottom_right_point (STPoint st_point)
 
void set_obstacle_road_right_ending_t (double road_right_ending_t)
 
double obstacle_road_right_ending_t () const
 
- Public 成员函数 继承自 apollo::common::math::Polygon2d
 Polygon2d ()=default
 Empty constructor.
 
 Polygon2d (const Box2d &box)
 Constructor which takes a box.
 
 Polygon2d (std::vector< Vec2d > points, bool check_area=true)
 Constructor which takes a vector of points as its vertices.
 
const std::vector< Vec2d > & points () const
 Get the vertices of the polygon.
 
const std::vector< LineSegment2d > & line_segments () const
 Get the edges of the polygon.
 
int num_points () const
 Get the number of vertices of the polygon.
 
bool is_convex () const
 Check if the polygon is convex.
 
double area () const
 Get the area of the polygon.
 
double DistanceToBoundary (const Vec2d &point) const
 Compute the distance from a point to the boundary of the polygon.
 
double DistanceTo (const Vec2d &point) const
 Compute the distance from a point to the polygon.
 
double DistanceTo (const LineSegment2d &line_segment) const
 Compute the distance from a line segment to the polygon.
 
double DistanceTo (const Box2d &box) const
 Compute the distance from a box to the polygon.
 
double DistanceTo (const Polygon2d &polygon) const
 Compute the distance from another polygon to the polygon.
 
double DistanceSquareTo (const Vec2d &point) const
 Compute the square of distance from a point to the polygon.
 
bool IsPointIn (const Vec2d &point) const
 Check if a point is within the polygon.
 
bool IsPointOnBoundary (const Vec2d &point) const
 Check if a point is on the boundary of the polygon.
 
bool Contains (const LineSegment2d &line_segment) const
 Check if the polygon contains a line segment.
 
bool Contains (const Polygon2d &polygon) const
 Check if the polygon contains another polygon.
 
bool HasOverlap (const LineSegment2d &line_segment) const
 Check if a line segment has overlap with this polygon.
 
bool GetOverlap (const LineSegment2d &line_segment, Vec2d *const first, Vec2d *const last) const
 Get the overlap of a line segment and this polygon.
 
void GetAllVertices (std::vector< Vec2d > *const vertices) const
 Get all vertices of the polygon
 
std::vector< Vec2dGetAllVertices () const
 Get all vertices of the polygon
 
std::vector< LineSegment2dGetAllOverlaps (const LineSegment2d &line_segment) const
 Get all overlapped line segments of a line segment and this polygon.
 
bool HasOverlap (const Polygon2d &polygon) const
 Check if this polygon has overlap with another polygon.
 
bool ComputeOverlap (const Polygon2d &other_polygon, Polygon2d *const overlap_polygon) const
 Compute the overlap of this polygon and the other polygon if any.
 
double ComputeIoU (const Polygon2d &other_polygon) const
 Compute intersection over union ratio of this polygon and the other polygon.
 
AABox2d AABoundingBox () const
 Get the axis-aligned bound box of the polygon.
 
Box2d BoundingBoxWithHeading (const double heading) const
 Get the bound box according to a heading.
 
Box2d MinAreaBoundingBox () const
 Get the bounding box with the minimal area.
 
void ExtremePoints (const double heading, Vec2d *const first, Vec2d *const last) const
 Get the extreme points along a heading direction.
 
Polygon2d ExpandByDistance (const double distance) const
 Expand this polygon by a distance.
 
Polygon2d PolygonExpandByDistance (const double distance) const
 
void CalculateVertices (const Vec2d &shift_vec)
 
std::string DebugString () const
 Get a string containing essential information about the polygon for debugging purpose.
 
double min_x () const
 
double max_x () const
 
double min_y () const
 
double max_y () const
 
LineSegment2d MinLineSegment () const
 

静态 Public 成员函数

static STBoundary CreateInstance (const std::vector< STPoint > &lower_points, const std::vector< STPoint > &upper_points)
 Wrapper of the constructor (old).
 
static STBoundary CreateInstanceAccurate (const std::vector< STPoint > &lower_points, const std::vector< STPoint > &upper_points)
 Wrapper of the constructor.
 
static std::string TypeName (BoundaryType type)
 
- 静态 Public 成员函数 继承自 apollo::common::math::Polygon2d
static bool ComputeConvexHull (const std::vector< Vec2d > &points, Polygon2d *const polygon, bool check_area=true)
 Compute the convex hull of a group of points.
 

额外继承的成员函数

- Protected 成员函数 继承自 apollo::common::math::Polygon2d
void BuildFromPoints (bool check_area=true)
 
int Next (int at) const
 
int Prev (int at) const
 
- 静态 Protected 成员函数 继承自 apollo::common::math::Polygon2d
static bool ClipConvexHull (const LineSegment2d &line_segment, std::vector< Vec2d > *const points)
 
- Protected 属性 继承自 apollo::common::math::Polygon2d
std::vector< Vec2dpoints_
 
int num_points_ = 0
 
std::vector< LineSegment2dline_segments_
 
bool is_convex_ = false
 
double area_ = 0.0
 
double min_x_ = 0.0
 
double max_x_ = 0.0
 
double min_y_ = 0.0
 
double max_y_ = 0.0
 

详细描述

在文件 st_boundary.h40 行定义.

成员枚举类型说明

◆ BoundaryType

构造及析构函数说明

◆ STBoundary() [1/4]

apollo::planning::STBoundary::STBoundary ( )
default

Constructors: STBoundary must be initialized with a vector of ST-point pairs.

Each pair refers to a time t, with (lower_s, upper_s).

◆ STBoundary() [2/4]

apollo::planning::STBoundary::STBoundary ( const std::vector< std::pair< STPoint, STPoint > > &  point_pairs,
bool  is_accurate_boundary = false 
)
explicit

在文件 st_boundary.cc34 行定义.

36 {
37 ACHECK(IsValid(point_pairs)) << "The input point_pairs are NOT valid";
38
39 std::vector<std::pair<STPoint, STPoint>> reduced_pairs(point_pairs);
40 if (!is_accurate_boundary) {
41 RemoveRedundantPoints(&reduced_pairs);
42 }
43
44 for (const auto& item : reduced_pairs) {
45 // use same t for both points
46 const double t = item.first.t();
47 lower_points_.emplace_back(item.first.s(), t);
48 upper_points_.emplace_back(item.second.s(), t);
49 }
50
51 for (const auto& point : lower_points_) {
52 points_.emplace_back(point.t(), point.s());
53 }
54 for (auto rit = upper_points_.rbegin(); rit != upper_points_.rend(); ++rit) {
55 points_.emplace_back(rit->t(), rit->s());
56 }
57
59
60 for (const auto& point : lower_points_) {
61 min_s_ = std::fmin(min_s_, point.s());
62 }
63 for (const auto& point : upper_points_) {
64 max_s_ = std::fmax(max_s_, point.s());
65 }
66 min_t_ = lower_points_.front().t();
67 max_t_ = lower_points_.back().t();
68
69 obstacle_road_right_ending_t_ = std::numeric_limits<double>::lowest();
70}
std::vector< Vec2d > points_
Definition polygon2d.h:333
void BuildFromPoints(bool check_area=true)
Definition polygon2d.cc:214
#define ACHECK(cond)
Definition log.h:80

◆ STBoundary() [3/4]

apollo::planning::STBoundary::STBoundary ( const common::math::Box2d box)
explicitdelete

◆ STBoundary() [4/4]

apollo::planning::STBoundary::STBoundary ( std::vector< common::math::Vec2d points)
explicitdelete

◆ ~STBoundary()

apollo::planning::STBoundary::~STBoundary ( )
default

Default destructor.

成员函数说明

◆ bottom_left_point()

STPoint apollo::planning::STBoundary::bottom_left_point ( ) const

在文件 st_boundary.cc374 行定义.

374 {
375 DCHECK(!lower_points_.empty()) << "StBoundary has zero points.";
376 return lower_points_.front();
377}

◆ bottom_right_point()

STPoint apollo::planning::STBoundary::bottom_right_point ( ) const

在文件 st_boundary.cc379 行定义.

379 {
380 DCHECK(!lower_points_.empty()) << "StBoundary has zero points.";
381 return lower_points_.back();
382}

◆ boundary_type()

STBoundary::BoundaryType apollo::planning::STBoundary::boundary_type ( ) const

在文件 st_boundary.cc326 行定义.

326 {
327 return boundary_type_;
328}

◆ characteristic_length()

double apollo::planning::STBoundary::characteristic_length ( ) const

在文件 st_boundary.cc337 行定义.

337 {
338 return characteristic_length_;
339}

◆ CreateInstance()

STBoundary apollo::planning::STBoundary::CreateInstance ( const std::vector< STPoint > &  lower_points,
const std::vector< STPoint > &  upper_points 
)
static

Wrapper of the constructor (old).

在文件 st_boundary.cc72 行定义.

74 {
75 if (lower_points.size() != upper_points.size() || lower_points.size() < 2) {
76 return STBoundary();
77 }
78
79 std::vector<std::pair<STPoint, STPoint>> point_pairs;
80 for (size_t i = 0; i < lower_points.size(); ++i) {
81 point_pairs.emplace_back(
82 STPoint(lower_points.at(i).s(), lower_points.at(i).t()),
83 STPoint(upper_points.at(i).s(), upper_points.at(i).t()));
84 }
85 return STBoundary(point_pairs);
86}
STBoundary()=default
Constructors: STBoundary must be initialized with a vector of ST-point pairs.
std::vector< STPoint > lower_points() const
std::vector< STPoint > upper_points() const

◆ CreateInstanceAccurate()

STBoundary apollo::planning::STBoundary::CreateInstanceAccurate ( const std::vector< STPoint > &  lower_points,
const std::vector< STPoint > &  upper_points 
)
static

Wrapper of the constructor.

It doesn't use RemoveRedundantPoints and generates an accurate ST-boundary.

在文件 st_boundary.cc88 行定义.

90 {
91 if (lower_points.size() != upper_points.size() || lower_points.size() < 2) {
92 return STBoundary();
93 }
94
95 std::vector<std::pair<STPoint, STPoint>> point_pairs;
96 for (size_t i = 0; i < lower_points.size(); ++i) {
97 point_pairs.emplace_back(
98 STPoint(lower_points.at(i).s(), lower_points.at(i).t()),
99 STPoint(upper_points.at(i).s(), upper_points.at(i).t()));
100 }
101 return STBoundary(point_pairs, true);
102}

◆ CutOffByT()

STBoundary apollo::planning::STBoundary::CutOffByT ( const double  t) const

在文件 st_boundary.cc350 行定义.

350 {
351 std::vector<STPoint> lower_points;
352 std::vector<STPoint> upper_points;
353 for (size_t i = 0; i < lower_points_.size() && i < upper_points_.size();
354 ++i) {
355 if (lower_points_[i].t() < t) {
356 continue;
357 }
358 lower_points.push_back(lower_points_[i]);
359 upper_points.push_back(upper_points_[i]);
360 }
362}
static STBoundary CreateInstance(const std::vector< STPoint > &lower_points, const std::vector< STPoint > &upper_points)
Wrapper of the constructor (old).

◆ ExpandByS()

STBoundary apollo::planning::STBoundary::ExpandByS ( const double  s) const

在文件 st_boundary.cc263 行定义.

263 {
264 if (lower_points_.empty()) {
265 return STBoundary();
266 }
267 std::vector<std::pair<STPoint, STPoint>> point_pairs;
268 for (size_t i = 0; i < lower_points_.size(); ++i) {
269 point_pairs.emplace_back(
270 STPoint(lower_points_[i].s() - s, lower_points_[i].t()),
271 STPoint(upper_points_[i].s() + s, upper_points_[i].t()));
272 }
273 return STBoundary(std::move(point_pairs));
274}

◆ ExpandByT()

STBoundary apollo::planning::STBoundary::ExpandByT ( const double  t) const

在文件 st_boundary.cc276 行定义.

276 {
277 if (lower_points_.empty()) {
278 AERROR << "The current st_boundary has NO points.";
279 return STBoundary();
280 }
281
282 std::vector<std::pair<STPoint, STPoint>> point_pairs;
283
284 const double left_delta_t = lower_points_[1].t() - lower_points_[0].t();
285 const double lower_left_delta_s = lower_points_[1].s() - lower_points_[0].s();
286 const double upper_left_delta_s = upper_points_[1].s() - upper_points_[0].s();
287
288 point_pairs.emplace_back(
289 STPoint(lower_points_[0].s() - t * lower_left_delta_s / left_delta_t,
290 lower_points_[0].t() - t),
291 STPoint(upper_points_[0].s() - t * upper_left_delta_s / left_delta_t,
292 upper_points_.front().t() - t));
293
294 const double kMinSEpsilon = 1e-3;
295 point_pairs.front().first.set_s(
296 std::fmin(point_pairs.front().second.s() - kMinSEpsilon,
297 point_pairs.front().first.s()));
298
299 for (size_t i = 0; i < lower_points_.size(); ++i) {
300 point_pairs.emplace_back(lower_points_[i], upper_points_[i]);
301 }
302
303 size_t length = lower_points_.size();
304 DCHECK_GE(length, 2U);
305
306 const double right_delta_t =
307 lower_points_[length - 1].t() - lower_points_[length - 2].t();
308 const double lower_right_delta_s =
309 lower_points_[length - 1].s() - lower_points_[length - 2].s();
310 const double upper_right_delta_s =
311 upper_points_[length - 1].s() - upper_points_[length - 2].s();
312
313 point_pairs.emplace_back(STPoint(lower_points_.back().s() +
314 t * lower_right_delta_s / right_delta_t,
315 lower_points_.back().t() + t),
316 STPoint(upper_points_.back().s() +
317 t * upper_right_delta_s / right_delta_t,
318 upper_points_.back().t() + t));
319 point_pairs.back().second.set_s(
320 std::fmax(point_pairs.back().second.s(),
321 point_pairs.back().first.s() + kMinSEpsilon));
322
323 return STBoundary(std::move(point_pairs));
324}
#define AERROR
Definition log.h:44

◆ GetBoundarySlopes()

bool apollo::planning::STBoundary::GetBoundarySlopes ( const double  curr_time,
double *  ds_upper,
double *  ds_lower 
) const

在文件 st_boundary.cc202 行定义.

203 {
204 if (ds_upper == nullptr || ds_lower == nullptr) {
205 return false;
206 }
207 if (curr_time < min_t_ || curr_time > max_t_) {
208 return false;
209 }
210
211 static constexpr double kTimeIncrement = 0.05;
212 double t_prev = curr_time - kTimeIncrement;
213 double prev_s_upper = 0.0;
214 double prev_s_lower = 0.0;
215 bool has_prev = GetBoundarySRange(t_prev, &prev_s_upper, &prev_s_lower);
216 double t_next = curr_time + kTimeIncrement;
217 double next_s_upper = 0.0;
218 double next_s_lower = 0.0;
219 bool has_next = GetBoundarySRange(t_next, &next_s_upper, &next_s_lower);
220 double curr_s_upper = 0.0;
221 double curr_s_lower = 0.0;
222 GetBoundarySRange(curr_time, &curr_s_upper, &curr_s_lower);
223 if (!has_prev && !has_next) {
224 return false;
225 }
226 if (has_prev && has_next) {
227 *ds_upper = ((next_s_upper - curr_s_upper) / kTimeIncrement +
228 (curr_s_upper - prev_s_upper) / kTimeIncrement) *
229 0.5;
230 *ds_lower = ((next_s_lower - curr_s_lower) / kTimeIncrement +
231 (curr_s_lower - prev_s_lower) / kTimeIncrement) *
232 0.5;
233 return true;
234 }
235 if (has_prev) {
236 *ds_upper = (curr_s_upper - prev_s_upper) / kTimeIncrement;
237 *ds_lower = (curr_s_lower - prev_s_lower) / kTimeIncrement;
238 } else {
239 *ds_upper = (next_s_upper - curr_s_upper) / kTimeIncrement;
240 *ds_lower = (next_s_lower - curr_s_lower) / kTimeIncrement;
241 }
242 return true;
243}
bool GetBoundarySRange(const double curr_time, double *s_upper, double *s_lower) const

◆ GetBoundarySRange()

bool apollo::planning::STBoundary::GetBoundarySRange ( const double  curr_time,
double *  s_upper,
double *  s_lower 
) const

在文件 st_boundary.cc172 行定义.

173 {
174 CHECK_NOTNULL(s_upper);
175 CHECK_NOTNULL(s_lower);
176 if (curr_time < min_t_ || curr_time > max_t_) {
177 return false;
178 }
179
180 size_t left = 0;
181 size_t right = 0;
182 if (!GetIndexRange(lower_points_, curr_time, &left, &right)) {
183 AERROR << "Fail to get index range.";
184 return false;
185 }
186 const double r =
187 (left == right
188 ? 0.0
189 : (curr_time - upper_points_[left].t()) /
190 (upper_points_[right].t() - upper_points_[left].t()));
191
192 *s_upper = upper_points_[left].s() +
193 r * (upper_points_[right].s() - upper_points_[left].s());
194 *s_lower = lower_points_[left].s() +
195 r * (lower_points_[right].s() - lower_points_[left].s());
196
197 *s_upper = std::fmin(*s_upper, FLAGS_speed_lon_decision_horizon);
198 *s_lower = std::fmax(*s_lower, 0.0);
199 return true;
200}

◆ GetUnblockSRange()

bool apollo::planning::STBoundary::GetUnblockSRange ( const double  curr_time,
double *  s_upper,
double *  s_lower 
) const

在文件 st_boundary.cc123 行定义.

124 {
125 CHECK_NOTNULL(s_upper);
126 CHECK_NOTNULL(s_lower);
127
128 *s_upper = FLAGS_speed_lon_decision_horizon;
129 *s_lower = 0.0;
130 if (curr_time < min_t_ || curr_time > max_t_) {
131 return true;
132 }
133
134 size_t left = 0;
135 size_t right = 0;
136 if (!GetIndexRange(lower_points_, curr_time, &left, &right)) {
137 AERROR << "Fail to get index range.";
138 return false;
139 }
140
141 if (curr_time > upper_points_[right].t()) {
142 return true;
143 }
144
145 const double r =
146 (left == right
147 ? 0.0
148 : (curr_time - upper_points_[left].t()) /
149 (upper_points_[right].t() - upper_points_[left].t()));
150
151 double upper_cross_s =
152 upper_points_[left].s() +
153 r * (upper_points_[right].s() - upper_points_[left].s());
154 double lower_cross_s =
155 lower_points_[left].s() +
156 r * (lower_points_[right].s() - lower_points_[left].s());
157
158 if (boundary_type_ == BoundaryType::STOP ||
159 boundary_type_ == BoundaryType::YIELD ||
160 boundary_type_ == BoundaryType::FOLLOW) {
161 *s_upper = lower_cross_s;
162 } else if (boundary_type_ == BoundaryType::OVERTAKE) {
163 *s_lower = std::fmax(*s_lower, upper_cross_s);
164 } else {
165 ADEBUG << "boundary_type is not supported. boundary_type: "
166 << static_cast<int>(boundary_type_);
167 return false;
168 }
169 return true;
170}
#define ADEBUG
Definition log.h:41

◆ id()

const std::string & apollo::planning::STBoundary::id ( ) const

在文件 st_boundary.cc333 行定义.

333{ return id_; }

◆ IsEmpty()

bool apollo::planning::STBoundary::IsEmpty ( ) const
inline

在文件 st_boundary.h69 行定义.

69{ return lower_points_.empty(); }

◆ IsPointInBoundary()

bool apollo::planning::STBoundary::IsPointInBoundary ( const STPoint st_point) const

在文件 st_boundary.cc245 行定义.

245 {
246 if (st_point.t() <= min_t_ || st_point.t() >= max_t_) {
247 return false;
248 }
249 size_t left = 0;
250 size_t right = 0;
251 if (!GetIndexRange(lower_points_, st_point.t(), &left, &right)) {
252 AERROR << "failed to get index range.";
253 return false;
254 }
255 const double check_upper = common::math::CrossProd(
256 st_point, upper_points_[left], upper_points_[right]);
257 const double check_lower = common::math::CrossProd(
258 st_point, lower_points_[left], lower_points_[right]);
259
260 return (check_upper * check_lower < 0);
261}
double CrossProd(const Vec2d &start_point, const Vec2d &end_point_1, const Vec2d &end_point_2)
Cross product between two 2-D vectors from the common start point, and end at two other points.
Definition math_utils.cc:28

◆ lower_points()

std::vector< STPoint > apollo::planning::STBoundary::lower_points ( ) const
inline

在文件 st_boundary.h107 行定义.

107{ return lower_points_; }

◆ max_s()

double apollo::planning::STBoundary::max_s ( ) const

在文件 st_boundary.cc347 行定义.

347{ return max_s_; }

◆ max_t()

double apollo::planning::STBoundary::max_t ( ) const

在文件 st_boundary.cc348 行定义.

348{ return max_t_; }

◆ min_s()

double apollo::planning::STBoundary::min_s ( ) const

在文件 st_boundary.cc345 行定义.

345{ return min_s_; }

◆ min_t()

double apollo::planning::STBoundary::min_t ( ) const

在文件 st_boundary.cc346 行定义.

346{ return min_t_; }

◆ obstacle_road_right_ending_t()

double apollo::planning::STBoundary::obstacle_road_right_ending_t ( ) const
inline

在文件 st_boundary.h131 行定义.

131 {
132 return obstacle_road_right_ending_t_;
133 }

◆ PrintDebug()

void apollo::planning::STBoundary::PrintDebug ( std::string  suffix = "") const

在文件 st_boundary.cc497 行定义.

497 {
498 std::string type_name = TypeName(boundary_type_);
499 std::string key_name = type_name + id_ + suffix;
500 PrintPoints debug(key_name);
501 if (lower_points_.empty() || upper_points_.empty()) {
502 return;
503 }
504 for (auto pt : lower_points_) {
505 debug.AddPoint(pt.t(), pt.s());
506 }
507 for (auto iter = upper_points_.rbegin(); iter != upper_points_.rend();
508 iter++) {
509 debug.AddPoint(iter->t(), iter->s());
510 }
511 debug.AddPoint(lower_points_.front().t(), lower_points_.front().s());
512 debug.PrintToLog();
513}
static std::string TypeName(BoundaryType type)

◆ set_bottom_left_point()

void apollo::planning::STBoundary::set_bottom_left_point ( STPoint  st_point)

在文件 st_boundary.cc392 行定义.

392 {
393 bottom_left_point_ = std::move(st_point);
394}

◆ set_bottom_right_point()

void apollo::planning::STBoundary::set_bottom_right_point ( STPoint  st_point)

在文件 st_boundary.cc396 行定义.

396 {
397 bottom_right_point_ = std::move(st_point);
398}

◆ set_id()

void apollo::planning::STBoundary::set_id ( const std::string &  id)

在文件 st_boundary.cc335 行定义.

335{ id_ = id; }
const std::string & id() const

◆ set_obstacle_road_right_ending_t()

void apollo::planning::STBoundary::set_obstacle_road_right_ending_t ( double  road_right_ending_t)
inline

在文件 st_boundary.h128 行定义.

128 {
129 obstacle_road_right_ending_t_ = road_right_ending_t;
130 }

◆ set_upper_left_point()

void apollo::planning::STBoundary::set_upper_left_point ( STPoint  st_point)

在文件 st_boundary.cc384 行定义.

384 {
385 upper_left_point_ = std::move(st_point);
386}

◆ set_upper_right_point()

void apollo::planning::STBoundary::set_upper_right_point ( STPoint  st_point)

在文件 st_boundary.cc388 行定义.

388 {
389 upper_right_point_ = std::move(st_point);
390}

◆ SetBoundaryType()

void apollo::planning::STBoundary::SetBoundaryType ( const BoundaryType boundary_type)

在文件 st_boundary.cc329 行定义.

329 {
330 boundary_type_ = boundary_type;
331}
BoundaryType boundary_type() const

◆ SetCharacteristicLength()

void apollo::planning::STBoundary::SetCharacteristicLength ( const double  characteristic_length)

在文件 st_boundary.cc341 行定义.

341 {
342 characteristic_length_ = characteristic_length;
343}
double characteristic_length() const

◆ TypeName()

std::string apollo::planning::STBoundary::TypeName ( BoundaryType  type)
static

在文件 st_boundary.cc104 行定义.

104 {
105 if (type == BoundaryType::FOLLOW) {
106 return "FOLLOW";
107 } else if (type == BoundaryType::KEEP_CLEAR) {
108 return "KEEP_CLEAR";
109 } else if (type == BoundaryType::OVERTAKE) {
110 return "OVERTAKE";
111 } else if (type == BoundaryType::STOP) {
112 return "STOP";
113 } else if (type == BoundaryType::YIELD) {
114 return "YIELD";
115 } else if (type == BoundaryType::UNKNOWN) {
116 return "UNKNOWN";
117 }
118 AWARN << "Unknown boundary type " << static_cast<int>(type)
119 << ", treated as UNKNOWN";
120 return "UNKNOWN";
121}
#define AWARN
Definition log.h:43

◆ upper_left_point()

STPoint apollo::planning::STBoundary::upper_left_point ( ) const

在文件 st_boundary.cc364 行定义.

364 {
365 DCHECK(!upper_points_.empty()) << "StBoundary has zero points.";
366 return upper_points_.front();
367}

◆ upper_points()

std::vector< STPoint > apollo::planning::STBoundary::upper_points ( ) const
inline

在文件 st_boundary.h106 行定义.

106{ return upper_points_; }

◆ upper_right_point()

STPoint apollo::planning::STBoundary::upper_right_point ( ) const

在文件 st_boundary.cc369 行定义.

369 {
370 DCHECK(!upper_points_.empty()) << "StBoundary has zero points.";
371 return upper_points_.back();
372}

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