52 const auto frame =
injector_->frame_history()->Latest();
54 AINFO <<
"Current trajectory type is: OPEN SPACE";
55 if (frame->open_space_info().openspace_planning_finish()) {
56 AINFO <<
"OPEN SPACE: planning finished";
59 AINFO <<
"OPEN SPACE: planning not finished";
64 if (
nullptr == frame || frame->reference_line_info().empty() ||
66 AINFO <<
"Current reference point is empty;";
69 const auto& reference_line_info = frame->reference_line_info().front();
71 const auto& reference_points =
72 reference_line_info.reference_line().reference_points();
73 if (reference_points.empty()) {
74 AINFO <<
"Current reference points is empty;";
77 const auto& last_reference_point = reference_points.back();
78 const std::vector<hdmap::LaneWaypoint>& lane_way_points =
79 last_reference_point.lane_waypoints();
80 if (lane_way_points.empty()) {
81 AINFO <<
"Last reference point is empty;";
85 if (
nullptr == frame->local_view().end_lane_way_point) {
86 AINFO <<
"Current end lane way is empty;";
89 bool is_has_passed_destination =
injector_->planning_context()
92 .has_passed_destination();
93 AINFO <<
"Current passed destination:" << is_has_passed_destination;
94 return is_has_passed_destination;
100 trajectory_pb->mutable_header()->set_timestamp_sec(timestamp);
102 trajectory_pb->mutable_header()->set_lidar_timestamp(
104 trajectory_pb->mutable_header()->set_camera_timestamp(
106 trajectory_pb->mutable_header()->set_radar_timestamp(
109 trajectory_pb->mutable_routing_header()->CopyFrom(
127 double left_width = 0, right_width = 0;
128 const auto frame =
injector_->frame_history()->Latest();
129 if (
nullptr == frame || frame->reference_line_info().empty()) {
130 AINFO <<
"Reference lane is empty!";
133 const auto& reference_line_info = frame->reference_line_info().front();
136 reference_line_info.reference_line().XYToSL(current_location, ¤t_sl);
138 bool get_width_of_lane = reference_line_info.reference_line().GetLaneWidth(
139 current_sl.
s(), &left_width, &right_width);
140 AINFO <<
"get_width_of_lane: " << get_width_of_lane
141 <<
", left_width: " << left_width <<
", right_width: " << right_width;
142 if (get_width_of_lane && left_width != 0 && right_width != 0) {
143 AINFO <<
"Get the width of lane successfully!";
144 SLPoint sl_left_point, sl_right_point;
145 sl_left_point.set_s(current_sl.
s());
146 sl_left_point.set_l(left_width);
147 sl_right_point.set_s(current_sl.
s());
148 sl_right_point.set_l(-right_width);
149 reference_line_info.reference_line().SLToXY(sl_left_point, &left_point);
150 reference_line_info.reference_line().SLToXY(sl_right_point, &right_point);
153 AINFO <<
"Failed to get the width of lane!";