Apollo 10.0
自动驾驶开放平台
scenario.proto
浏览该文件的文档.
1syntax = "proto2";
2
3package apollo.simulation;
4
7
11
12message FuzzingConfig {}
13
14message DriveActionConfig {
15 optional apollo.planning.PadMessage.DrivingAction drive_action = 1 [default = NONE];
16 optional double trigger_time = 2 [default = 0.0];
17}
18
19message Scenario {
20 optional string name = 1;
21 optional string description = 2;
22
23 message Point {
24 optional double x = 1;
25 optional double y = 2;
26 optional double heading = 3;
27 // TODO: add lane-id and ratio.
28 }
29 // Only use in WorldSim.
30 optional Point start = 3;
31 optional Point end = 4;
32 optional Point parking_point = 5;
33
34 // Only use in LogSim
35 repeated string origin_log_file_path = 6;
36 optional double log_file_start_time = 7;
37 optional double log_file_end_time = 8;
38
39 // This is used if 1) the logsim bag does not contain one.
40 // 2) the worldsim has different start pose for routing and ego car.
41 optional apollo.routing.RoutingRequest routing_request = 9;
42
43 // map dir, only used in offline env
44 optional string map_dir = 10;
45
46 // metric specific to the scenario.
47 optional GradingConfig grade_config = 11;
48
49 // agent type
50 repeated AgentConfig agent = 12;
51 // a sequence of driving actions
52 repeated DriveActionConfig drive_action_config = 13;
53 optional FuzzingConfig fuzzing_config = 14;
54
55 // Only use in WorldSim. Max time before stop running the scenario.
56 optional int32 simulator_time = 15;
57
58 // Initial velocity and acceleration of the main vehicle
59 optional double start_velocity = 16 [default = 0.0];
60 optional double start_acceleration = 17 [default = 0.0];
61
62 // file path to its base metric config
63 optional string base_grade_config_file = 18;
64
65 // Traffic light detection distance.
66 optional double detect_distance = 19 [default = 120.0];
67
68 enum DefaultLightBehavior {
69 ALWAYS_GREEN = 0;
70 CYCLICAL = 1; // Traffic lights change by red -> green -> yellow cycles.
71 }
72 optional DefaultLightBehavior default_light_behavior = 20
73 [default = ALWAYS_GREEN];
74 optional double red_time = 21 [default = 15.0];
75 optional double green_time = 22 [default = 13.0];
76 optional double yellow_time = 23 [default = 3.0];
77
78 message TL {
79 optional string id = 1;
80 message Location {
81 optional double x = 1;
82 optional double y = 2;
83 optional double z = 3;
84 }
85 optional Location location = 2;
86
87 enum TriggerType {
88 NA = 0; // The traffic light will stay in initial_state.
89 DISTANCE = 1;
90 TIME = 2;
91 }
92 optional TriggerType trigger_type = 3 [default = NA];
93 // Trigger Distance or Trigger Time
94 optional double trigger_value = 4 [default = 30.0];
95
96 message State {
97 optional apollo.perception.TrafficLight.Color color = 1 [default = GREEN];
98 optional bool blink = 2 [default = false];
99 optional double keep_time = 3 [default = 10.0];
100 }
101 optional State initial_state = 5;
102 repeated State state_group = 6;
103 }
104 // The overriden traffic lights behavior
105 repeated TL traffic_lights = 24;
106
107 // The scenario should be run in one of the modes.
108 enum Mode {
109 WORLDSIM = 0;
110 LOGSIM = 1;
111 LOGSIM_CONTROL = 2;
112 LOGSIM_PERCEPTION = 3;
113 }
114 optional Mode mode = 25 [default = WORLDSIM];
115
116 repeated string select_default_metric = 26;
117 repeated string deselect_default_metric = 27;
118
119 // The backtrack time to start running perfect_control once a disengage is
120 // detected.
121 optional double backtrack_time = 28 [default = 1.0];
122
123 // Only use in LogSim
124 optional string vehicle = 29;
125
126 // Only use in worldsim for special scenario conf use multi agent server
127 optional bool traffic_flow = 30 [default = false];
128}
syntax
Definition scenario.proto:1
apollo::planning
Definition pad_msg.proto:2
class register implement
Definition arena_queue.h:37