168 {
169 if (!MapReady()) {
170 return;
171 }
172 boost::shared_lock<boost::shared_mutex> reader_lock(mutex_);
173
174 std::vector<LaneInfoConstPtr> lanes;
175 if (SimMap()->GetLanes(point, radius, &lanes) != 0) {
176 AERROR <<
"Fail to get lanes from sim_map.";
177 }
178 ExtractRoadAndLaneIds(lanes, ids->mutable_lane(), ids->mutable_road());
179
180 std::vector<ClearAreaInfoConstPtr> clear_areas;
181 if (SimMap()->GetClearAreas(point, radius, &clear_areas) != 0) {
182 AERROR <<
"Fail to get clear areas from sim_map.";
183 }
184 ExtractIds(clear_areas, ids->mutable_clear_area());
185
186 std::vector<CrosswalkInfoConstPtr> crosswalks;
187 if (SimMap()->GetCrosswalks(point, radius, &crosswalks) != 0) {
188 AERROR <<
"Fail to get crosswalks from sim_map.";
189 }
190 ExtractIds(crosswalks, ids->mutable_crosswalk());
191
192 std::vector<JunctionInfoConstPtr> junctions;
193 if (SimMap()->GetJunctions(point, radius, &junctions) != 0) {
194 AERROR <<
"Fail to get junctions from sim_map.";
195 }
196 ExtractIds(junctions, ids->mutable_junction());
197
198 std::vector<PNCJunctionInfoConstPtr> pnc_junctions;
199 if (SimMap()->GetPNCJunctions(point, radius, &pnc_junctions) != 0) {
200 AERROR <<
"Fail to get pnc junctions from sim_map.";
201 }
202 ExtractIds(pnc_junctions, ids->mutable_pnc_junction());
203
204 std::vector<ParkingSpaceInfoConstPtr> parking_spaces;
205 if (SimMap()->GetParkingSpaces(point, radius, &parking_spaces) != 0) {
206 AERROR <<
"Fail to get parking space from sim_map.";
207 }
208 ExtractIds(parking_spaces, ids->mutable_parking_space());
209
210 std::vector<SpeedBumpInfoConstPtr> speed_bumps;
211 if (SimMap()->GetSpeedBumps(point, radius, &speed_bumps) != 0) {
212 AERROR <<
"Fail to get speed bump from sim_map.";
213 }
214 ExtractIds(speed_bumps, ids->mutable_speed_bump());
215
216 std::vector<SignalInfoConstPtr> signals;
217 if (SimMap()->GetSignals(point, radius, &signals) != 0) {
218 AERROR <<
"Failed to get signals from sim_map.";
219 }
220
221 ExtractIds(signals, ids->mutable_signal());
222
223 std::vector<StopSignInfoConstPtr> stop_signs;
224 if (SimMap()->GetStopSigns(point, radius, &stop_signs) != 0) {
225 AERROR <<
"Failed to get stop signs from sim_map.";
226 }
227 ExtractIds(stop_signs, ids->mutable_stop_sign());
228
229 std::vector<YieldSignInfoConstPtr> yield_signs;
230 if (SimMap()->GetYieldSigns(point, radius, &yield_signs) != 0) {
231 AERROR <<
"Failed to get yield signs from sim_map.";
232 }
233 ExtractIds(yield_signs, ids->mutable_yield());
234}