Apollo 10.0
自动驾驶开放平台
apollo::hdmap::RouteSegments类 参考

class RouteSegments 更多...

#include <route_segments.h>

类 apollo::hdmap::RouteSegments 继承关系图:
apollo::hdmap::RouteSegments 的协作图:

Public 成员函数

 RouteSegments ()=default
 The default constructor.
 
routing::ChangeLaneType NextAction () const
 Get the next change lane action need to take by the vehicle, if the vehicle is on this RouteSegments.
 
void SetNextAction (routing::ChangeLaneType action)
 
routing::ChangeLaneType PreviousAction () const
 Get the previous change lane action need to take by the vehicle to reach current segment, if the vehicle is not on this RouteSegments.
 
void SetPreviousAction (routing::ChangeLaneType action)
 
bool CanExit () const
 Whether the passage region that generate this route segment can lead to another passage region in route.
 
void SetCanExit (bool can_exit)
 
bool GetProjection (const common::PointENU &point_enu, common::SLPoint *sl_point, LaneWaypoint *waypoint) const
 Project a point to this route segment.
 
bool GetProjection (const common::math::Vec2d &point, common::SLPoint *sl_point, LaneWaypoint *waypoint) const
 
bool GetProjection (const common::math::Vec2d &point, const double heading, common::SLPoint *sl_point, LaneWaypoint *waypoint) const
 
bool GetWaypoint (const double s, LaneWaypoint *waypoint) const
 
bool CanDriveFrom (const LaneWaypoint &waypoint) const
 Check whether the map allows a vehicle can reach current RouteSegment from a point on a lane (LaneWaypoint).
 
const LaneWaypointRouteEndWaypoint () const
 
void SetRouteEndWaypoint (const LaneWaypoint &waypoint)
 
bool Stitch (const RouteSegments &other)
 Stitch current route segments with the other route segment.
 
bool Shrink (const common::math::Vec2d &point, const double look_backward, const double look_forward)
 
bool Shrink (const double s, const double look_backward, const double look_forward)
 
bool Shrink (const double s, const LaneWaypoint &waypoint, const double look_backward, const double look_forward)
 
bool IsOnSegment () const
 
void SetIsOnSegment (bool on_segment)
 
bool IsNeighborSegment () const
 
void SetIsNeighborSegment (bool is_neighbor)
 
void SetId (const std::string &id)
 
const std::string & Id () const
 
LaneWaypoint FirstWaypoint () const
 Get the first waypoint from the lane segments.
 
LaneWaypoint LastWaypoint () const
 Get the last waypoint from the lane segments.
 
bool IsWaypointOnSegment (const LaneWaypoint &waypoint) const
 Check if a waypoint is on segment
 
bool IsConnectedSegment (const RouteSegments &other) const
 Check if we can reach the other segment from current segment just by following lane.
 
bool StopForDestination () const
 
void SetStopForDestination (bool stop_for_destination)
 
void SetProperties (const RouteSegments &other)
 Copy the properties of other segments to current one
 
std::string DebugString ()
 

静态 Public 成员函数

static bool WithinLaneSegment (const LaneSegment &lane_segment, const LaneWaypoint &waypoint)
 
static bool WithinLaneSegment (const LaneSegment &lane_segment, const routing::LaneWaypoint &waypoint)
 
static bool WithinLaneSegment (const routing::LaneSegment &lane_segment, const LaneWaypoint &waypoint)
 
static bool WithinLaneSegment (const routing::LaneSegment &lane_segment, const routing::LaneWaypoint &waypoint)
 
static double Length (const RouteSegments &segments)
 

详细描述

class RouteSegments

This class is a representation of the Passage type in routing.proto. It is extended from a passage region, but keeps some properties of the passage, such as the last end LaneWaypoint of the original passage region (route_end_waypoint), whether the passage can lead to another passage in routing (can_exit_). This class contains the original data that can be used to generate hdmap::Path.

在文件 route_segments.h48 行定义.

构造及析构函数说明

◆ RouteSegments()

apollo::hdmap::RouteSegments::RouteSegments ( )
default

The default constructor.

成员函数说明

◆ CanDriveFrom()

bool apollo::hdmap::RouteSegments::CanDriveFrom ( const LaneWaypoint waypoint) const

Check whether the map allows a vehicle can reach current RouteSegment from a point on a lane (LaneWaypoint).

