<commit_before>syntax = "proto2";

package apollo.planning;

import "modules/common/proto/drive_state.proto";
import "modules/common/proto/geometry.proto";
import "modules/common/proto/pnc_point.proto";
import "modules/planning/proto/planning_config.proto";
import "modules/routing/proto/routing.proto";

/*
  This file defines the data types that represents the internal state of the
  planning module.
  It will not be refreshed in each planning cycle.
*/

message BareIntersectionStatus {
  optional string current_pnc_junction_overlap_id = 1;
  optional string done_pnc_junction_overlap_id = 2;
}

message ChangeLaneStatus {
  enum Status {
    IN_CHANGE_LANE = 1;       // during change lane state
    CHANGE_LANE_FAILED = 2;   // change lane failed
    CHANGE_LANE_SUCCESS = 3;  // change lane succeeded
  }
  optional Status status = 1;
  // the id of the route segment that the vehicle is driving on
  optional string path_id = 2;
  // the time stamp when the state started.
  optional double timestamp = 3;
  // the starting position only after which lane-change can happen.
  optional bool exist_lane_change_start_position = 4 [default = false];
  optional apollo.common.Point3D lane_change_start_position = 5;
}

message StopTime {
  optional string obstacle_id = 1;
  // the timestamp when start stopping for the crosswalk
  optional double obstacle_stop_timestamp = 2;
}

message CrosswalkStatus {
  optional string crosswalk_id = 1;
  // the timestamp when start stopping for the crosswalk
  repeated StopTime stop_time = 2;
  repeated string finished_crosswalk = 3;
}

message DestinationStatus {
  optional bool has_passed_destination = 1 [default = false];
}

message OpenSpaceStatus {
  repeated string partitioned_trajectories_index_history = 1;
  optional bool position_init = 2 [default = false];
}

message ParkAndGoStatus {
  optional apollo.common.PointENU adc_init_position = 1;
  optional double adc_init_heading = 2;
}

message PathDeciderStatus {
  enum LaneBorrowDirection {
    LEFT_BORROW = 1;   // borrow left neighbor lane
    RIGHT_BORROW = 2;  // borrow right neighbor lane
  }
  optional int32 front_static_obstacle_cycle_counter = 1 [default = 0];
  optional int32 able_to_use_self_lane_counter = 2 [default = 0];
  optional bool is_in_path_lane_borrow_scenario = 3 [default = false];
  optional string front_static_obstacle_id = 4 [default = ""];
  repeated LaneBorrowDirection decided_side_pass_direction = 5;
}

message PedestrianStatus {
  repeated StopTime stop_time = 1;
}

message PullOverStatus {
  optional bool is_feasible = 1 [default = false];  // default must be false
  optional apollo.common.PointENU position = 2;
  optional double theta = 3;
  optional double length_front = 4;
  optional double length_back = 5;
  optional double width_left = 6;
  optional double width_right = 7;
  optional int32 idx = 8;
  optional bool is_in_pull_over_scenario = 9 [default = false];
}

message ReroutingStatus {
  optional double last_rerouting_time = 1;
  optional bool need_rerouting = 2 [default = false];
  optional apollo.routing.RoutingRequest routing_request = 3;
}

message RightOfWayStatus {
  // whether the vehicle has right of way in junction
  map<string, bool> junction = 1;
}

message ScenarioStatus {
  optional ScenarioConfig.ScenarioType scenario_type = 1;
  optional ScenarioConfig.StageType stage_type = 2;
}

message SidePassStatus {
  optional apollo.common.PathPoint change_lane_stop_path_point = 1;
  optional bool check_clear_flag = 2;
}

message StopSignStatus {
  optional string current_stop_sign_overlap_id = 1;
  optional string done_stop_sign_overlap_id = 2;
  repeated string wait_for_obstacle_id = 3;
}

message TrafficLightStatus {
  repeated string current_traffic_light_overlap_id = 1;
  repeated string done_traffic_light_overlap_id = 2;
}

message YieldSignStatus {
  repeated string current_yield_sign_overlap_id = 1;
  repeated string done_yield_sign_overlap_id = 2;
  repeated string wait_for_obstacle_id = 3;
}

message PlanningStatus {
  optional BareIntersectionStatus bare_intersection = 1;
  optional ChangeLaneStatus change_lane = 2;
  optional CrosswalkStatus crosswalk = 3;
  optional DestinationStatus destination = 4;
  optional apollo.common.EngageAdvice engage_advice = 5;
  optional OpenSpaceStatus open_space = 6;
  optional PedestrianStatus pedestrian = 7;
  optional ParkAndGoStatus park_and_go = 8;
  optional PathDeciderStatus path_decider = 9;
  optional PullOverStatus pull_over = 10;
  optional ReroutingStatus rerouting = 11;
  optional RightOfWayStatus right_of_way = 12;
  optional ScenarioStatus scenario = 13;
  optional SidePassStatus side_pass = 14;
  optional StopSignStatus stop_sign = 15;
  optional TrafficLightStatus traffic_light = 16;
  optional YieldSignStatus yield_sign = 17;
}<commit_msg>Planning: added path_reuse_status to planning context<commit_after>syntax = "proto2";

package apollo.planning;

import "modules/common/proto/drive_state.proto";
import "modules/common/proto/geometry.proto";
import "modules/common/proto/pnc_point.proto";
import "modules/planning/proto/planning_config.proto";
import "modules/routing/proto/routing.proto";

