Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

merge changes #62

Merged
merged 20 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ lenv = {

"ACADOS_SOURCE_DIR": Dir("#third_party/acados/include/acados").abspath,
"ACADOS_PYTHON_INTERFACE_PATH": Dir("#pyextra/acados_template").abspath,
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer",
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer"
}

rpath = lenv["LD_LIBRARY_PATH"].copy()
Expand Down Expand Up @@ -112,6 +112,9 @@ else:

# MacOS
if arch == "Darwin":
if real_arch == "x86_64":
lenv["TERA_PATH"] = Dir("#").abspath + f"/third_party/acados/Darwin_x86_64/t_renderer"

brew_prefix = subprocess.check_output(['brew', '--prefix'], encoding='utf8').strip()
yuv_dir = "mac" if real_arch != "arm64" else "mac_arm64"
libpath = [
Expand All @@ -120,9 +123,13 @@ else:
f"{brew_prefix}/Library",
f"{brew_prefix}/opt/openssl/lib",
f"{brew_prefix}/Cellar",
f"#third_party/acados/{arch}/lib",
"/System/Library/Frameworks/OpenGL.framework/Libraries",
]
if real_arch == "x86_64":
libpath.append(f"#third_party/acados/Darwin_x86_64/lib")
else:
libpath.append(f"#third_party/acados/{arch}/lib")