参数
waypointthe start waypoint
返回
true if the map allows a vehicle to drive from waypoint to current RouteSegment. Otherwise false.

在文件 route_segments.cc358 行定义.

358 {
359 auto point = waypoint.lane->GetSmoothPoint(waypoint.s);
360
361 // 0 if waypoint is on segment, ok
362 if (IsWaypointOnSegment(waypoint)) {
363 return true;
364 }
365
366 // 1. should have valid projection.
367 LaneWaypoint segment_waypoint;
368 common::SLPoint route_sl;
369 bool has_projection = GetProjection(point, &route_sl, &segment_waypoint);
370 if (!has_projection) {
371 AERROR << "No projection from waypoint: " << waypoint.DebugString();
372 return false;
373 }
374 static constexpr double kMaxLaneWidth = 10.0;
375 if (std::fabs(route_sl.l()) > 2 * kMaxLaneWidth) {
376 return false;
377 }
378
379 // 2. heading should be the same.
380 double waypoint_heading = waypoint.lane->Heading(waypoint.s);
381 double segment_heading = segment_waypoint.lane->Heading(segment_waypoint.s);
382 double heading_diff =
383 common::math::AngleDiff(waypoint_heading, segment_heading);
384 if (std::fabs(heading_diff) > M_PI / 2) {
385 ADEBUG << "Angle diff too large:" << heading_diff;
386 return false;
387 }
388
389 // 3. the waypoint and the projected lane should not be separated apart.
390 double waypoint_left_width = 0.0;
391 double waypoint_right_width = 0.0;
392 waypoint.lane->GetWidth(waypoint.s, &waypoint_left_width,
393 &waypoint_right_width);
394 double segment_left_width = 0.0;
395 double segment_right_width = 0.0;
396 segment_waypoint.lane->GetWidth(segment_waypoint.s, &segment_left_width,
397 &segment_right_width);
398 auto segment_projected_point =
399 segment_waypoint.lane->GetSmoothPoint(segment_waypoint.s);
400 double dist = common::util::DistanceXY(point, segment_projected_point);
401 const double kLaneSeparationDistance = 0.3;
402 if (route_sl.l() < 0) { // waypoint at right side
403 if (dist >
404 waypoint_left_width + segment_right_width + kLaneSeparationDistance) {
405 AERROR << "waypoint is too far to reach: " << dist;
406 return false;
407 }
408 } else { // waypoint at left side
409 if (dist >
410 waypoint_right_width + segment_left_width + kLaneSeparationDistance) {
411 AERROR << "waypoint is too far to reach: " << dist;
412 return false;
413 }
414 }
415
416 return true;
417}
bool IsWaypointOnSegment(const LaneWaypoint &waypoint) const
Check if a waypoint is on segment
bool GetProjection(const common::PointENU &point_enu, common::SLPoint *sl_point, LaneWaypoint *waypoint) const
Project a point to this route segment.
#define ADEBUG
Definition log.h:41
#define AERROR
Definition log.h:44
double AngleDiff(const double from, const double to)
Calculate the difference between angle from and to
Definition math_utils.cc:61
double DistanceXY(const U &u, const V &v)
calculate the distance beteween Point u and Point v, which are all have member function x() and y() i...
Definition util.h:97

◆ CanExit()

bool apollo::hdmap::RouteSegments::CanExit ( ) const

Whether the passage region that generate this route segment can lead to another passage region in route.

在文件 route_segments.cc41 行定义.

41{ return can_exit_; }

◆ DebugString()

std::string apollo::hdmap::RouteSegments::DebugString ( )
inline

在文件 route_segments.h204 行定义.

204 {
205 std::stringstream ss;
206 for (auto iter = begin(); iter != end(); ++iter) {
207 ss << iter->DebugString() << ";";
208 }
209 return ss.str();
210 }

◆ FirstWaypoint()

LaneWaypoint apollo::hdmap::RouteSegments::FirstWaypoint ( ) const

Get the first waypoint from the lane segments.

在文件 route_segments.cc125 行定义.

125 {
126 return LaneWaypoint(front().lane, front().start_s, 0.0);
127}

◆ GetProjection() [1/3]

bool apollo::hdmap::RouteSegments::GetProjection ( const common::math::Vec2d point,
common::SLPoint sl_point,
LaneWaypoint waypoint 
) const

在文件 route_segments.cc266 行定义.

