46 const auto& reference_line = reference_line_info->
reference_line();
48 ADEBUG <<
"ReferenceLineEnd length[" << reference_line.
Length() <<
"]";
49 for (
const auto& segment : reference_line_info->
Lanes()) {
50 ADEBUG <<
" lane[" << segment.lane->lane().id().id() <<
"]";
60 std::string virtual_obstacle_id =
61 REF_LINE_END_VO_ID_PREFIX + reference_line_info->
Lanes().
Id();
62 double obstacle_start_s =
63 reference_line.Length() - 2 * FLAGS_virtual_stop_wall_length;
65 reference_line_info, virtual_obstacle_id, obstacle_start_s);
68 "Failed to create reference line end obstacle");
74 "Failed to create path obstacle for reference line end obstacle");
78 const double stop_line_s = obstacle_start_s - config_.
stop_distance();
79 auto stop_point = reference_line.GetReferencePoint(stop_line_s);
81 ObjectDecisionType stop;
82 auto stop_decision = stop.mutable_stop();
83 stop_decision->set_reason_code(StopReasonCode::STOP_REASON_DESTINATION);
85 stop_decision->set_stop_heading(stop_point.heading());
86 stop_decision->mutable_stop_point()->set_x(stop_point.x());
87 stop_decision->mutable_stop_point()->set_y(stop_point.y());
88 stop_decision->mutable_stop_point()->set_z(0.0);
const Obstacle * CreateStopObstacle(ReferenceLineInfo *const reference_line_info, const std::string &obstacle_id, const double obstacle_s, double stop_wall_width=4.0)
: create static virtual object with lane width, mainly used for virtual stop wall