cflags += ["-DGL_SILENCE_DEPRECATION"]
cxxflags += ["-DGL_SILENCE_DEPRECATION"]
cpppath += [
Expand Down
51 changes: 25 additions & 26 deletions cereal/car.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,7 @@ struct CarControl {
off @0;
pid @1;
stopping @2;

startingDEPRECATED @3;
starting @3;
}

}
Expand Down Expand Up @@ -449,6 +448,7 @@ struct CarParams {
enableApgs @6 :Bool; # advanced parking guidance system
enableBsm @56 :Bool; # blind spot monitoring
flags @64 :UInt32; # flags for car specific quirks
experimentalLongitudinalAvailable @71 :Bool;

minEnableSpeed @7 :Float32;
minSteerSpeed @8 :Float32;
Expand All @@ -458,14 +458,7 @@ struct CarParams {

# Car docs fields
maxLateralAccel @68 :Float32;
autoResumeSng @69 :Bool; # describes whether car can resume from a stop automatically

steerMaxBPDEPRECATED @11 :List(Float32);
steerMaxVDEPRECATED @12 :List(Float32);
gasMaxBPDEPRECATED @13 :List(Float32);
gasMaxVDEPRECATED @14 :List(Float32);
brakeMaxBPDEPRECATED @15 :List(Float32);
brakeMaxVDEPRECATED @16 :List(Float32);
autoResumeSng @69 :Bool; # describes whether car can resume from a stop automatically

# things about the car in the manual
mass @17 :Float32; # [kg] curb weight: all fluids no cargo
Expand Down Expand Up @@ -494,11 +487,13 @@ struct CarParams {
vEgoStopping @29 :Float32; # Speed at which the car goes into stopping state
vEgoStarting @59 :Float32; # Speed at which the car goes into starting state
directAccelControl @30 :Bool; # Does the car have direct accel control or just gas/brake
stoppingControl @31 :Bool; # Does the car allows full control even at lows speeds when stopping
stopAccel @60 :Float32; # Required acceleration to keep vehicle stationary
stoppingControl @31 :Bool; # Does the car allow full control even at lows speeds when stopping
steerControlType @34 :SteerControlType;
radarOffCan @35 :Bool; # True when radar objects aren't visible on CAN
stopAccel @60 :Float32; # Required acceleration to keep vehicle stationary
stoppingDecelRate @52 :Float32; # m/s^2/s while trying to stop
startAccel @32 :Float32; # Required acceleration to get car moving
startingState @70 :Bool; # Does this car make use of special starting state

steerActuatorDelay @36 :Float32; # Steering wheel actuator delay in seconds
longitudinalActuatorDelayLowerBound @61 :Float32; # Gas/Brake actuator delay in seconds, lower bound
Expand All @@ -522,18 +517,17 @@ struct CarParams {
safetyParam2DEPRECATED @2 :UInt32;
}

mdpsBus @70: Int8;
sasBus @71: Int8;
sccBus @72: Int8;
enableAutoHold @73 :Bool;
hasScc13 @74 :Bool;
hasScc14 @75 :Bool;
hasEms @76 :Bool;
hasLfaHda @77 :Bool;
steerFaultMaxAngle @78 :Int16;
steerFaultMaxFrames @79 :Int16;

disableLateralLiveTuning @80 :Bool;
mdpsBus @72: Int8;
sasBus @73: Int8;
sccBus @74: Int8;
enableAutoHold @75 :Bool;
hasScc13 @76 :Bool;
hasScc14 @77 :Bool;
hasEms @78 :Bool;
hasLfaHda @79 :Bool;
steerFaultMaxAngle @80 :Int16;
steerFaultMaxFrames @81 :Int16;
disableLateralLiveTuning @82 :Bool;

struct LateralParams {
torqueBP @0 :List(Int32);
Expand Down Expand Up @@ -658,7 +652,7 @@ struct CarParams {

enum Ecu {
eps @0;
esp @1;
abs @1;
fwdRadar @2;
fwdCamera @3;
engine @4;
Expand Down Expand Up @@ -704,7 +698,12 @@ struct CarParams {
safetyModelDEPRECATED @9 :SafetyModel;
safetyModelPassiveDEPRECATED @42 :SafetyModel = silent;
minSpeedCanDEPRECATED @51 :Float32;
startAccelDEPRECATED @32 :Float32;
communityFeatureDEPRECATED @46: Bool;
startingAccelRateDEPRECATED @53 :Float32;
steerMaxBPDEPRECATED @11 :List(Float32);
steerMaxVDEPRECATED @12 :List(Float32);
gasMaxBPDEPRECATED @13 :List(Float32);
gasMaxVDEPRECATED @14 :List(Float32);
brakeMaxBPDEPRECATED @15 :List(Float32);
brakeMaxVDEPRECATED @16 :List(Float32);
}
13 changes: 4 additions & 9 deletions cereal/log.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -1901,15 +1901,10 @@ struct RoadLimitSpeed {
camLimitSpeed @5 :Int16;
sectionLimitSpeed @6 :Int16;
sectionLeftDist @7 :Int16;
camSpeedFactor @8 :Float32;
restArea @9 :List(RestArea);

struct RestArea {
image @0 :Text;
title @1 :Text;
oilPrice @2 :Text;
distance @3 :Text;
}
sectionAvgSpeed @8 :Int16;
sectionLeftTime @9 :Int16;
sectionAdjustSpeed @10 :Bool;
camSpeedFactor @11 :Float32;
}

struct Event {
Expand Down
4 changes: 2 additions & 2 deletions common/params.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"CarBatteryCapacity", PERSISTENT},
{"CarParams", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
{"CarParamsCache", CLEAR_ON_MANAGER_START},
{"CarParamsPersistent", PERSISTENT},
{"CarVin", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
{"CompletedTrainingVersion", PERSISTENT},
{"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
Expand All @@ -101,8 +102,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
{"DisablePowerDown", PERSISTENT},
{"EndToEndLong", PERSISTENT},
{"DisableRadar_Allow", PERSISTENT},
{"DisableRadar", PERSISTENT}, // WARNING: THIS DISABLES AEB
{"ExperimentalLongitudinalEnabled", PERSISTENT}, // WARNING: THIS MAY DISABLE AEB
{"DisableUpdates", PERSISTENT},
{"DisengageOnAccelerator", PERSISTENT},
{"DongleId", PERSISTENT},
Expand Down
Loading