186 {
187 const auto &lane = lane_ptr->lane();
189 double start_heading = 0.0;
190 SLToPoint(lane_ptr, 0, 0, &start_point, &start_heading);
191
193 double end_heading = 0.0;
194 SLToPoint(lane_ptr, lane_ptr->total_length(), 0, &end_point, &end_heading);
195
196 double left_width = 0.0;
197 double right_width = 0.0;
198 lane_ptr->GetWidth(FLAGS_s, &left_width, &right_width);
199
200 std::cout << "lane[" << FLAGS_lane << std::fixed << "] length["
201 << lane_ptr->total_length() << "] type["
202 << Lane_LaneType_Name(lane.type()) << "] turn["
203 << Lane_LaneTurn_Name(lane.turn()) << "] speed_limit["
204 << lane.speed_limit() << "] predecessor[" << lane.predecessor_id()
205 << "] successor[" << lane.successor_id() << "] left_forward["
206 << lane.left_neighbor_forward_lane_id() << "] right_forward["
207 << lane.right_neighbor_forward_lane_id() << "] left_reverse["
208 << lane.left_neighbor_reverse_lane_id() << "] right_reverse["
209 << lane.right_neighbor_reverse_lane_id() << "], "
210 << "Left Boundary: [ virtual?:" << std::boolalpha
211 << lane.left_boundary().virtual_() << ", Type: [";
212 for (const auto &boundary_type : lane.left_boundary().boundary_type()) {
213 std::cout << "s: " << boundary_type.s() << "->";
214 for (const auto t : boundary_type.types()) {
215 std::cout << LaneBoundaryType::Type_Name(
217 << ", ";
218 }
219 }
220
221 std::cout << "]; Right Boundary: [ virtual?:" << std::boolalpha
222 << lane.right_boundary().virtual_() << ", Type: ";
223 for (const auto &boundary_type : lane.left_boundary().boundary_type()) {
224 std::cout << "s: " << boundary_type.s() << "->";
225 for (const auto t : boundary_type.types()) {
226 std::cout << LaneBoundaryType::Type_Name(
228 << ", ";
229 }
230 }
231 std::cout << "] overlap[" << lane.overlap_id() << "];"
232 <<
" start point(x,y,heading):" << start_point.
x() <<
","
233 << start_point.
y() <<
"," << start_heading
234 <<
" end point(x,y,heading):" << end_point.
x() <<
","
235 << end_point.
y() <<
"," << end_heading
236 << " left_width:" << left_width << " right_width:" << right_width
237 << std::endl;
238 std::cout.unsetf(std::ios_base::fixed);
239
240 if (FLAGS_dump_lane_width) {
241 const auto sample_left_widthes = lane_ptr->sampled_left_width();
242 std::cout << "left width num: " << sample_left_widthes.size()
243 << std::endl;
244 int num = 0;
245 for (auto w : sample_left_widthes) {
246 std::cout << " " << w.second;
247 if (++num % 10 == 0) {
248 std::cout << std::endl;
249 }
250 }
251 std::cout << std::endl;
252 num = 0;
253 const auto sample_right_widthes = lane_ptr->sampled_right_width();
254 std::cout << "right width num: " << sample_right_widthes.size()
255 << std::endl;
256 for (auto w : sample_right_widthes) {
257 std::cout << " " << w.second;
258 if (++num % 10 == 0) {
259 std::cout << std::endl;
260 }
261 }
262 std::cout << std::endl;
263 }
264 }
int SLToPoint(LaneInfoConstPtr lane_ptr, const double s, const double l, PointENU *point, double *heading) const