268 {
269 double min_l = std::numeric_limits<double>::infinity();
270 double accumulated_s = 0.0;
271 bool has_projection = false;
272 for (auto iter = begin(); iter != end();
273 accumulated_s += (iter->end_s - iter->start_s), ++iter) {
274 double lane_s = 0.0;
275 double lane_l = 0.0;
276 if (!iter->lane->GetProjection(point, &lane_s, &lane_l)) {
277 AERROR << "Failed to get projection from point " << point.DebugString()
278 << " on lane " << iter->lane->id().id();
279 return false;
280 }
281 if (lane_s < iter->start_s - kSegmentationEpsilon ||
282 lane_s > iter->end_s + kSegmentationEpsilon) {
283 continue;
284 }
285 if (std::fabs(lane_l) < min_l) {
286 has_projection = true;
287 lane_s = std::max(iter->start_s, lane_s);
288 lane_s = std::min(iter->end_s, lane_s);
289 min_l = std::fabs(lane_l);
290 sl_point->set_l(lane_l);
291 sl_point->set_s(lane_s - iter->start_s + accumulated_s);
292 waypoint->lane = iter->lane;
293 waypoint->s = lane_s;
294 }
295 }
296 return has_projection;
297}

◆ GetProjection() [2/3]

bool apollo::hdmap::RouteSegments::GetProjection ( const common::math::Vec2d point,
const double  heading,
common::SLPoint sl_point,
LaneWaypoint waypoint 
) const

在文件 route_segments.cc299 行定义.

302 {
303 double min_l = std::numeric_limits<double>::infinity();
304 double accumulated_s = 0.0;
305 bool has_projection = false;
306 for (auto iter = begin(); iter != end();
307 accumulated_s += (iter->end_s - iter->start_s), ++iter) {
308 double lane_s = 0.0;
309 double lane_l = 0.0;
310 if (!iter->lane->GetProjection(point, heading, &lane_s, &lane_l)) {
311 AERROR << "Failed to get projection from point " << point.DebugString()
312 << " on lane " << iter->lane->id().id();
313 return false;
314 }
315 if (lane_s < iter->start_s - kSegmentationEpsilon ||
316 lane_s > iter->end_s + kSegmentationEpsilon) {
317 continue;
318 }
319 if (std::fabs(lane_l) < min_l) {
320 has_projection = true;
321 lane_s = std::max(iter->start_s, lane_s);
322 lane_s = std::min(iter->end_s, lane_s);
323 min_l = std::fabs(lane_l);
324 sl_point->set_l(lane_l);
325 sl_point->set_s(lane_s - iter->start_s + accumulated_s);
326 waypoint->lane = iter->lane;
327 waypoint->s = lane_s;
328 }
329 }
330 return has_projection;
331}

◆ GetProjection() [3/3]

bool apollo::hdmap::RouteSegments::GetProjection ( const common::PointENU point_enu,
common::SLPoint sl_point,
LaneWaypoint waypoint 
) const

Project a point to this route segment.

参数
point_enua map point, or point, which is a Vec2d point
sreturn the longitudinal s relative to the route segment.
lreturn the lateral distance relative to the route segment.
waypointreturn the LaneWaypoint, which has lane and lane_s on the route segment.
返回
false if error happened or projected outside of the lane segments.

在文件 route_segments.cc151 行定义.

153 {
154 return GetProjection({point_enu.x(), point_enu.y()}, sl_point, waypoint);
155}

◆ GetWaypoint()

bool apollo::hdmap::RouteSegments::GetWaypoint ( const double  s,
LaneWaypoint waypoint 
) const

在文件 route_segments.cc244 行定义.

244 {
245 double accumulated_s = 0.0;
246 bool has_projection = false;
247 for (auto iter = begin(); iter != end();
248 accumulated_s += (iter->end_s - iter->start_s), ++iter) {
249 if (accumulated_s - kSegmentationEpsilon < s &&
250 s < accumulated_s + iter->end_s - iter->start_s +
251 kSegmentationEpsilon) {
252 waypoint->lane = iter->lane;
253 waypoint->s = s - accumulated_s + iter->start_s;
254 if (waypoint->s < iter->start_s) {
255 waypoint->s = iter->start_s;
256 } else if (waypoint->s > iter->end_s) {
257 waypoint->s = iter->end_s;
258 }
259 has_projection = true;
260 break;
261 }
262 }
263 return has_projection;
264}

◆ Id()

const std::string & apollo::hdmap::RouteSegments::Id ( ) const

