Apollo 10.0
自动驾驶开放平台
map_service.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2017 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
18
19#include <algorithm>
20#include <fstream>
21#include <utility>
22
26
27namespace apollo {
28namespace dreamview {
29
50using google::protobuf::RepeatedPtrField;
51
52namespace {
53
54template <typename MapElementInfoConstPtr>
55void ExtractIds(const std::vector<MapElementInfoConstPtr> &items,
56 RepeatedPtrField<std::string> *ids) {
57 ids->Reserve(static_cast<unsigned int>(items.size()));
58 for (const auto &item : items) {
59 ids->Add()->assign(item->id().id());
60 }
61 // The output is sorted so that the calculated hash will be
62 // invariant to the order of elements.
63 std::sort(ids->begin(), ids->end());
64}
65
66void ExtractRoadAndLaneIds(const std::vector<LaneInfoConstPtr> &lanes,
67 RepeatedPtrField<std::string> *lane_ids,
68 RepeatedPtrField<std::string> *road_ids) {
69 lane_ids->Reserve(static_cast<unsigned int>(lanes.size()));
70 road_ids->Reserve(static_cast<unsigned int>(lanes.size()));
71
72 for (const auto &lane : lanes) {
73 lane_ids->Add()->assign(lane->id().id());
74 if (!lane->road_id().id().empty()) {
75 road_ids->Add()->assign(lane->road_id().id());
76 }
77 }
78 // The output is sorted so that the calculated hash will be
79 // invariant to the order of elements.
80 std::sort(lane_ids->begin(), lane_ids->end());
81 std::sort(road_ids->begin(), road_ids->end());
82}
83
84} // namespace
85
86const char MapService::kMetaFileName[] = "/metaInfo.json";
87
88MapService::MapService(bool use_sim_map) : use_sim_map_(use_sim_map) {
89 ReloadMap(false);
90}
91
92bool MapService::ReloadMap(bool force_reload) {
93 boost::unique_lock<boost::shared_mutex> writer_lock(mutex_);
94 bool ret = true;
95 if (force_reload) {
97 }
98
99 // Update the x,y-offsets if present.
100 // UpdateOffsets();
101 return ret;
102}
103
104void MapService::UpdateOffsets() {
105 x_offset_ = 0.0;
106 y_offset_ = 0.0;
107 std::ifstream ifs(FLAGS_map_dir + kMetaFileName);
108 if (!ifs.is_open()) {
109 AINFO << "Failed to open map meta file: " << kMetaFileName;
110 } else {
111 nlohmann::json json;
112 ifs >> json;
113 ifs.close();
114
115 for (auto it = json.begin(); it != json.end(); ++it) {
116 auto val = it.value();
117 if (val.is_object()) {
118 auto x_offset = val.find("xoffset");
119 if (x_offset == val.end()) {
120 AWARN << "Cannot find x_offset for this map " << it.key();
121 continue;
122 }
123
124 if (!x_offset->is_number()) {
125 AWARN << "Expect x_offset with type 'number', but was "
126 << x_offset->type_name();
127 continue;
128 }
129 x_offset_ = x_offset.value();
130
131 auto y_offset = val.find("yoffset");
132 if (y_offset == val.end()) {
133 AWARN << "Cannot find y_offset for this map " << it.key();
134 continue;
135 }
136
137 if (!y_offset->is_number()) {
138 AWARN << "Expect y_offset with type 'number', but was "
139 << y_offset->type_name();
140 continue;
141 }
142 y_offset_ = y_offset.value();
143 }
144 }
145 }
146 AINFO << "Updated with map: x_offset " << x_offset_ << ", y_offset "
147 << y_offset_;
148}
149
150const hdmap::HDMap *MapService::HDMap() const {
151 return HDMapUtil::BaseMapPtr();
152}
153
154const hdmap::HDMap *MapService::SimMap() const {
155 return use_sim_map_ ? HDMapUtil::SimMapPtr() : HDMapUtil::BaseMapPtr();
156}
157
158bool MapService::MapReady() const { return HDMap() && SimMap(); }
159
160bool MapService::PointIsValid(const double x, const double y) const {
161 MapElementIds ids;
162 PointENU point;
163 point.set_x(x);
164 point.set_y(y);
165 CollectMapElementIds(point, 20, &ids);
166 return (ids.ByteSizeLong() != 0);
167}
168
169void MapService::CollectMapElementIds(const PointENU &point, double radius,
170 MapElementIds *ids) const {
171 if (!MapReady()) {
172 return;
173 }
174 boost::shared_lock<boost::shared_mutex> reader_lock(mutex_);
175
176 std::vector<LaneInfoConstPtr> lanes;
177 if (SimMap()->GetLanes(point, radius, &lanes) != 0) {
178 AERROR << "Fail to get lanes from sim_map.";
179 }
180 ExtractRoadAndLaneIds(lanes, ids->mutable_lane(), ids->mutable_road());
181
182 std::vector<ClearAreaInfoConstPtr> clear_areas;
183 if (SimMap()->GetClearAreas(point, radius, &clear_areas) != 0) {
184 AERROR << "Fail to get clear areas from sim_map.";
185 }
186 ExtractIds(clear_areas, ids->mutable_clear_area());
187
188 std::vector<CrosswalkInfoConstPtr> crosswalks;
189 if (SimMap()->GetCrosswalks(point, radius, &crosswalks) != 0) {
190 AERROR << "Fail to get crosswalks from sim_map.";
191 }
192 ExtractIds(crosswalks, ids->mutable_crosswalk());
193
194 std::vector<JunctionInfoConstPtr> junctions;
195 if (SimMap()->GetJunctions(point, radius, &junctions) != 0) {
196 AERROR << "Fail to get junctions from sim_map.";
197 }
198 ExtractIds(junctions, ids->mutable_junction());
199
200 std::vector<PNCJunctionInfoConstPtr> pnc_junctions;
201 if (SimMap()->GetPNCJunctions(point, radius, &pnc_junctions) != 0) {
202 AERROR << "Fail to get pnc junctions from sim_map.";
203 }
204 ExtractIds(pnc_junctions, ids->mutable_pnc_junction());
205
206 std::vector<ParkingSpaceInfoConstPtr> parking_spaces;
207 if (SimMap()->GetParkingSpaces(point, radius, &parking_spaces) != 0) {
208 AERROR << "Fail to get parking space from sim_map.";
209 }
210 ExtractIds(parking_spaces, ids->mutable_parking_space());
211
212 std::vector<SpeedBumpInfoConstPtr> speed_bumps;
213 if (SimMap()->GetSpeedBumps(point, radius, &speed_bumps) != 0) {
214 AERROR << "Fail to get speed bump from sim_map.";
215 }
216 ExtractIds(speed_bumps, ids->mutable_speed_bump());
217
218 std::vector<SignalInfoConstPtr> signals;
219 if (SimMap()->GetSignals(point, radius, &signals) != 0) {
220 AERROR << "Failed to get signals from sim_map.";
221 }
222
223 ExtractIds(signals, ids->mutable_signal());
224
225 std::vector<StopSignInfoConstPtr> stop_signs;
226 if (SimMap()->GetStopSigns(point, radius, &stop_signs) != 0) {
227 AERROR << "Failed to get stop signs from sim_map.";
228 }
229 ExtractIds(stop_signs, ids->mutable_stop_sign());
230
231 std::vector<YieldSignInfoConstPtr> yield_signs;
232 if (SimMap()->GetYieldSigns(point, radius, &yield_signs) != 0) {
233 AERROR << "Failed to get yield signs from sim_map.";
234 }
235 ExtractIds(yield_signs, ids->mutable_yield());
236
237 std::vector<AreaInfoConstPtr> ad_areas;
238 if (SimMap()->GetAreas(point, radius, &ad_areas) != 0) {
239 AERROR << "Failed to get ad areas from sim_map.";
240 }
241 ExtractIds(ad_areas, ids->mutable_ad_area());
242
243 std::vector<BarrierGateInfoConstPtr> barrier_gates;
244 if (SimMap()->GetBarrierGates(point, radius, &barrier_gates) != 0) {
245 AERROR << "Failed to get barrier gate from sim_map.";
246 }
247 ExtractIds(barrier_gates, ids->mutable_barrier_gate());
248}
249
251 boost::shared_lock<boost::shared_mutex> reader_lock(mutex_);
252
253 Map result;
254 if (!MapReady()) {
255 return result;
256 }
257 Id map_id;
258
259 for (const auto &id : ids.lane()) {
260 map_id.set_id(id);
261 auto element = SimMap()->GetLaneById(map_id);
262 if (element) {
263 auto lane = element->lane();
264 lane.clear_left_sample();
265 lane.clear_right_sample();
266 lane.clear_left_road_sample();
267 lane.clear_right_road_sample();
268 *result.add_lane() = lane;
269 }
270 }
271
272 for (const auto &id : ids.clear_area()) {
273 map_id.set_id(id);
274 auto element = SimMap()->GetClearAreaById(map_id);
275 if (element) {
276 *result.add_clear_area() = element->clear_area();
277 }
278 }
279
280 for (const auto &id : ids.crosswalk()) {
281 map_id.set_id(id);
282 auto element = SimMap()->GetCrosswalkById(map_id);
283 if (element) {
284 *result.add_crosswalk() = element->crosswalk();
285 }
286 }
287
288 for (const auto &id : ids.junction()) {
289 map_id.set_id(id);
290 auto element = SimMap()->GetJunctionById(map_id);
291 if (element) {
292 *result.add_junction() = element->junction();
293 }
294 }
295
296 for (const auto &id : ids.signal()) {
297 map_id.set_id(id);
298 auto element = SimMap()->GetSignalById(map_id);
299 if (element) {
300 *result.add_signal() = element->signal();
301 }
302 }
303
304 for (const auto &id : ids.stop_sign()) {
305 map_id.set_id(id);
306 auto element = SimMap()->GetStopSignById(map_id);
307 if (element) {
308 *result.add_stop_sign() = element->stop_sign();
309 }
310 }
311
312 for (const auto &id : ids.yield()) {
313 map_id.set_id(id);
314 auto element = SimMap()->GetYieldSignById(map_id);
315 if (element) {
316 *result.add_yield() = element->yield_sign();
317 }
318 }
319
320 for (const auto &id : ids.road()) {
321 map_id.set_id(id);
322 auto element = SimMap()->GetRoadById(map_id);
323 if (element) {
324 *result.add_road() = element->road();
325 }
326 }
327
328 for (const auto &id : ids.parking_space()) {
329 map_id.set_id(id);
330 auto element = SimMap()->GetParkingSpaceById(map_id);
331 if (element) {
332 *result.add_parking_space() = element->parking_space();
333 }
334 }
335
336 for (const auto &id : ids.speed_bump()) {
337 map_id.set_id(id);
338 auto element = SimMap()->GetSpeedBumpById(map_id);
339 if (element) {
340 *result.add_speed_bump() = element->speed_bump();
341 }
342 }
343
344 for (const auto &id : ids.pnc_junction()) {
345 map_id.set_id(id);
346 auto element = SimMap()->GetPNCJunctionById(map_id);
347 if (element) {
348 *result.add_pnc_junction() = element->pnc_junction();
349 }
350 }
351
352 for (const auto &id : ids.ad_area()) {
353 map_id.set_id(id);
354 auto element = SimMap()->GetAreaById(map_id);
355 if (element) {
356 *result.add_ad_area() = element->area();
357 }
358 }
359
360 for (const auto &id : ids.barrier_gate()) {
361 map_id.set_id(id);
362 auto element = SimMap()->GetBarrierGateById(map_id);
363 if (element) {
364 *result.add_barrier_gate() = element->barrier_gate();
365 }
366 }
367
368 apollo::hdmap::Header map_header;
369 if (SimMap()->GetMapHeader(&map_header)) {
370 result.mutable_header()->CopyFrom(map_header);
371 }
372
373 return result;
374}
375
376bool MapService::GetNearestLaneWithDistance(
377 const double x, const double y,
378 apollo::hdmap::LaneInfoConstPtr *nearest_lane, double *nearest_s,
379 double *nearest_l) const {
380 boost::shared_lock<boost::shared_mutex> reader_lock(mutex_);
381
382 PointENU point;
383 point.set_x(x);
384 point.set_y(y);
385 static constexpr double kSearchRadius = 3.0;
386 if (!MapReady() ||
387 HDMap()->GetNearestLaneWithDistance(point, kSearchRadius, nearest_lane,
388 nearest_s, nearest_l) < 0) {
389 AERROR << "Failed to get nearest lane!";
390 return false;
391 }
392 return true;
393}
394
395bool MapService::GetNearestLane(const double x, const double y,
396 LaneInfoConstPtr *nearest_lane,
397 double *nearest_s, double *nearest_l) const {
398 boost::shared_lock<boost::shared_mutex> reader_lock(mutex_);
399
400 PointENU point;
401 point.set_x(x);
402 point.set_y(y);
403 if (!MapReady() ||
404 HDMap()->GetNearestLane(point, nearest_lane, nearest_s, nearest_l) < 0) {
405 AERROR << "Failed to get nearest lane!";
406 return false;
407 }
408 return true;
409}
410
411bool MapService::GetNearestLaneWithHeading(const double x, const double y,
412 LaneInfoConstPtr *nearest_lane,
413 double *nearest_s, double *nearest_l,
414 const double heading) const {
415 boost::shared_lock<boost::shared_mutex> reader_lock(mutex_);
416
417 PointENU point;
418 point.set_x(x);
419 point.set_y(y);
420 static constexpr double kSearchRadius = 3.0;
421 static constexpr double kMaxHeadingDiff = 1.0;
422 if (!MapReady() || HDMap()->GetNearestLaneWithHeading(
423 point, kSearchRadius, heading, kMaxHeadingDiff,
424 nearest_lane, nearest_s, nearest_l) < 0) {
425 AERROR << "Failed to get nearest lane with heading.";
426 return false;
427 }
428 return true;
429}
430
432 std::vector<Path> *paths) const {
433 if (!CreatePathsFromRouting(routing, paths)) {
434 AERROR << "Unable to get paths from routing!";
435 return false;
436 }
437 return true;
438}
439
440bool MapService::GetPoseWithRegardToLane(const double x, const double y,
441 double *theta, double *s) const {
442 double l;
443 LaneInfoConstPtr nearest_lane;
444 if (!GetNearestLane(x, y, &nearest_lane, s, &l)) {
445 return false;
446 }
447
448 *theta = nearest_lane->Heading(*s);
449 return true;
450}
451
453 const double x, const double y, routing::LaneWaypoint *laneWayPoint) const {
454 double s, l;
455 LaneInfoConstPtr lane;
456 if (!GetNearestLane(x, y, &lane, &s, &l)) {
457 return false;
458 }
459
460 if (!CheckRoutingPointLaneType(lane)) {
461 return false;
462 }
463
464 laneWayPoint->set_id(lane->id().id());
465 laneWayPoint->set_s(s);
466 auto *pose = laneWayPoint->mutable_pose();
467 pose->set_x(x);
468 pose->set_y(y);
469
470 return true;
471}
472
474 const double x, const double y, const double heading,
475 routing::LaneWaypoint *laneWayPoint) const {
476 double s, l;
477 LaneInfoConstPtr lane;
478 if (!GetNearestLaneWithHeading(x, y, &lane, &s, &l, heading)) {
479 return false;
480 }
481
482 if (!CheckRoutingPointLaneType(lane)) {
483 return false;
484 }
485
486 laneWayPoint->set_id(lane->id().id());
487 laneWayPoint->set_s(s);
488 auto *pose = laneWayPoint->mutable_pose();
489 pose->set_x(x);
490 pose->set_y(y);
491
492 return true;
493}
494
496 const double x, const double y, const std::string id,
497 routing::LaneWaypoint *laneWayPoint) const {
498 LaneInfoConstPtr lane = HDMap()->GetLaneById(hdmap::MakeMapId(id));
499 if (!lane) {
500 return false;
501 }
502
503 if (!CheckRoutingPointLaneType(lane)) {
504 return false;
505 }
506
507 double s, l;
508 PointENU point;
509 point.set_x(x);
510 point.set_y(y);
511
512 if (!lane->GetProjection({point.x(), point.y()}, &s, &l)) {
513 return false;
514 }
515
516 // Limit s with max value of the length of the lane, or not the laneWayPoint
517 // may be invalid.
518 if (s > lane->lane().length()) {
519 s = lane->lane().length();
520 }
521
522 laneWayPoint->set_id(id);
523 laneWayPoint->set_s(s);
524 auto *pose = laneWayPoint->mutable_pose();
525 pose->set_x(x);
526 pose->set_y(y);
527
528 return true;
529}
530
531bool MapService::CheckRoutingPoint(const double x, const double y) const {
532 double s, l;
533 LaneInfoConstPtr lane;
534 if (!GetNearestLaneWithDistance(x, y, &lane, &s, &l)) {
535 if (GetParkingSpaceId(x, y) != "-1") {
536 return true;
537 }
538 return false;
539 }
540 if (!CheckRoutingPointLaneType(lane)) {
541 return false;
542 }
543 return true;
544}
545
546bool MapService::CheckRoutingPointWithHeading(const double x, const double y,
547 const double heading) const {
548 double s, l;
549 LaneInfoConstPtr lane;
550 if (!GetNearestLaneWithHeading(x, y, &lane, &s, &l, heading)) {
551 if (GetParkingSpaceId(x, y) != "-1") {
552 return true;
553 }
554 return false;
555 }
556 if (!CheckRoutingPointLaneType(lane)) {
557 return false;
558 }
559 return true;
560}
561
562bool MapService::CheckRoutingPointLaneType(LaneInfoConstPtr lane) const {
563 if (lane->lane().type() != Lane::CITY_DRIVING) {
564 AERROR
565 << "Failed to construct LaneWayPoint for RoutingRequest: Expected lane "
566 << lane->id().id() << " to be CITY_DRIVING, but was "
567 << apollo::hdmap::Lane::LaneType_Name(lane->lane().type());
568 return false;
569 }
570 return true;
571}
572
574 // Start from origin to find a lane from the map.
575 double s, l;
576 LaneInfoConstPtr lane;
577 if (!GetNearestLane(0.0, 0.0, &lane, &s, &l)) {
578 return false;
579 }
580
581 *start_point = lane->GetSmoothPoint(0.0);
582 return true;
583}
584
585bool MapService::CreatePathsFromRouting(const RoutingResponse &routing,
586 std::vector<Path> *paths) const {
587 if (routing.road().empty()) {
588 return false;
589 }
590
591 for (const auto &road : routing.road()) {
592 for (const auto &passage_region : road.passage()) {
593 // Each passage region in a road forms a path
594 if (!AddPathFromPassageRegion(passage_region, paths)) {
595 return false;
596 }
597 }
598 }
599 return true;
600}
601
602bool MapService::AddPathFromPassageRegion(
603 const routing::Passage &passage_region, std::vector<Path> *paths) const {
604 if (!MapReady()) {
605 return false;
606 }
607 boost::shared_lock<boost::shared_mutex> reader_lock(mutex_);
608
609 std::vector<MapPathPoint> path_points;
610 for (const auto &segment : passage_region.segment()) {
611 auto lane_ptr = HDMap()->GetLaneById(hdmap::MakeMapId(segment.id()));
612 if (!lane_ptr) {
613 AERROR << "Failed to find lane: " << segment.id();
614 return false;
615 }
616 if (segment.start_s() >= segment.end_s()) {
617 continue;
618 }
619 auto points = MapPathPoint::GetPointsFromLane(lane_ptr, segment.start_s(),
620 segment.end_s());
621 path_points.insert(path_points.end(), points.begin(), points.end());
622 }
623
624 if (path_points.size() < 2) {
625 return false;
626 }
627 paths->emplace_back(Path(std::move(path_points)));
628
629 return true;
630}
631
633 static std::hash<std::string> hash_function;
634 return hash_function(ids.DebugString());
635}
636
637double MapService::GetLaneHeading(const std::string &id_str, double s) {
638 auto *hdmap = HDMap();
639 CHECK(hdmap) << "Failed to get hdmap";
640
641 Id id;
642 id.set_id(id_str);
643 LaneInfoConstPtr lane_ptr = hdmap->GetLaneById(id);
644 if (lane_ptr != nullptr) {
645 return lane_ptr->Heading(s);
646 }
647 return 0.0;
648}
649
650std::string MapService::GetParkingSpaceId(const double x,
651 const double y) const {
652 PointENU point;
653 point.set_x(x);
654 point.set_y(y);
655 static constexpr double kSearchRadius = 3.0;
656 std::vector<ParkingSpaceInfoConstPtr> parking_spaces;
657
658 // Find parking spaces nearby
659 if (HDMap()->GetParkingSpaces(point, kSearchRadius, &parking_spaces) != 0) {
660 AERROR << "Fail to get parking space from sim_map.";
661 return "-1";
662 }
663
664 // Determine whether the point is in a neighboring parking space
665 for (const auto &parking_sapce : parking_spaces) {
666 if (!parking_sapce->polygon().is_convex()) {
667 AERROR << "The parking space information is incorrect and is not a "
668 "convex hull.";
669 return "-1";
670 }
671 apollo::common::math::Vec2d checked_point(x, y);
672 if (parking_sapce->polygon().IsPointIn(checked_point)) {
673 return parking_sapce->id().id();
674 }
675 }
676 return "-1";
677}
678
679} // namespace dreamview
680} // namespace apollo
Implements a class of 2-dimensional vectors.
Definition vec2d.h:42
bool CheckRoutingPoint(const double x, const double y) const
bool CheckRoutingPointWithHeading(const double x, const double y, const double heading) const
bool PointIsValid(const double x, const double y) const
double GetLaneHeading(const std::string &id_str, double s)
void CollectMapElementIds(const apollo::common::PointENU &point, double raidus, MapElementIds *ids) const
hdmap::Map RetrieveMapElements(const MapElementIds &ids) const
bool ReloadMap(bool force_reload)
MapService(bool use_sim_map=true)
bool GetStartPoint(apollo::common::PointENU *start_point) const
bool ConstructLaneWayPointWithLaneId(const double x, const double y, const std::string id, routing::LaneWaypoint *laneWayPoint) const
bool ConstructLaneWayPointWithHeading(const double x, const double y, const double heading, routing::LaneWaypoint *laneWayPoint) const
bool CheckRoutingPointLaneType(apollo::hdmap::LaneInfoConstPtr lane) const
bool GetPoseWithRegardToLane(const double x, const double y, double *theta, double *s) const
size_t CalculateMapHash(const MapElementIds &ids) const
bool GetPathsFromRouting(const apollo::routing::RoutingResponse &routing, std::vector< apollo::hdmap::Path > *paths) const
bool ConstructLaneWayPoint(const double x, const double y, routing::LaneWaypoint *laneWayPoint) const
The function fills out proper routing lane waypoint from the given (x,y) position.
std::string GetParkingSpaceId(const double x, const double y) const
static const HDMap * BaseMapPtr()
static const HDMap * SimMapPtr()
StopSignInfoConstPtr GetStopSignById(const Id &id) const
Definition hdmap.cc:58
PNCJunctionInfoConstPtr GetPNCJunctionById(const Id &id) const
Definition hdmap.cc:86
YieldSignInfoConstPtr GetYieldSignById(const Id &id) const
Definition hdmap.cc:62
BarrierGateInfoConstPtr GetBarrierGateById(const Id &id) const
Definition hdmap.cc:50
ClearAreaInfoConstPtr GetClearAreaById(const Id &id) const
Definition hdmap.cc:66
LaneInfoConstPtr GetLaneById(const Id &id) const
Definition hdmap.cc:34
AreaInfoConstPtr GetAreaById(const Id &id) const
Definition hdmap.cc:42
RoadInfoConstPtr GetRoadById(const Id &id) const
Definition hdmap.cc:78
JunctionInfoConstPtr GetJunctionById(const Id &id) const
Definition hdmap.cc:38
ParkingSpaceInfoConstPtr GetParkingSpaceById(const Id &id) const
Definition hdmap.cc:82
CrosswalkInfoConstPtr GetCrosswalkById(const Id &id) const
Definition hdmap.cc:54
SignalInfoConstPtr GetSignalById(const Id &id) const
Definition hdmap.cc:46
SpeedBumpInfoConstPtr GetSpeedBumpById(const Id &id) const
Definition hdmap.cc:70
static std::vector< MapPathPoint > GetPointsFromLane(LaneInfoConstPtr lane, const double start_s, const double end_s)
Definition path.cc:206
#define AERROR
Definition log.h:44
#define AINFO
Definition log.h:42
#define AWARN
Definition log.h:43
std::shared_ptr< const PNCJunctionInfo > PNCJunctionInfoConstPtr
std::shared_ptr< const JunctionInfo > JunctionInfoConstPtr
apollo::hdmap::Id MakeMapId(const std::string &id)
create a Map ID given a string.
Definition hdmap_util.h:85
std::shared_ptr< const StopSignInfo > StopSignInfoConstPtr
std::shared_ptr< const AreaInfo > AreaInfoConstPtr
std::shared_ptr< const LaneInfo > LaneInfoConstPtr
std::shared_ptr< const ClearAreaInfo > ClearAreaInfoConstPtr
std::shared_ptr< const BarrierGateInfo > BarrierGateInfoConstPtr
std::shared_ptr< const SignalInfo > SignalInfoConstPtr
std::shared_ptr< const SpeedBumpInfo > SpeedBumpInfoConstPtr
std::shared_ptr< const CrosswalkInfo > CrosswalkInfoConstPtr
std::shared_ptr< const YieldSignInfo > YieldSignInfoConstPtr
std::shared_ptr< const ParkingSpaceInfo > ParkingSpaceInfoConstPtr
class register implement
Definition arena_queue.h:37
Some string util functions.
repeated Signal signal
Definition map.proto:51
repeated Junction junction
Definition map.proto:48
repeated StopSign stop_sign
Definition map.proto:50
repeated Crosswalk crosswalk
Definition map.proto:47
repeated ParkingSpace parking_space
Definition map.proto:57
repeated SpeedBump speed_bump
Definition map.proto:55
repeated BarrierGate barrier_gate
Definition map.proto:61
repeated PNCJunction pnc_junction
Definition map.proto:58
repeated ClearArea clear_area
Definition map.proto:54
repeated Road road
Definition map.proto:56
repeated apollo::routing::RoadSegment road
Definition routing.proto:25