Apollo 10.0
自动驾驶开放平台
chassis.proto
浏览该文件的文档.
1syntax = "proto2";
2
3package apollo.canbus;
4
5import "google/protobuf/any.proto";
11
12
13// next id :31
14message Chassis {
16 COMPLETE_MANUAL = 0; // human drive
18 AUTO_STEER_ONLY = 2; // only steer
19 AUTO_SPEED_ONLY = 3; // include throttle and brake
20
21 // security mode when manual intervention happens, only response status
23 }
24
25 enum ErrorCode {
26 NO_ERROR = 0;
27
28 CMD_NOT_IN_PERIOD = 1; // control cmd not in period
29
30 // car chassis report error, like steer, brake, throttle, gear fault
31 CHASSIS_ERROR = 2;
32
33 // classify the types of the car chassis errors
34 CHASSIS_ERROR_ON_STEER = 6;
35 CHASSIS_ERROR_ON_BRAKE = 7;
36 CHASSIS_ERROR_ON_THROTTLE = 8;
37 CHASSIS_ERROR_ON_GEAR = 9;
38 CHASSIS_CAN_LOST = 10;
39
40 MANUAL_INTERVENTION = 3; // human manual intervention
41
42 // receive car chassis can frame not in period
43 CHASSIS_CAN_NOT_IN_PERIOD = 4;
44
45 UNKNOWN_ERROR = 5;
46 }
47
49 GEAR_NEUTRAL = 0;
50 GEAR_DRIVE = 1;
51 GEAR_REVERSE = 2;
52 GEAR_PARKING = 3;
53 GEAR_LOW = 4;
54 GEAR_INVALID = 5;
55 GEAR_NONE = 6;
56 }
57
59 BUMPER_INVALID = 0;
60 BUMPER_NORMAL = 1;
61 BUMPER_PRESSED = 2;
62 }
63
64 optional bool engine_started = 3;
65
66 // Engine speed in RPM.
67 optional float engine_rpm = 4 [default = nan];
68
69 // Vehicle Speed in meters per second.
70 optional float speed_mps = 5 [default = nan];
71
72 // Vehicle odometer in meters.
73 optional float odometer_m = 6 [default = nan];
74
75 // Fuel range in meters.
76 optional int32 fuel_range_m = 7;
77
78 // Real throttle location in [%], ranging from 0 to 100.
79 optional float throttle_percentage = 8 [default = nan];
80
81 // Real brake location in [%], ranging from 0 to 100.
82 optional float brake_percentage = 9 [default = nan];
83
84 // Real steering location in [%], ranging from -100 to 100.
85 // steering_angle / max_steering_angle
86 // Clockwise: negative
87 // CountClockwise: positive
88 optional float steering_percentage = 11 [default = nan];
89
90 // Applied steering torque in [Nm].
91 optional float steering_torque_nm = 12 [default = nan];
92
93 // Parking brake status.
94 optional bool parking_brake = 13;
95
96 // Light signals.
97 optional bool high_beam_signal = 14 [deprecated = true];
98 optional bool low_beam_signal = 15 [deprecated = true];
99 optional bool left_turn_signal = 16 [deprecated = true];
100 optional bool right_turn_signal = 17 [deprecated = true];
101 optional bool horn = 18 [deprecated = true];
102
103 optional bool wiper = 19;
104 optional bool disengage_status = 20 [deprecated = true];
105 optional DrivingMode driving_mode = 21 [default = COMPLETE_MANUAL];
106 optional ErrorCode error_code = 22 [default = NO_ERROR];
107 optional GearPosition gear_location = 23;
108
109 // timestamp for steering module
110 optional double steering_timestamp = 24; // In seconds, with 1e-6 accuracy
111
112 // chassis also needs it own sending timestamp
113 optional apollo.common.Header header = 25;
114
115 optional int32 chassis_error_mask = 26 [default = 0];
116
117 optional apollo.common.VehicleSignal signal = 27;
118
119 // Only available for Lincoln now
120 optional ChassisGPS chassis_gps = 28;
121
122 optional apollo.common.EngageAdvice engage_advice = 29;
123
124 optional WheelSpeed wheel_speed = 30;
125
126 optional Surround surround = 31;
127
128 // Vehicle registration information
129 optional License license = 32 [deprecated = true];
130
131 // Real gear location.
132 // optional int32 gear_location = 10 [deprecated = true]; deprecated use enum
133 // replace this [id 23]
134
135 optional apollo.common.VehicleID vehicle_id = 33;
136
137 optional int32 battery_soc_percentage = 34 [default = -1];
138
139 // Real send throttle location in [%], ranging from 0 to 100.
140 optional float throttle_percentage_cmd = 35 [default = nan];
141
142 // Real send brake location in [%], ranging from 0 to 100.
143 optional float brake_percentage_cmd = 36 [default = nan];
144
145 // Real send steering location in [%], ranging from -100 to 100.
146 // steering_angle / max_steering_angle
147 // Clockwise: negative
148 // CountClockwise: positive
149 optional float steering_percentage_cmd = 37 [default = nan];
150
151 optional BumperEvent front_bumper_event = 38;
152
153 optional BumperEvent back_bumper_event = 39;
154
155 optional CheckResponse check_response = 40;
156
157 // Custom chassis operation command defined by user for extensibility.
158 optional google.protobuf.Any custom_status = 41;
159}
160
161message ChassisGPS {
162 optional double latitude = 1;
163 optional double longitude = 2;
164 optional bool gps_valid = 3;
165
166 optional int32 year = 4;
167 optional int32 month = 5;
168 optional int32 day = 6;
169 optional int32 hours = 7;
170 optional int32 minutes = 8;
171 optional int32 seconds = 9;
172 optional double compass_direction = 10;
173 optional double pdop = 11;
174 optional bool is_gps_fault = 12;
175 optional bool is_inferred = 13;
176
177 optional double altitude = 14;
178 optional double heading = 15;
179 optional double hdop = 16;
180 optional double vdop = 17;
181 optional GpsQuality quality = 18;
182 optional int32 num_satellites = 19;
183 optional double gps_speed = 20;
184}
185
192
193message WheelSpeed {
195 FORWARD = 0;
196 BACKWARD = 1;
197 STANDSTILL = 2;
198 INVALID = 3;
199 }
200 optional bool is_wheel_spd_rr_valid = 1 [default = false];
201 optional WheelSpeedType wheel_direction_rr = 2 [default = INVALID];
202 optional double wheel_spd_rr = 3 [default = 0.0];
203 optional bool is_wheel_spd_rl_valid = 4 [default = false];
204 optional WheelSpeedType wheel_direction_rl = 5 [default = INVALID];
205 optional double wheel_spd_rl = 6 [default = 0.0];
206 optional bool is_wheel_spd_fr_valid = 7 [default = false];
207 optional WheelSpeedType wheel_direction_fr = 8 [default = INVALID];
208 optional double wheel_spd_fr = 9 [default = 0.0];
209 optional bool is_wheel_spd_fl_valid = 10 [default = false];
210 optional WheelSpeedType wheel_direction_fl = 11 [default = INVALID];
211 optional double wheel_spd_fl = 12 [default = 0.0];
212}
213
214message Sonar {
215 optional double range = 1; // Meter
216 optional apollo.common.Point3D translation = 2; // Meter
217 optional apollo.common.Quaternion rotation = 3;
218}
219
220message Surround {
221 optional bool cross_traffic_alert_left = 1;
222 optional bool cross_traffic_alert_left_enabled = 2;
223 optional bool blind_spot_left_alert = 3;
224 optional bool blind_spot_left_alert_enabled = 4;
225 optional bool cross_traffic_alert_right = 5;
226 optional bool cross_traffic_alert_right_enabled = 6;
227 optional bool blind_spot_right_alert = 7;
228 optional bool blind_spot_right_alert_enabled = 8;
229 optional double sonar00 = 9;
230 optional double sonar01 = 10;
231 optional double sonar02 = 11;
232 optional double sonar03 = 12;
233 optional double sonar04 = 13;
234 optional double sonar05 = 14;
235 optional double sonar06 = 15;
236 optional double sonar07 = 16;
237 optional double sonar08 = 17;
238 optional double sonar09 = 18;
239 optional double sonar10 = 19;
240 optional double sonar11 = 20;
241 optional bool sonar_enabled = 21;
242 optional bool sonar_fault = 22;
243 repeated double sonar_range = 23;
244 repeated Sonar sonar = 24;
245}
246
247message License {
248 optional string vin = 1 [deprecated = true];
249}
250
251// CheckResponseSignal
253 optional bool is_eps_online = 1 [default = false];
254 optional bool is_epb_online = 2 [default = false];
255 optional bool is_esp_online = 3 [default = false];
256 optional bool is_vtog_online = 4 [default = false];
257 optional bool is_scu_online = 5 [default = false];
258 optional bool is_switch_online = 6 [default = false];
259 optional bool is_vcu_online = 7 [default = false];
260}
syntax
Definition chassis.proto:1
apollo::common
class register implement
Definition arena_queue.h:37