diff --git a/modules/common/proto/path_point.proto b/modules/common/proto/path_point.proto index 785fceb881b565f5cffc76312c12f6b3ad032a22..d5f67ab37fddb2dcc5f5a9226e61561017d21da1 100644 --- a/modules/common/proto/path_point.proto +++ b/modules/common/proto/path_point.proto @@ -38,7 +38,8 @@ message PathPoint { } message Path { - repeated PathPoint path_point = 1; + optional string name = 1; + repeated PathPoint path_point = 2; } message TrajectoryPoint { diff --git a/modules/planning/planner/em/em_planner.cc b/modules/planning/planner/em/em_planner.cc index bb22afa817b73dc9c795f556c902abebe7812a2c..3d8ba4fc5b6eaebd3ecc4588e8b16d844057d424 100644 --- a/modules/planning/planner/em/em_planner.cc +++ b/modules/planning/planner/em/em_planner.cc @@ -113,8 +113,8 @@ Status EMPlanner::Plan(const TrajectoryPoint& start_point, auto* optimized_path = trajectory_pb->mutable_debug()->mutable_planning_data()->add_path(); optimized_path->set_name(optimizer->name()); - optimized_path->mutable_path()->mutable_path_point()->CopyFrom({ - path_points.begin(), path_points.end()}); + optimized_path->mutable_path_point()->CopyFrom({path_points.begin(), + path_points.end()}); } } } @@ -130,13 +130,13 @@ Status EMPlanner::Plan(const TrajectoryPoint& start_point, // Add debug information. if (FLAGS_enable_record_debug) { - auto* debug_reference_line = + auto* reference_line = trajectory_pb->mutable_debug()->mutable_planning_data()->add_path(); - debug_reference_line->set_name("planning_reference_line"); + reference_line->set_name("planning_reference_line"); const auto& reference_points = planning_data->reference_line().reference_points(); - debug_reference_line->mutable_path()->mutable_path_point()->CopyFrom({ - reference_points.begin(), reference_points.end()}); + reference_line->mutable_path_point()->CopyFrom({reference_points.begin(), + reference_points.end()}); } return Status::OK(); diff --git a/modules/planning/proto/planning_internal.proto b/modules/planning/proto/planning_internal.proto index d9207fe66b29db15025ea88fb398e37b9a6612f7..49b7127a877ed6be7d711b44d3116454dada694e 100644 --- a/modules/planning/proto/planning_internal.proto +++ b/modules/planning/proto/planning_internal.proto @@ -82,11 +82,6 @@ message LightSignal { optional TurnSignal turn_signal = 2 [default = NO_TURN]; } -message PathDebug { - optional string name = 1; - optional apollo.common.Path path = 2; -} - // next id: 12 message PlanningData { optional apollo.common.Header header = 1; @@ -101,7 +96,7 @@ message PlanningData { // processed planning_obstacles repeated PlanningObstacle planning_obstacle = 4; - repeated PathDebug path = 6; + repeated apollo.common.Path path = 6; optional apollo.localization.Pose init_status = 2 [deprecated = true]; // initial status of adc optional apollo.planning.MainDecision main_decision = 3 [deprecated = true];