forked from commaai/msgq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.capnp
1546 lines (1343 loc) · 36.5 KB
/
log.capnp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using Cxx = import "./include/c++.capnp";
$Cxx.namespace("cereal");
using Car = import "car.capnp";
using Legacy = import "legacy.capnp";
@0xf3b1f17e25a4285b;
const logVersion :Int32 = 1;
struct Map(Key, Value) {
entries @0 :List(Entry);
struct Entry {
key @0 :Key;
value @1 :Value;
}
}
struct InitData {
kernelArgs @0 :List(Text);
kernelVersion @15 :Text;
osVersion @18 :Text;
dongleId @2 :Text;
deviceType @3 :DeviceType;
version @4 :Text;
gitCommit @10 :Text;
gitBranch @11 :Text;
gitRemote @13 :Text;
androidProperties @16 :Map(Text, Text);
pandaInfo @8 :PandaInfo;
dirty @9 :Bool;
passive @12 :Bool;
params @17 :Map(Text, Data);
enum DeviceType {
unknown @0;
neo @1;
chffrAndroid @2;
chffrIos @3;
tici @4;
pc @5;
}
struct PandaInfo {
hasPanda @0 :Bool;
dongleId @1 :Text;
stVersion @2 :Text;
espVersion @3 :Text;
}
# ***** deprecated stuff *****
gctxDEPRECATED @1 :Text;
androidBuildInfo @5 :AndroidBuildInfo;
androidSensorsDEPRECATED @6 :List(AndroidSensor);
chffrAndroidExtraDEPRECATED @7 :ChffrAndroidExtra;
iosBuildInfoDEPRECATED @14 :IosBuildInfo;
struct AndroidBuildInfo {
board @0 :Text;
bootloader @1 :Text;
brand @2 :Text;
device @3 :Text;
display @4 :Text;
fingerprint @5 :Text;
hardware @6 :Text;
host @7 :Text;
id @8 :Text;
manufacturer @9 :Text;
model @10 :Text;
product @11 :Text;
radioVersion @12 :Text;
serial @13 :Text;
supportedAbis @14 :List(Text);
tags @15 :Text;
time @16 :Int64;
type @17 :Text;
user @18 :Text;
versionCodename @19 :Text;
versionRelease @20 :Text;
versionSdk @21 :Int32;
versionSecurityPatch @22 :Text;
}
struct AndroidSensor {
id @0 :Int32;
name @1 :Text;
vendor @2 :Text;
version @3 :Int32;
handle @4 :Int32;
type @5 :Int32;
maxRange @6 :Float32;
resolution @7 :Float32;
power @8 :Float32;
minDelay @9 :Int32;
fifoReservedEventCount @10 :UInt32;
fifoMaxEventCount @11 :UInt32;
stringType @12 :Text;
maxDelay @13 :Int32;
}
struct ChffrAndroidExtra {
allCameraCharacteristics @0 :Map(Text, Text);
}
struct IosBuildInfo {
appVersion @0 :Text;
appBuild @1 :UInt32;
osVersion @2 :Text;
deviceModel @3 :Text;
}
}
struct FrameData {
frameId @0 :UInt32;
encodeId @1 :UInt32; # DEPRECATED
frameType @7 :FrameType;
frameLength @3 :Int32;
# Timestamps
timestampEof @2 :UInt64;
timestampSof @8 :UInt64;
processingTime @23 :Float32;
# Exposure
integLines @4 :Int32;
highConversionGain @20 :Bool;
gain @15 :Float32; # This includes highConversionGain if enabled
measuredGreyFraction @21 :Float32;
targetGreyFraction @22 :Float32;
# Focus
lensPos @11 :Int32;
lensSag @12 :Float32;
lensErr @13 :Float32;
lensTruePos @14 :Float32;
focusVal @16 :List(Int16);
focusConf @17 :List(UInt8);
sharpnessScore @18 :List(UInt16);
recoverState @19 :Int32;
transform @10 :List(Float32);
androidCaptureResult @9 :AndroidCaptureResult;
image @6 :Data;
globalGainDEPRECATED @5 :Int32;
enum FrameType {
unknown @0;
neo @1;
chffrAndroid @2;
front @3;
}
struct AndroidCaptureResult {
sensitivity @0 :Int32;
frameDuration @1 :Int64;
exposureTime @2 :Int64;
rollingShutterSkew @3 :UInt64;
colorCorrectionTransform @4 :List(Int32);
colorCorrectionGains @5 :List(Float32);
displayRotation @6 :Int8;
}
}
struct Thumbnail {
frameId @0 :UInt32;
timestampEof @1 :UInt64;
thumbnail @2 :Data;
}
struct GPSNMEAData {
timestamp @0 :Int64;
localWallTime @1 :UInt64;
nmea @2 :Text;
}
# android sensor_event_t
struct SensorEventData {
version @0 :Int32;
sensor @1 :Int32;
type @2 :Int32;
timestamp @3 :Int64;
uncalibratedDEPRECATED @10 :Bool;
union {
acceleration @4 :SensorVec;
magnetic @5 :SensorVec;
orientation @6 :SensorVec;
gyro @7 :SensorVec;
pressure @9 :SensorVec;
magneticUncalibrated @11 :SensorVec;
gyroUncalibrated @12 :SensorVec;
proximity @13: Float32;
light @14: Float32;
temperature @15: Float32;
}
source @8 :SensorSource;
struct SensorVec {
v @0 :List(Float32);
status @1 :Int8;
}
enum SensorSource {
android @0;
iOS @1;
fiber @2;
velodyne @3; # Velodyne IMU
bno055 @4; # Bosch accelerometer
lsm6ds3 @5; # accelerometer (c2)
bmp280 @6; # barometer (c2)
mmc3416x @7; # magnetometer (c2)
bmx055 @8;
rpr0521 @9;
lsm6ds3trc @10;
mmc5603nj @11;
}
}
# android struct GpsLocation
struct GpsLocationData {
# Contains GpsLocationFlags bits.
flags @0 :UInt16;
# Represents latitude in degrees.
latitude @1 :Float64;
# Represents longitude in degrees.
longitude @2 :Float64;
# Represents altitude in meters above the WGS 84 reference ellipsoid.
altitude @3 :Float64;
# Represents speed in meters per second.
speed @4 :Float32;
# Represents heading in degrees.
bearingDeg @5 :Float32;
# Represents expected accuracy in meters. (presumably 1 sigma?)
accuracy @6 :Float32;
# Timestamp for the location fix.
# Milliseconds since January 1, 1970.
timestamp @7 :Int64;
source @8 :SensorSource;
# Represents NED velocity in m/s.
vNED @9 :List(Float32);
# Represents expected vertical accuracy in meters. (presumably 1 sigma?)
verticalAccuracy @10 :Float32;
# Represents bearing accuracy in degrees. (presumably 1 sigma?)
bearingAccuracyDeg @11 :Float32;
# Represents velocity accuracy in m/s. (presumably 1 sigma?)
speedAccuracy @12 :Float32;
enum SensorSource {
android @0;
iOS @1;
car @2;
velodyne @3; # Velodyne IMU
fusion @4;
external @5;
ublox @6;
trimble @7;
}
}
struct CanData {
address @0 :UInt32;
busTime @1 :UInt16;
dat @2 :Data;
src @3 :UInt8;
}
struct DeviceState @0xa4d8b5af2aa492eb {
usbOnline @12 :Bool;
networkType @22 :NetworkType;
networkInfo @31 :NetworkInfo;
networkStrength @24 :NetworkStrength;
networkMetered @41 :Bool;
lastAthenaPingTime @32 :UInt64;
started @11 :Bool;
startedMonoTime @13 :UInt64;
# system utilization
freeSpacePercent @7 :Float32;
memoryUsagePercent @19 :Int8;
gpuUsagePercent @33 :Int8;
cpuUsagePercent @34 :List(Int8); # per-core cpu usage
# power
batteryPercent @8 :Int16;
batteryCurrent @15 :Int32;
chargingError @17 :Bool;
chargingDisabled @18 :Bool;
offroadPowerUsageUwh @23 :UInt32;
carBatteryCapacityUwh @25 :UInt32;
powerDrawW @40 :Float32;
# device thermals
cpuTempC @26 :List(Float32);
gpuTempC @27 :List(Float32);
memoryTempC @28 :Float32;
ambientTempC @30 :Float32;
nvmeTempC @35 :List(Float32);
modemTempC @36 :List(Float32);
pmicTempC @39 :List(Float32);
thermalZones @38 :List(ThermalZone);
thermalStatus @14 :ThermalStatus;
fanSpeedPercentDesired @10 :UInt16;
screenBrightnessPercent @37 :Int8;
struct ThermalZone {
name @0 :Text;
temp @1 :Float32;
}
enum ThermalStatus {
green @0;
yellow @1;
red @2;
danger @3;
}
enum NetworkType {
none @0;
wifi @1;
cell2G @2;
cell3G @3;
cell4G @4;
cell5G @5;
ethernet @6;
}
enum NetworkStrength {
unknown @0;
poor @1;
moderate @2;
good @3;
great @4;
}
struct NetworkInfo {
technology @0 :Text;
operator @1 :Text;
band @2 :Text;
channel @3 :UInt16;
extra @4 :Text;
state @5 :Text;
}
# deprecated
cpu0DEPRECATED @0 :UInt16;
cpu1DEPRECATED @1 :UInt16;
cpu2DEPRECATED @2 :UInt16;
cpu3DEPRECATED @3 :UInt16;
memDEPRECATED @4 :UInt16;
gpuDEPRECATED @5 :UInt16;
batDEPRECATED @6 :UInt32;
pa0DEPRECATED @21 :UInt16;
cpuUsagePercentDEPRECATED @20 :Int8;
batteryStatusDEPRECATED @9 :Text;
batteryVoltageDEPRECATED @16 :Int32;
batteryTempCDEPRECATED @29 :Float32;
}
struct PandaState @0xa7649e2575e4591e {
ignitionLine @2 :Bool;
controlsAllowed @3 :Bool;
gasInterceptorDetected @4 :Bool;
canSendErrs @7 :UInt32;
canFwdErrs @8 :UInt32;
canRxErrs @19 :UInt32;
gmlanSendErrs @9 :UInt32;
pandaType @10 :PandaType;
ignitionCan @13 :Bool;
safetyModel @14 :Car.CarParams.SafetyModel;
safetyParam @20 :Int16;
unsafeMode @23 :Int16;
faultStatus @15 :FaultStatus;
powerSaveEnabled @16 :Bool;
uptime @17 :UInt32;
faults @18 :List(FaultType);
harnessStatus @21 :HarnessStatus;
heartbeatLost @22 :Bool;
blockedCnt @24 :UInt32;
enum FaultStatus {
none @0;
faultTemp @1;
faultPerm @2;
}
enum FaultType {
relayMalfunction @0;
unusedInterruptHandled @1;
interruptRateCan1 @2;
interruptRateCan2 @3;
interruptRateCan3 @4;
interruptRateTach @5;
interruptRateGmlan @6;
interruptRateInterrupts @7;
interruptRateSpiDma @8;
interruptRateSpiCs @9;
interruptRateUart1 @10;
interruptRateUart2 @11;
interruptRateUart3 @12;
interruptRateUart5 @13;
interruptRateUartDma @14;
interruptRateUsb @15;
interruptRateTim1 @16;
interruptRateTim3 @17;
registerDivergent @18;
interruptRateKlineInit @19;
interruptRateClockSource @20;
interruptRateTick @21;
interruptRateExti @22;
# Update max fault type in boardd when adding faults
}
enum PandaType @0x8a58adf93e5b3751 {
unknown @0;
whitePanda @1;
greyPanda @2;
blackPanda @3;
pedal @4;
uno @5;
dos @6;
redPanda @7;
}
enum HarnessStatus {
notConnected @0;
normal @1;
flipped @2;
}
startedSignalDetectedDEPRECATED @5 :Bool;
voltageDEPRECATED @0 :UInt32;
currentDEPRECATED @1 :UInt32;
hasGpsDEPRECATED @6 :Bool;
fanSpeedRpmDEPRECATED @11 :UInt16;
usbPowerModeDEPRECATED @12 :PeripheralState.UsbPowerMode;
}
struct PeripheralState {
pandaType @0 :PandaState.PandaType;
voltage @1 :UInt32;
current @2 :UInt32;
fanSpeedRpm @3 :UInt16;
usbPowerMode @4 :UsbPowerMode;
enum UsbPowerMode @0xa8883583b32c9877 {
none @0;
client @1;
cdp @2;
dcp @3;
}
}
struct RadarState @0x9a185389d6fdd05f {
canMonoTimes @10 :List(UInt64);
mdMonoTime @6 :UInt64;
carStateMonoTime @11 :UInt64;
radarErrors @12 :List(Car.RadarData.Error);
leadOne @3 :LeadData;
leadTwo @4 :LeadData;
cumLagMs @5 :Float32;
struct LeadData {
dRel @0 :Float32;
yRel @1 :Float32;
vRel @2 :Float32;
aRel @3 :Float32;
vLead @4 :Float32;
dPath @6 :Float32;
vLat @7 :Float32;
vLeadK @8 :Float32;
aLeadK @9 :Float32;
fcw @10 :Bool;
status @11 :Bool;
aLeadTau @12 :Float32;
modelProb @13 :Float32;
radar @14 :Bool;
aLeadDEPRECATED @5 :Float32;
}
# deprecated
ftMonoTimeDEPRECATED @7 :UInt64;
warpMatrixDEPRECATED @0 :List(Float32);
angleOffsetDEPRECATED @1 :Float32;
calStatusDEPRECATED @2 :Int8;
calCycleDEPRECATED @8 :Int32;
calPercDEPRECATED @9 :Int8;
}
struct LiveCalibrationData {
calStatus @1 :Int8;
calCycle @2 :Int32;
calPerc @3 :Int8;
validBlocks @9 :Int32;
# view_frame_from_road_frame
# ui's is inversed needs new
extrinsicMatrix @4 :List(Float32);
# the direction of travel vector in device frame
rpyCalib @7 :List(Float32);
rpyCalibSpread @8 :List(Float32);
warpMatrixDEPRECATED @0 :List(Float32);
warpMatrix2DEPRECATED @5 :List(Float32);
warpMatrixBigDEPRECATED @6 :List(Float32);
}
struct LiveTracks {
trackId @0 :Int32;
dRel @1 :Float32;
yRel @2 :Float32;
vRel @3 :Float32;
aRel @4 :Float32;
timeStamp @5 :Float32;
status @6 :Float32;
currentTime @7 :Float32;
stationary @8 :Bool;
oncoming @9 :Bool;
}
struct ControlsState @0x97ff69c53601abf1 {
startMonoTime @48 :UInt64;
canMonoTimes @21 :List(UInt64);
longitudinalPlanMonoTime @28 :UInt64;
lateralPlanMonoTime @50 :UInt64;
state @31 :OpenpilotState;
enabled @19 :Bool;
active @36 :Bool;
longControlState @30 :Car.CarControl.Actuators.LongControlState;
vPid @2 :Float32;
vTargetLead @3 :Float32;
vCruise @22 :Float32;
upAccelCmd @4 :Float32;
uiAccelCmd @5 :Float32;
ufAccelCmd @33 :Float32;
aTarget @35 :Float32;
curvature @37 :Float32; # path curvature from vehicle model
forceDecel @51 :Bool;
# UI alerts
alertText1 @24 :Text;
alertText2 @25 :Text;
alertStatus @38 :AlertStatus;
alertSize @39 :AlertSize;
alertBlinkingRate @42 :Float32;
alertType @44 :Text;
alertSound @56 :Car.CarControl.HUDControl.AudibleAlert;
engageable @41 :Bool; # can OP be engaged?
cumLagMs @15 :Float32;
canErrorCounter @57 :UInt32;
lateralControlState :union {
indiState @52 :LateralINDIState;
pidState @53 :LateralPIDState;
lqrState @55 :LateralLQRState;
angleState @58 :LateralAngleState;
debugState @59 :LateralDebugState;
}
enum OpenpilotState @0xdbe58b96d2d1ac61 {
disabled @0;
preEnabled @1;
enabled @2;
softDisabling @3;
}
enum AlertStatus {
normal @0; # low priority alert for user's convenience
userPrompt @1; # mid priority alert that might require user intervention
critical @2; # high priority alert that needs immediate user intervention
}
enum AlertSize {
none @0; # don't display the alert
small @1; # small box
mid @2; # mid screen
full @3; # full screen
}
struct LateralINDIState {
active @0 :Bool;
steeringAngleDeg @1 :Float32;
steeringRateDeg @2 :Float32;
steeringAccelDeg @3 :Float32;
rateSetPoint @4 :Float32;
accelSetPoint @5 :Float32;
accelError @6 :Float32;
delayedOutput @7 :Float32;
delta @8 :Float32;
output @9 :Float32;
saturated @10 :Bool;
steeringAngleDesiredDeg @11 :Float32;
steeringRateDesiredDeg @12 :Float32;
}
struct LateralPIDState {
active @0 :Bool;
steeringAngleDeg @1 :Float32;
steeringRateDeg @2 :Float32;
angleError @3 :Float32;
p @4 :Float32;
i @5 :Float32;
f @6 :Float32;
output @7 :Float32;
saturated @8 :Bool;
steeringAngleDesiredDeg @9 :Float32;
}
struct LateralLQRState {
active @0 :Bool;
steeringAngleDeg @1 :Float32;
i @2 :Float32;
output @3 :Float32;
lqrOutput @4 :Float32;
saturated @5 :Bool;
steeringAngleDesiredDeg @6 :Float32;
}
struct LateralAngleState {
active @0 :Bool;
steeringAngleDeg @1 :Float32;
output @2 :Float32;
saturated @3 :Bool;
steeringAngleDesiredDeg @4 :Float32;
}
struct LateralDebugState {
active @0 :Bool;
steeringAngleDeg @1 :Float32;
output @2 :Float32;
saturated @3 :Bool;
}
# deprecated
vEgoDEPRECATED @0 :Float32;
vEgoRawDEPRECATED @32 :Float32;
aEgoDEPRECATED @1 :Float32;
canMonoTimeDEPRECATED @16 :UInt64;
radarStateMonoTimeDEPRECATED @17 :UInt64;
mdMonoTimeDEPRECATED @18 :UInt64;
yActualDEPRECATED @6 :Float32;
yDesDEPRECATED @7 :Float32;
upSteerDEPRECATED @8 :Float32;
uiSteerDEPRECATED @9 :Float32;
ufSteerDEPRECATED @34 :Float32;
aTargetMinDEPRECATED @10 :Float32;
aTargetMaxDEPRECATED @11 :Float32;
rearViewCamDEPRECATED @23 :Bool;
driverMonitoringOnDEPRECATED @43 :Bool;
hudLeadDEPRECATED @14 :Int32;
alertSoundDEPRECATED @45 :Text;
angleModelBiasDEPRECATED @27 :Float32;
gpsPlannerActiveDEPRECATED @40 :Bool;
decelForTurnDEPRECATED @47 :Bool;
decelForModelDEPRECATED @54 :Bool;
awarenessStatusDEPRECATED @26 :Float32;
angleSteersDEPRECATED @13 :Float32;
vCurvatureDEPRECATED @46 :Float32;
mapValidDEPRECATED @49 :Bool;
jerkFactorDEPRECATED @12 :Float32;
steerOverrideDEPRECATED @20 :Bool;
steeringAngleDesiredDegDEPRECATED @29 :Float32;
}
struct ModelDataV2 {
frameId @0 :UInt32;
frameIdExtra @20 :UInt32;
frameAge @1 :UInt32;
frameDropPerc @2 :Float32;
timestampEof @3 :UInt64;
modelExecutionTime @15 :Float32;
gpuExecutionTime @17 :Float32;
rawPredictions @16 :Data;
# predicted future position, orientation, etc..
position @4 :XYZTData;
orientation @5 :XYZTData;
velocity @6 :XYZTData;
orientationRate @7 :XYZTData;
acceleration @19 :XYZTData;
# prediction lanelines and road edges
laneLines @8 :List(XYZTData);
laneLineProbs @9 :List(Float32);
laneLineStds @13 :List(Float32);
roadEdges @10 :List(XYZTData);
roadEdgeStds @14 :List(Float32);
# predicted lead cars
leads @11 :List(LeadDataV2);
leadsV3 @18 :List(LeadDataV3);
meta @12 :MetaData;
# All SI units and in device frame
struct XYZTData {
x @0 :List(Float32);
y @1 :List(Float32);
z @2 :List(Float32);
t @3 :List(Float32);
xStd @4 :List(Float32);
yStd @5 :List(Float32);
zStd @6 :List(Float32);
}
struct LeadDataV2 {
prob @0 :Float32; # probability that car is your lead at time t
t @1 :Float32;
# x and y are relative position in device frame
# v is norm relative speed
# a is norm relative acceleration
xyva @2 :List(Float32);
xyvaStd @3 :List(Float32);
}
struct LeadDataV3 {
prob @0 :Float32; # probability that car is your lead at time t
probTime @1 :Float32;
t @2 :List(Float32);
# x and y are relative position in device frame
# v absolute norm speed
# a is derivative of v
x @3 :List(Float32);
xStd @4 :List(Float32);
y @5 :List(Float32);
yStd @6 :List(Float32);
v @7 :List(Float32);
vStd @8 :List(Float32);
a @9 :List(Float32);
aStd @10 :List(Float32);
}
struct MetaData {
engagedProb @0 :Float32;
desirePrediction @1 :List(Float32);
desireState @5 :List(Float32);
disengagePredictions @6 :DisengagePredictions;
hardBrakePredicted @7 :Bool;
# deprecated
brakeDisengageProbDEPRECATED @2 :Float32;
gasDisengageProbDEPRECATED @3 :Float32;
steerOverrideProbDEPRECATED @4 :Float32;
}
struct DisengagePredictions {
t @0 :List(Float32);
brakeDisengageProbs @1 :List(Float32);
gasDisengageProbs @2 :List(Float32);
steerOverrideProbs @3 :List(Float32);
brake3MetersPerSecondSquaredProbs @4 :List(Float32);
brake4MetersPerSecondSquaredProbs @5 :List(Float32);
brake5MetersPerSecondSquaredProbs @6 :List(Float32);
}
}
struct EncodeIndex {
# picture from camera
frameId @0 :UInt32;
type @1 :Type;
# index of encoder from start of route
encodeId @2 :UInt32;
# minute long segment this frame is in
segmentNum @3 :Int32;
# index into camera file in segment in presentation order
segmentId @4 :UInt32;
# index into camera file in segment in encode order
segmentIdEncode @5 :UInt32;
timestampSof @6 :UInt64;
timestampEof @7 :UInt64;
enum Type {
bigBoxLossless @0; # rcamera.mkv
fullHEVC @1; # fcamera.hevc
bigBoxHEVC @2; # bcamera.hevc
chffrAndroidH264 @3; # acamera
fullLosslessClip @4; # prcamera.mkv
front @5; # dcamera.hevc
}
}
struct AndroidLogEntry {
id @0 :UInt8;
ts @1 :UInt64;
priority @2 :UInt8;
pid @3 :Int32;
tid @4 :Int32;
tag @5 :Text;
message @6 :Text;
}
struct LongitudinalPlan @0xe00b5b3eba12876c {
modelMonoTime @9 :UInt64;
hasLead @7 :Bool;
fcw @8 :Bool;
longitudinalPlanSource @15 :LongitudinalPlanSource;
processingDelay @29 :Float32;
# desired speed/accel/jerk over next 2.5s
accels @32 :List(Float32);
speeds @33 :List(Float32);
jerks @34 :List(Float32);
solverExecutionTime @35 :Float32;
enum LongitudinalPlanSource {
cruise @0;
lead0 @1;
lead1 @2;
lead2 @3;
e2e @4;
}
# deprecated
vCruiseDEPRECATED @16 :Float32;
aCruiseDEPRECATED @17 :Float32;
vTargetDEPRECATED @3 :Float32;
vTargetFutureDEPRECATED @14 :Float32;
aTargetDEPRECATED @18 :Float32;
vStartDEPRECATED @26 :Float32;
aStartDEPRECATED @27 :Float32;
vMaxDEPRECATED @20 :Float32;
radarStateMonoTimeDEPRECATED @10 :UInt64;
jerkFactorDEPRECATED @6 :Float32;
hasLeftLaneDEPRECATED @23 :Bool;
hasRightLaneDEPRECATED @24 :Bool;
aTargetMinDEPRECATED @4 :Float32;
aTargetMaxDEPRECATED @5 :Float32;
lateralValidDEPRECATED @0 :Bool;
longitudinalValidDEPRECATED @2 :Bool;
dPolyDEPRECATED @1 :List(Float32);
laneWidthDEPRECATED @11 :Float32;
vCurvatureDEPRECATED @21 :Float32;
decelForTurnDEPRECATED @22 :Bool;
mapValidDEPRECATED @25 :Bool;
radarValidDEPRECATED @28 :Bool;
radarCanErrorDEPRECATED @30 :Bool;
commIssueDEPRECATED @31 :Bool;
eventsDEPRECATED @13 :List(Car.CarEvent);
gpsTrajectoryDEPRECATED @12 :GpsTrajectory;
gpsPlannerActiveDEPRECATED @19 :Bool;
struct GpsTrajectory {
x @0 :List(Float32);
y @1 :List(Float32);
}
}
struct LateralPlan @0xe1e9318e2ae8b51e {
laneWidth @0 :Float32;
lProb @5 :Float32;
rProb @7 :Float32;
dPathPoints @20 :List(Float32);
dProb @21 :Float32;
mpcSolutionValid @9 :Bool;
desire @17 :Desire;
laneChangeState @18 :LaneChangeState;
laneChangeDirection @19 :LaneChangeDirection;
useLaneLines @29 :Bool;
# desired curvatures over next 2.5s in rad/m
psis @26 :List(Float32);
curvatures @27 :List(Float32);
curvatureRates @28 :List(Float32);
solverExecutionTime @30 :Float32;
enum Desire {
none @0;
turnLeft @1;
turnRight @2;
laneChangeLeft @3;
laneChangeRight @4;
keepLeft @5;
keepRight @6;
}
enum LaneChangeState {
off @0;
preLaneChange @1;
laneChangeStarting @2;
laneChangeFinishing @3;
}
enum LaneChangeDirection {
none @0;
left @1;
right @2;
}
# deprecated
curvatureDEPRECATED @22 :Float32;
curvatureRateDEPRECATED @23 :Float32;
rawCurvatureDEPRECATED @24 :Float32;
rawCurvatureRateDEPRECATED @25 :Float32;
cProbDEPRECATED @3 :Float32;
dPolyDEPRECATED @1 :List(Float32);
cPolyDEPRECATED @2 :List(Float32);
lPolyDEPRECATED @4 :List(Float32);
rPolyDEPRECATED @6 :List(Float32);
modelValidDEPRECATED @12 :Bool;
commIssueDEPRECATED @15 :Bool;
posenetValidDEPRECATED @16 :Bool;
sensorValidDEPRECATED @14 :Bool;
paramsValidDEPRECATED @10 :Bool;
steeringAngleDegDEPRECATED @8 :Float32; # deg
steeringRateDegDEPRECATED @13 :Float32; # deg/s
angleOffsetDegDEPRECATED @11 :Float32;
}
struct LiveLocationKalman {
# More info on reference frames:
# https://github.com/commaai/openpilot/tree/master/common/transformations
positionECEF @0 : Measurement;
positionGeodetic @1 : Measurement;
velocityECEF @2 : Measurement;
velocityNED @3 : Measurement;
velocityDevice @4 : Measurement;
accelerationDevice @5: Measurement;
# These angles are all eulers and roll, pitch, yaw
# orientationECEF transforms to rot matrix: ecef_from_device
orientationECEF @6 : Measurement;
calibratedOrientationECEF @20 : Measurement;
orientationNED @7 : Measurement;
angularVelocityDevice @8 : Measurement;
# orientationNEDCalibrated transforms to rot matrix: NED_from_calibrated
calibratedOrientationNED @9 : Measurement;
# Calibrated frame is simply device frame
# aligned with the vehicle
velocityCalibrated @10 : Measurement;
accelerationCalibrated @11 : Measurement;
angularVelocityCalibrated @12 : Measurement;
gpsWeek @13 :Int32;
gpsTimeOfWeek @14 :Float64;
status @15 :Status;
unixTimestampMillis @16 :Int64;
posenetOK @18 :Bool = true;
gpsOK @19 :Bool = true;
sensorsOK @21 :Bool = true;
deviceStable @22 :Bool = true;
timeSinceReset @23 :Float64;
excessiveResets @24 :Bool;
enum Status {
uninitialized @0;
uncalibrated @1;
valid @2;
}
struct Measurement {
value @0 : List(Float64);
std @1 : List(Float64);
valid @2 : Bool;
}
# deprecated
inputsOKDEPRECATED @17 :Bool = true;
}
struct ProcLog {
cpuTimes @0 :List(CPUTimes);
mem @1 :Mem;