mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-01 21:53:42 +08:00
FrogPilot 0.9.7
This commit is contained in:
+51
-3
@@ -84,6 +84,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
startup @75;
|
||||
startupNoCar @76;
|
||||
startupNoControl @77;
|
||||
startupNoSecOcKey @121;
|
||||
startupMaster @78;
|
||||
startupNoFw @104;
|
||||
fcw @79;
|
||||
@@ -118,7 +119,35 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
actuatorsApiUnavailable @120;
|
||||
|
||||
# FrogPilot Events
|
||||
pedalInterceptorNoBrake @134;
|
||||
accel30 @122;
|
||||
accel35 @123;
|
||||
accel40 @124;
|
||||
blockUser @125;
|
||||
customStartupAlert @126;
|
||||
dejaVuCurve @127;
|
||||
firefoxSteerSaturated @128;
|
||||
forcingStop @129;
|
||||
goatSteerSaturated @130;
|
||||
greenLight @131;
|
||||
hal9000 @132;
|
||||
holidayActive @133;
|
||||
laneChangeBlockedLoud @134;
|
||||
leadDeparting @135;
|
||||
noLaneAvailable @136;
|
||||
openpilotCrashed @137;
|
||||
openpilotCrashedRandomEvent @138;
|
||||
pedalInterceptorNoBrake @139;
|
||||
speedLimitChanged @140;
|
||||
thisIsFineSteerSaturated @141;
|
||||
toBeContinued @142;
|
||||
torqueNNLoad @143;
|
||||
trafficModeActive @144;
|
||||
trafficModeInactive @145;
|
||||
turningLeft @146;
|
||||
turningRight @147;
|
||||
vCruise69 @148;
|
||||
yourFrogTriedToKillMe @149;
|
||||
youveGotMail @150;
|
||||
|
||||
radarCanErrorDEPRECATED @15;
|
||||
communityFeatureDisallowedDEPRECATED @62;
|
||||
@@ -415,6 +444,22 @@ struct CarControl {
|
||||
prompt @6;
|
||||
promptRepeat @7;
|
||||
promptDistracted @8;
|
||||
|
||||
# FrogPilot sounds
|
||||
angry @9;
|
||||
continued @10;
|
||||
dejaVu @11;
|
||||
doc @12;
|
||||
fart @13;
|
||||
firefox @14;
|
||||
goat @15;
|
||||
hal9000 @16;
|
||||
mail @17;
|
||||
nessie @18;
|
||||
noice @19;
|
||||
startup @20;
|
||||
thisIsFine @21;
|
||||
uwu @22;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,6 +552,9 @@ struct CarParams {
|
||||
|
||||
wheelSpeedFactor @63 :Float32; # Multiplier on wheels speeds to computer actual speeds
|
||||
|
||||
secOcRequired @74 :Bool; # Car requires SecOC message authentication to operate
|
||||
secOcKeyAvailable @75 :Bool; # Stored SecOC key loaded from params
|
||||
|
||||
struct SafetyConfig {
|
||||
safetyModel @0 :SafetyModel;
|
||||
safetyParam @3 :UInt16;
|
||||
@@ -544,8 +592,8 @@ struct CarParams {
|
||||
kiBP @2 :List(Float32);
|
||||
kiV @3 :List(Float32);
|
||||
kf @6 :Float32;
|
||||
deadzoneBPDEPRECATED @4 :List(Float32);
|
||||
deadzoneVDEPRECATED @5 :List(Float32);
|
||||
deadzoneBP @4 :List(Float32);
|
||||
deadzoneV @5 :List(Float32);
|
||||
}
|
||||
|
||||
struct LateralINDITuning {
|
||||
|
||||
+63
-5
@@ -1,6 +1,8 @@
|
||||
using Cxx = import "./include/c++.capnp";
|
||||
$Cxx.namespace("cereal");
|
||||
|
||||
using Car = import "car.capnp";
|
||||
|
||||
@0xb526ba661d550a59;
|
||||
|
||||
# custom.capnp: a home for empty structs reserved for custom forks
|
||||
@@ -8,19 +10,75 @@ $Cxx.namespace("cereal");
|
||||
# cereal, so use these if you want custom events in your fork.
|
||||
|
||||
# you can rename the struct, but don't change the identifier
|
||||
struct CustomReserved0 @0x81c2f05a394cf4af {
|
||||
struct FrogPilotCarControl @0x81c2f05a394cf4af {
|
||||
accelPressed @0 :Bool;
|
||||
alwaysOnLateralActive @1 :Bool;
|
||||
decelPressed @2 :Bool;
|
||||
fcwEventTriggered @3 :Bool;
|
||||
noEntryEventTriggered @4 :Bool;
|
||||
steerSaturatedEventTriggered @5 :Bool;
|
||||
}
|
||||
|
||||
struct CustomReserved1 @0xaedffd8f31e7b55d {
|
||||
struct FrogPilotCarState @0xaedffd8f31e7b55d {
|
||||
struct ButtonEvent {
|
||||
enum Type {
|
||||
lkas @0;
|
||||
}
|
||||
}
|
||||
|
||||
alwaysOnLateralDisabled @0 :Bool;
|
||||
brakeLights @1 :Bool;
|
||||
dashboardSpeedLimit @2 :Float32;
|
||||
distanceLongPressed @3 :Bool;
|
||||
ecoGear @4 :Bool;
|
||||
hasMenu @5 :Bool;
|
||||
sportGear @6 :Bool;
|
||||
trafficModeActive @7 :Bool;
|
||||
}
|
||||
|
||||
struct CustomReserved2 @0xf35cc4560bbf6ec2 {
|
||||
struct FrogPilotDeviceState @0xf35cc4560bbf6ec2 {
|
||||
freeSpace @0 :Int16;
|
||||
usedSpace @1 :Int16;
|
||||
}
|
||||
|
||||
struct CustomReserved3 @0xda96579883444c35 {
|
||||
struct FrogPilotNavigation @0xda96579883444c35 {
|
||||
approachingIntersection @0 :Bool;
|
||||
approachingTurn @1 :Bool;
|
||||
navigationSpeedLimit @2 :Float32;
|
||||
}
|
||||
|
||||
struct CustomReserved4 @0x80ae746ee2596b11 {
|
||||
struct FrogPilotPlan @0x80ae746ee2596b11 {
|
||||
accelerationJerk @0 :Float32;
|
||||
accelerationJerkStock @1 :Float32;
|
||||
dangerJerk @2 :Float32;
|
||||
desiredFollowDistance @3 :Int64;
|
||||
experimentalMode @4 :Bool;
|
||||
forcingStop @5 :Bool;
|
||||
forcingStopLength @6 :Float32;
|
||||
frogpilotEvents @7 :List(Car.CarEvent);
|
||||
lateralCheck @8 :Bool;
|
||||
laneWidthLeft @9 :Float32;
|
||||
laneWidthRight @10 :Float32;
|
||||
maxAcceleration @11 :Float32;
|
||||
minAcceleration @12 :Float32;
|
||||
mtscSpeed @13 :Float32;
|
||||
redLight @14 :Bool;
|
||||
slcMapSpeedLimit @15 :Float32;
|
||||
slcOverridden @16 :Bool;
|
||||
slcOverriddenSpeed @17 :Float32;
|
||||
slcSpeedLimit @18 :Float32;
|
||||
slcSpeedLimitOffset @19 :Float32;
|
||||
slcSpeedLimitSource @20 :Text;
|
||||
speedJerk @21 :Float32;
|
||||
speedJerkStock @22 :Float32;
|
||||
speedLimitChanged @23 :Bool;
|
||||
tFollow @24 :Float32;
|
||||
togglesUpdated @25 :Bool;
|
||||
unconfirmedSlcSpeedLimit @26 :Float32;
|
||||
upcomingSLCSpeedLimit @27 :Float32;
|
||||
vCruise @28 :Float32;
|
||||
vtscControllingCurve @29 :Bool;
|
||||
vtscSpeed @30 :Float32;
|
||||
}
|
||||
|
||||
struct CustomReserved5 @0xa5cd762cd951a455 {
|
||||
|
||||
+58
-9
@@ -335,6 +335,12 @@ enum LaneChangeDirection {
|
||||
right @2;
|
||||
}
|
||||
|
||||
enum TurnDirection {
|
||||
none @0;
|
||||
turnLeft @1;
|
||||
turnRight @2;
|
||||
}
|
||||
|
||||
struct CanData {
|
||||
address @0 :UInt32;
|
||||
busTime @1 :UInt16;
|
||||
@@ -612,6 +618,10 @@ struct RadarState @0x9a185389d6fdd05f {
|
||||
|
||||
leadOne @3 :LeadData;
|
||||
leadTwo @4 :LeadData;
|
||||
leadLeft @13 :LeadData;
|
||||
leadRight @14 :LeadData;
|
||||
leadLeftFar @15 :LeadData;
|
||||
leadRightFar @16 :LeadData;
|
||||
cumLagMs @5 :Float32;
|
||||
|
||||
struct LeadData {
|
||||
@@ -698,6 +708,7 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
personality @66 :LongitudinalPersonality;
|
||||
|
||||
longControlState @30 :Car.CarControl.Actuators.LongControlState;
|
||||
vPid @2 :Float32;
|
||||
vTargetLead @3 :Float32;
|
||||
vCruise @22 :Float32; # actual set speed
|
||||
vCruiseCluster @63 :Float32; # set speed to display in the UI
|
||||
@@ -744,6 +755,7 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
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
|
||||
frogpilot @3; # FrogPilot startup alert
|
||||
}
|
||||
|
||||
enum AlertSize {
|
||||
@@ -794,6 +806,7 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
saturated @7 :Bool;
|
||||
actualLateralAccel @9 :Float32;
|
||||
desiredLateralAccel @10 :Float32;
|
||||
nnLog @11 :List(Float32);
|
||||
}
|
||||
|
||||
struct LateralLQRState {
|
||||
@@ -865,7 +878,39 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
canMonoTimesDEPRECATED @21 :List(UInt64);
|
||||
desiredCurvatureRateDEPRECATED @62 :Float32;
|
||||
canErrorCounterDEPRECATED @57 :UInt32;
|
||||
vPidDEPRECATED @2 :Float32;
|
||||
}
|
||||
|
||||
struct DrivingModelData {
|
||||
frameId @0 :UInt32;
|
||||
frameIdExtra @1 :UInt32;
|
||||
frameDropPerc @6 :Float32;
|
||||
modelExecutionTime @7 :Float32;
|
||||
|
||||
action @2 :ModelDataV2.Action;
|
||||
|
||||
laneLineMeta @3 :LaneLineMeta;
|
||||
meta @4 :MetaData;
|
||||
|
||||
path @5 :PolyPath;
|
||||
|
||||
struct PolyPath {
|
||||
xCoefficients @0 :List(Float32);
|
||||
yCoefficients @1 :List(Float32);
|
||||
zCoefficients @2 :List(Float32);
|
||||
}
|
||||
|
||||
struct LaneLineMeta {
|
||||
leftY @0 :Float32;
|
||||
rightY @1 :Float32;
|
||||
leftProb @2 :Float32;
|
||||
rightProb @3 :Float32;
|
||||
}
|
||||
|
||||
struct MetaData {
|
||||
laneChangeState @0 :LaneChangeState;
|
||||
laneChangeDirection @1 :LaneChangeDirection;
|
||||
turnDirection @2 :TurnDirection;
|
||||
}
|
||||
}
|
||||
|
||||
# All SI units and in device frame
|
||||
@@ -913,8 +958,8 @@ struct ModelDataV2 {
|
||||
# Model perceived motion
|
||||
temporalPose @21 :Pose;
|
||||
|
||||
navEnabledDEPRECATED @22 :Bool;
|
||||
locationMonoTimeDEPRECATED @24 :UInt64;
|
||||
navEnabled @22 :Bool;
|
||||
locationMonoTime @24 :UInt64;
|
||||
|
||||
# e2e lateral planner
|
||||
lateralPlannerSolutionDEPRECATED @25: LateralPlannerSolution;
|
||||
@@ -958,6 +1003,7 @@ struct ModelDataV2 {
|
||||
hardBrakePredicted @7 :Bool;
|
||||
laneChangeState @8 :LaneChangeState;
|
||||
laneChangeDirection @9 :LaneChangeDirection;
|
||||
turnDirection @10 :TurnDirection;
|
||||
|
||||
|
||||
# deprecated
|
||||
@@ -980,6 +1026,8 @@ struct ModelDataV2 {
|
||||
brake3MetersPerSecondSquaredProbs @4 :List(Float32);
|
||||
brake4MetersPerSecondSquaredProbs @5 :List(Float32);
|
||||
brake5MetersPerSecondSquaredProbs @6 :List(Float32);
|
||||
gasPressProbs @7 :List(Float32);
|
||||
brakePressProbs @8 :List(Float32);
|
||||
}
|
||||
|
||||
struct Pose {
|
||||
@@ -2264,6 +2312,7 @@ struct Event {
|
||||
driverMonitoringState @71: DriverMonitoringState;
|
||||
liveLocationKalman @72 :LiveLocationKalman;
|
||||
modelV2 @75 :ModelDataV2;
|
||||
drivingModelData @128 :DrivingModelData;
|
||||
driverStateV2 @92 :DriverStateV2;
|
||||
|
||||
# camera stuff, each camera state has a matching encode idx
|
||||
@@ -2318,11 +2367,11 @@ struct Event {
|
||||
customReservedRawData2 @126 :Data;
|
||||
|
||||
# *********** Custom: reserved for forks ***********
|
||||
customReserved0 @107 :Custom.CustomReserved0;
|
||||
customReserved1 @108 :Custom.CustomReserved1;
|
||||
customReserved2 @109 :Custom.CustomReserved2;
|
||||
customReserved3 @110 :Custom.CustomReserved3;
|
||||
customReserved4 @111 :Custom.CustomReserved4;
|
||||
frogpilotCarControl @107 :Custom.FrogPilotCarControl;
|
||||
frogpilotCarState @108 :Custom.FrogPilotCarState;
|
||||
frogpilotDeviceState @109 :Custom.FrogPilotDeviceState;
|
||||
frogpilotNavigation @110 :Custom.FrogPilotNavigation;
|
||||
frogpilotPlan @111 :Custom.FrogPilotPlan;
|
||||
customReserved5 @112 :Custom.CustomReserved5;
|
||||
customReserved6 @113 :Custom.CustomReserved6;
|
||||
customReserved7 @114 :Custom.CustomReserved7;
|
||||
@@ -2368,6 +2417,6 @@ struct Event {
|
||||
driverStateDEPRECATED @59 :DriverStateDEPRECATED;
|
||||
sensorEventsDEPRECATED @11 :List(SensorEventData);
|
||||
lateralPlanDEPRECATED @64 :LateralPlan;
|
||||
navModelDEPRECATED @104 :NavModelData;
|
||||
navModel @104 :NavModelData;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,12 +60,15 @@ _services: dict[str, tuple] = {
|
||||
"driverMonitoringState": (True, 20., 10),
|
||||
"wideRoadEncodeIdx": (False, 20., 1),
|
||||
"wideRoadCameraState": (True, 20., 20),
|
||||
"drivingModelData": (True, 20., 10),
|
||||
"modelV2": (True, 20., 40),
|
||||
"managerState": (True, 2., 1),
|
||||
"uploaderState": (True, 0., 1),
|
||||
"navInstruction": (True, 1., 10),
|
||||
"navRoute": (True, 0.),
|
||||
"navThumbnail": (True, 0.),
|
||||
"navModel": (True, 2., 4.),
|
||||
"mapRenderState": (True, 2., 1.),
|
||||
"uiPlan": (True, 20., 40.),
|
||||
"qRoadEncodeIdx": (False, 20.),
|
||||
"userFlag": (True, 0., 1),
|
||||
@@ -87,6 +90,13 @@ _services: dict[str, tuple] = {
|
||||
"customReservedRawData0": (True, 0.),
|
||||
"customReservedRawData1": (True, 0.),
|
||||
"customReservedRawData2": (True, 0.),
|
||||
|
||||
# FrogPilot
|
||||
"frogpilotCarControl": (True, 100., 10),
|
||||
"frogpilotCarState": (True, 100., 10),
|
||||
"frogpilotDeviceState": (True, 2., 1),
|
||||
"frogpilotNavigation": (True, 1., 10),
|
||||
"frogpilotPlan": (True, 20., 5),
|
||||
}
|
||||
SERVICE_LIST = {name: Service(*vals) for
|
||||
idx, (name, vals) in enumerate(_services.items())}
|
||||
|
||||
Reference in New Issue
Block a user