在文件 route_segments.cc35 行定义.

35{ return id_; }

◆ IsConnectedSegment()

bool apollo::hdmap::RouteSegments::IsConnectedSegment ( const RouteSegments other) const

Check if we can reach the other segment from current segment just by following lane.

参数
otherAnother route segment

在文件 route_segments.cc157 行定义.

157 {
158 if (empty() || other.empty()) {
159 return false;
160 }
161 if (IsWaypointOnSegment(other.FirstWaypoint())) {
162 return true;
163 }
164 if (IsWaypointOnSegment(other.LastWaypoint())) {
165 return true;
166 }
167 if (other.IsWaypointOnSegment(FirstWaypoint())) {
168 return true;
169 }
170 if (other.IsWaypointOnSegment(LastWaypoint())) {
171 return true;
172 }
173 return false;
174}
LaneWaypoint LastWaypoint() const
Get the last waypoint from the lane segments.
LaneWaypoint FirstWaypoint() const
Get the first waypoint from the lane segments.

◆ IsNeighborSegment()

bool apollo::hdmap::RouteSegments::IsNeighborSegment ( ) const

在文件 route_segments.cc115 行定义.

115{ return is_neighbor_; }

◆ IsOnSegment()

bool apollo::hdmap::RouteSegments::IsOnSegment ( ) const

在文件 route_segments.cc109 行定义.

109{ return is_on_segment_; }

◆ IsWaypointOnSegment()

bool apollo::hdmap::RouteSegments::IsWaypointOnSegment ( const LaneWaypoint waypoint) const

Check if a waypoint is on segment

在文件 route_segments.cc349 行定义.

349 {
350 for (auto iter = begin(); iter != end(); ++iter) {
351 if (WithinLaneSegment(*iter, waypoint)) {
352 return true;
353 }
354 }
355 return false;
356}
static bool WithinLaneSegment(const LaneSegment &lane_segment, const LaneWaypoint &waypoint)

◆ LastWaypoint()

LaneWaypoint apollo::hdmap::RouteSegments::LastWaypoint ( ) const

Get the last waypoint from the lane segments.

在文件 route_segments.cc129 行定义.

129 {
130 return LaneWaypoint(back().lane, back().end_s, 0.0);
131}

◆ Length()

double apollo::hdmap::RouteSegments::Length ( const RouteSegments segments)
static

在文件 route_segments.cc143 行定义.

143 {
144 double s = 0.0;
145 for (const auto &seg : segments) {
146 s += seg.Length();
147 }
148 return s;
149}

◆ NextAction()

routing::ChangeLaneType apollo::hdmap::RouteSegments::NextAction ( ) const

Get the next change lane action need to take by the vehicle, if the vehicle is on this RouteSegments.

— If the vehicle does not need to change lane, then change_lane_type == routing::FORWARD; — If the vehicle need to change to left lane according to routing, then change_lane_type_ == routing::LEFT; — If the vehicle need to change to right lane according to routing, then change_lane_type_ == routing::RIGHT;

在文件 route_segments.cc345 行定义.

345 {
346 return next_action_;
347}

◆ PreviousAction()

routing::ChangeLaneType apollo::hdmap::RouteSegments::PreviousAction ( ) const

Get the previous change lane action need to take by the vehicle to reach current segment, if the vehicle is not on this RouteSegments.

If the vehicle is already on this segment, or does not need to change lane to reach this segment, then change_lane_type = routing::FORWARD; If the vehicle need to change to left to reach this segment, then change_lane_type_ = routing::LEFT; If the vehicle need to change to right to reach this segment, then change_lane_type_ = routing::RIGHT;

在文件 route_segments.cc337 行定义.

337 {
338 return previous_action_;
339}

◆ RouteEndWaypoint()

const LaneWaypoint & apollo::hdmap::RouteSegments::RouteEndWaypoint ( ) const

在文件 route_segments.cc105 行定义.

105 {
106 return route_end_waypoint_;
107}

◆ SetCanExit()

void apollo::hdmap::RouteSegments::SetCanExit ( bool  can_exit)

在文件 route_segments.cc39 行定义.

39{ can_exit_ = can_exit; }

◆ SetId()

void apollo::hdmap::RouteSegments::SetId ( const std::string &  id)

在文件 route_segments.cc37 行定义.

37{ id_ = id; }

◆ SetIsNeighborSegment()

void apollo::hdmap::RouteSegments::SetIsNeighborSegment ( bool  is_neighbor)