/*
  This file defines the data types that represents the internal state of the
  planning module.
  It will not be refreshed in each planning cycle.
*/

message BareIntersectionStatus {
  optional string current_pnc_junction_overlap_id = 1;
  optional string done_pnc_junction_overlap_id = 2;
}

message ChangeLaneStatus {
  enum Status {
    IN_CHANGE_LANE = 1;       // during change lane state
    CHANGE_LANE_FAILED = 2;   // change lane failed
    CHANGE_LANE_SUCCESS = 3;  // change lane succeeded
  }
  optional Status status = 1;
  // the id of the route segment that the vehicle is driving on
  optional string path_id = 2;
  // the time stamp when the state started.
  optional double timestamp = 3;
  // the starting position only after which lane-change can happen.
  optional bool exist_lane_change_start_position = 4 [default = false];
  optional apollo.common.Point3D lane_change_start_position = 5;
}

message StopTime {
  optional string obstacle_id = 1;
  // the timestamp when start stopping for the crosswalk
  optional double obstacle_stop_timestamp = 2;
}

message CrosswalkStatus {
  optional string crosswalk_id = 1;
  // the timestamp when start stopping for the crosswalk
  repeated StopTime stop_time = 2;
  repeated string finished_crosswalk = 3;
}

message DestinationStatus {
  optional bool has_passed_destination = 1 [default = false];
}

message OpenSpaceStatus {
  repeated string partitioned_trajectories_index_history = 1;
  optional bool position_init = 2 [default = false];
}

message ParkAndGoStatus {
  optional apollo.common.PointENU adc_init_position = 1;
  optional double adc_init_heading = 2;
}

message PathDeciderStatus {
  enum LaneBorrowDirection {
    LEFT_BORROW = 1;   // borrow left neighbor lane
    RIGHT_BORROW = 2;  // borrow right neighbor lane
  }
  optional int32 front_static_obstacle_cycle_counter = 1 [default = 0];
  optional int32 able_to_use_self_lane_counter = 2 [default = 0];
  optional bool is_in_path_lane_borrow_scenario = 3 [default = false];
  optional string front_static_obstacle_id = 4 [default = ""];
  repeated LaneBorrowDirection decided_side_pass_direction = 5;
}

message PathReuseDeciderStatus  {
    optional bool reused_path = 1 [default = true];
    optional int32 blocking_obstacle_cycle_counter = 2 [default = 0];
}

message PedestrianStatus {
  repeated StopTime stop_time = 1;
}

message PullOverStatus {
  optional bool is_feasible = 1 [default = false];  // default must be false
  optional apollo.common.PointENU position = 2;
  optional double theta = 3;
  optional double length_front = 4;
  optional double length_back = 5;
  optional double width_left = 6;
  optional double width_right = 7;
  optional int32 idx = 8;
  optional bool is_in_pull_over_scenario = 9 [default = false];
}

message ReroutingStatus {
  optional double last_rerouting_time = 1;
  optional bool need_rerouting = 2 [default = false];
  optional apollo.routing.RoutingRequest routing_request = 3;
}

message RightOfWayStatus {
  // whether the vehicle has right of way in junction
  map<string, bool> junction = 1;
}

message ScenarioStatus {
  optional ScenarioConfig.ScenarioType scenario_type = 1;
  optional ScenarioConfig.StageType stage_type = 2;
}

message SidePassStatus {
  optional apollo.common.PathPoint change_lane_stop_path_point = 1;
  optional bool check_clear_flag = 2;
}

message StopSignStatus {
  optional string current_stop_sign_overlap_id = 1;
  optional string done_stop_sign_overlap_id = 2;
  repeated string wait_for_obstacle_id = 3;
}

message TrafficLightStatus {
  repeated string current_traffic_light_overlap_id = 1;
  repeated string done_traffic_light_overlap_id = 2;
}

message YieldSignStatus {
  repeated string current_yield_sign_overlap_id = 1;
  repeated string done_yield_sign_overlap_id = 2;
  repeated string wait_for_obstacle_id = 3;
}

message PlanningStatus {
  optional BareIntersectionStatus bare_intersection = 1;
  optional ChangeLaneStatus change_lane = 2;
  optional CrosswalkStatus crosswalk = 3;
  optional DestinationStatus destination = 4;
  optional apollo.common.EngageAdvice engage_advice = 5;
  optional OpenSpaceStatus open_space = 6;
  optional PedestrianStatus pedestrian = 7;
  optional ParkAndGoStatus park_and_go = 8;
  optional PathDeciderStatus path_decider = 9;
  optional PathReuseDeciderStatus path_reuse_decider = 10;
  optional PullOverStatus pull_over = 11;
  optional ReroutingStatus rerouting = 12;
  optional RightOfWayStatus right_of_way = 13;
  optional ScenarioStatus scenario = 14;
  optional SidePassStatus side_pass = 15;
  optional StopSignStatus stop_sign = 16;
  optional TrafficLightStatus traffic_light = 17;
  optional YieldSignStatus yield_sign = 18;
}
{'fraction_non_alphanumeric': 0.06346153846153846, 'fraction_numerical': 0.018522267206477733, 'mean_word_length': 4.649514008004574, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4772819', 'n_tokens_mistral': 3171, 'n_tokens_neox': 2975, 'n_words': 907}