在文件 route_segments.cc117 行定义.

117 {
118 is_neighbor_ = is_neighbor;
119}

◆ SetIsOnSegment()

void apollo::hdmap::RouteSegments::SetIsOnSegment ( bool  on_segment)

在文件 route_segments.cc111 行定义.

111 {
112 is_on_segment_ = on_segment;
113}

◆ SetNextAction()

void apollo::hdmap::RouteSegments::SetNextAction ( routing::ChangeLaneType  action)

在文件 route_segments.cc341 行定义.

341 {
342 next_action_ = action;
343}

◆ SetPreviousAction()

void apollo::hdmap::RouteSegments::SetPreviousAction ( routing::ChangeLaneType  action)

在文件 route_segments.cc333 行定义.

333 {
334 previous_action_ = action;
335}

◆ SetProperties()

void apollo::hdmap::RouteSegments::SetProperties ( const RouteSegments other)

Copy the properties of other segments to current one

在文件 route_segments.cc133 行定义.

133 {
134 route_end_waypoint_ = other.RouteEndWaypoint();
135 can_exit_ = other.CanExit();
136 is_on_segment_ = other.IsOnSegment();
137 next_action_ = other.NextAction();
138 previous_action_ = other.PreviousAction();
139 id_ = other.Id();
140 stop_for_destination_ = other.StopForDestination();
141}

◆ SetRouteEndWaypoint()

void apollo::hdmap::RouteSegments::SetRouteEndWaypoint ( const LaneWaypoint waypoint)

在文件 route_segments.cc121 行定义.

121 {
122 route_end_waypoint_ = waypoint;
123}

◆ SetStopForDestination()

void apollo::hdmap::RouteSegments::SetStopForDestination ( bool  stop_for_destination)

在文件 route_segments.cc45 行定义.

45 {
46 stop_for_destination_ = stop_for_destination;
47}

◆ Shrink() [1/3]

bool apollo::hdmap::RouteSegments::Shrink ( const common::math::Vec2d point,
const double  look_backward,
const double  look_forward 
)

在文件 route_segments.cc176 行定义.

178 {
179 common::SLPoint sl_point;
180 LaneWaypoint waypoint;
181 if (!GetProjection(point, &sl_point, &waypoint)) {
182 AERROR << "failed to project " << point.DebugString() << " to segment";
183 return false;
184 }
185 return Shrink(sl_point.s(), look_backward, look_forward);
186}
bool Shrink(const common::math::Vec2d &point, const double look_backward, const double look_forward)

◆ Shrink() [2/3]

bool apollo::hdmap::RouteSegments::Shrink ( const double  s,
const double  look_backward,
const double  look_forward 
)

在文件 route_segments.cc188 行定义.

189 {
190 LaneWaypoint waypoint;
191 if (!GetWaypoint(s, &waypoint)) {
192 return false;
193 }
194 return Shrink(s, waypoint, look_backward, look_forward);
195}
bool GetWaypoint(const double s, LaneWaypoint *waypoint) const

◆ Shrink() [3/3]

bool apollo::hdmap::RouteSegments::Shrink ( const double  s,
const LaneWaypoint waypoint,
const double  look_backward,
const double  look_forward 
)

在文件 route_segments.cc197 行定义.

199 {
200 double acc_s = 0.0;
201 auto iter = begin();
202 while (iter != end() && acc_s + iter->Length() < s - look_backward) {
203 acc_s += iter->Length();
204 ++iter;
205 }
206 if (iter == end()) {
207 return true;
208 }
209 iter->start_s =
210 std::max(iter->start_s, s - look_backward - acc_s + iter->start_s);
211 if (iter->Length() < kSegmentationEpsilon) {
212 ++iter;
213 }
214 erase(begin(), iter);
215
216 iter = begin();
217 acc_s = 0.0;
218 while (iter != end() && !WithinLaneSegment(*iter, waypoint)) {
219 ++iter;
220 }
221 if (iter == end()) {
222 return true;
223 }
224 acc_s = iter->end_s - waypoint.s;
225 if (acc_s >= look_forward) {
226 iter->end_s = waypoint.s + look_forward;
227 ++iter;
228 erase(iter, end());
229 return true;
230 }
231 ++iter;
232 while (iter != end() && acc_s + iter->Length() < look_forward) {
233 acc_s += iter->Length();
234 ++iter;
235 }
236 if (iter == end()) {
237 return true;
238 }
239 iter->end_s = std::min(iter->end_s, look_forward - acc_s + iter->start_s);
240 erase(iter + 1, end());
241 return true;
242}

◆ Stitch()

bool apollo::hdmap::RouteSegments::Stitch ( const RouteSegments other)

Stitch current route segments with the other route segment.

Example 1 this: |-----—A--—x--—B---—| other: |--—B---—x-----—C----—| Result: |-----—A--—x--—B---—x-----—C----—| In the above example, A-B is current route segments, and B-C is the other route segments. We update current route segments to A-B-C.

Example 2 this: |--—A---—x-----—B----—| other: |-----—C--—x--—A---—| Result: |-----—C--—x--—A---—x-----—B----—| In the above example, A-B is current route segments, and C-A is the other route segments. We update current route segments to C-A-B

返回
false if these two reference line cannot be stitched

在文件 route_segments.cc78 行定义.

78 {
79 auto first_waypoint = FirstWaypoint();
80 bool has_overlap = IsWaypointOnSegment(other.FirstWaypoint());
81 if (other.IsWaypointOnSegment(first_waypoint)) {
82 auto iter = other.begin();
83 while (iter != other.end() && !WithinLaneSegment(*iter, first_waypoint)) {
84 ++iter;
85 }
86 begin()->start_s = std::min(begin()->start_s, iter->start_s);
87 begin()->end_s = std::max(begin()->end_s, iter->end_s);
88 insert(begin(), other.begin(), iter);
89 has_overlap = true;
90 }
91 auto last_waypoint = LastWaypoint();
92 if (other.IsWaypointOnSegment(last_waypoint)) {
93 auto iter = other.rbegin();
94 while (iter != other.rend() && !WithinLaneSegment(*iter, last_waypoint)) {
95 ++iter;
96 }
97 back().start_s = std::min(back().start_s, iter->start_s);
98 back().end_s = std::max(back().end_s, iter->end_s);
99 insert(end(), iter.base(), other.end());
100 has_overlap = true;
101 }
102 return has_overlap;
103}

◆ StopForDestination()

bool apollo::hdmap::RouteSegments::StopForDestination ( ) const

在文件 route_segments.cc43 行定义.

43{ return stop_for_destination_; }

◆ WithinLaneSegment() [1/4]

bool apollo::hdmap::RouteSegments::WithinLaneSegment ( const LaneSegment lane_segment,
const LaneWaypoint waypoint 
)
static

在文件 route_segments.cc49 行定义.

50 {
51 return waypoint.lane &&
52 lane_segment.lane->id().id() == waypoint.lane->id().id() &&
53 lane_segment.start_s - kSegmentationEpsilon <= waypoint.s &&
54 lane_segment.end_s + kSegmentationEpsilon >= waypoint.s;
55}

◆ WithinLaneSegment() [2/4]

bool apollo::hdmap::RouteSegments::WithinLaneSegment ( const LaneSegment lane_segment,
const routing::LaneWaypoint waypoint 
)
static

在文件 route_segments.cc57 行定义.

58 {
59 return lane_segment.lane && lane_segment.lane->id().id() == waypoint.id() &&
60 lane_segment.start_s - kSegmentationEpsilon <= waypoint.s() &&
61 lane_segment.end_s + kSegmentationEpsilon >= waypoint.s();
62}

◆ WithinLaneSegment() [3/4]

bool apollo::hdmap::RouteSegments::WithinLaneSegment ( const routing::LaneSegment lane_segment,
const LaneWaypoint waypoint 
)
static

在文件 route_segments.cc64 行定义.

65 {
66 return waypoint.lane && lane_segment.id() == waypoint.lane->id().id() &&
67 lane_segment.start_s() - kSegmentationEpsilon <= waypoint.s &&
68 lane_segment.end_s() + kSegmentationEpsilon >= waypoint.s;
69}

◆ WithinLaneSegment() [4/4]

bool apollo::hdmap::RouteSegments::WithinLaneSegment ( const routing::LaneSegment lane_segment,
const routing::LaneWaypoint waypoint 
)
static

在文件 route_segments.cc71 行定义.

72 {
73 return lane_segment.id() == waypoint.id() &&
74 lane_segment.start_s() - kSegmentationEpsilon <= waypoint.s() &&
75 lane_segment.end_s() + kSegmentationEpsilon >= waypoint.s();
76}

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