Skip to content

Commit

Permalink
0.6.2.6 (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmertex authored Aug 8, 2019
1 parent 5039226 commit fc7e323
Show file tree
Hide file tree
Showing 218 changed files with 13,741 additions and 10,889 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ selfdrive/proclogd/proclogd
selfdrive/ui/ui
selfdrive/test/tests/plant/out
selfdrive/visiond/visiond
selfdrive/loggerd/loggerd
selfdrive/sensord/gpsd
selfdrive/sensord/sensord
/src/

one
Expand Down
5 changes: 5 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ fastcluster = "==1.1.25"
backports-abc = "*"
pygame = "*"
simplejson = "*"
python-logstash-async = "*"
pandas = "*"
seaborn = "*"
tensorflow-estimator = "==1.10.12"
pyproj = "*"

[packages]
overpy = {git = "https://github.com/commaai/python-overpy.git",ref = "f86529af402d4642e1faeb146671c40284007323"}
Expand Down
731 changes: 404 additions & 327 deletions Pipfile.lock

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ Supported Cars

| Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below | Giraffe |
| ---------------------| -------------------------| ---------------------| --------| ---------------| -----------------| ---------------|-------------------|
| Acura | ILX 2016-17 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph | Nidec |
| Acura | RDX 2018 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
| Acura | ILX 2016-18 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph | Nidec |
| Acura | RDX 2016-18 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
| Buick<sup>3</sup> | Regal 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Chevrolet<sup>3</sup>| Malibu 2017 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Chevrolet<sup>3</sup>| Volt 2017-18 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Cadillac<sup>3</sup> | ATS 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Chrysler | Pacifica 2018 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
| Chrysler | Pacifica 2017-18 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
| Chrysler | Pacifica Hybrid 2017-18 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
| Chrysler | Pacifica Hybrid 2019 | Adaptive Cruise | Yes | Stock | 0mph | 39mph | FCA |
| GMC<sup>3</sup> | Acadia Denali 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Holden<sup>3</sup> | Astra 2017 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Honda | Accord 2018 | All | Yes | Stock | 0mph | 3mph | Bosch |
| Honda | Accord 2018-19 | All | Yes | Stock | 0mph | 3mph | Bosch |
| Honda | Civic Sedan/Coupe 2016-18| Honda Sensing | Yes | Yes | 0mph | 12mph | Nidec |
| Honda | Civic Sedan/Coupe 2019 | Honda Sensing | Yes | Stock | 0mph | 2mph | Bosch |
| Honda | Civic Hatchback 2017-19 | Honda Sensing | Yes | Stock | 0mph | 12mph | Bosch |
Expand All @@ -84,9 +84,9 @@ Supported Cars
| Honda | Pilot 2019 | All | Yes | Yes | 25mph<sup>1</sup>| 12mph | Inverted Nidec |
| Honda | Ridgeline 2017-19 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph | Nidec |
| Hyundai | Santa Fe 2019 | All | Yes | Stock | 0mph | 0mph | Custom<sup>6</sup>|
| Hyundai | Elantra 2017 | SCC + LKAS | Yes | Stock | 19mph | 34mph | Custom<sup>6</sup>|
| Hyundai | Elantra 2017-19 | SCC + LKAS | Yes | Stock | 19mph | 34mph | Custom<sup>6</sup>|
| Hyundai | Genesis 2018 | All | Yes | Stock | 19mph | 34mph | Custom<sup>6</sup>|
| Jeep | Grand Cherokee 2017-18 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
| Jeep | Grand Cherokee 2016-18 | Adaptive Cruise | Yes | Stock | 0mph | 9mph | FCA |
| Jeep | Grand Cherokee 2019 | Adaptive Cruise | Yes | Stock | 0mph | 39mph | FCA |
| Kia | Optima 2019 | SCC + LKAS | Yes | Stock | 0mph | 0mph | Custom<sup>6</sup>|
| Kia | Sorento 2018 | All | Yes | Stock | 0mph | 0mph | Custom<sup>6</sup>|
Expand All @@ -96,12 +96,13 @@ Supported Cars
| Subaru | Crosstrek 2018 | EyeSight | Yes | Stock | 0mph | 0mph | Custom<sup>4</sup>|
| Subaru | Impreza 2019 | EyeSight | Yes | Stock | 0mph | 0mph | Custom<sup>4</sup>|
| Toyota | Avalon 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Camry 2018 | All | Yes | Stock | 0mph<sup>5</sup> | 0mph | Toyota |
| Toyota | C-HR 2017-18 | All | Yes | Stock | 0mph | 0mph | Toyota |
| Toyota | Avalon 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Camry 2018-19 | All | Yes | Stock | 0mph<sup>5</sup> | 0mph | Toyota |
| Toyota | C-HR 2017-19 | All | Yes | Stock | 0mph | 0mph | Toyota |
| Toyota | Corolla 2017-19 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Corolla 2020 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Corolla Hatchback 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Highlander 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Highlander 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Highlander Hybrid 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Prius 2016 | TSS-P | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Prius 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
Expand All @@ -110,6 +111,7 @@ Supported Cars
| Toyota | Rav4 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Rav4 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Rav4 Hybrid 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Sienna 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |

<sup>1</sup>[Comma Pedal](https://community.comma.ai/wiki/index.php/Comma_Pedal) is used to provide stop-and-go capability to some of the openpilot-supported cars that don't currently support stop-and-go. Here is how to [build a Comma Pedal](https://medium.com/@jfrux/comma-pedal-building-with-macrofab-6328bea791e8). ***NOTE: The Comma Pedal is not officially supported by [comma.ai](https://comma.ai).*** <br />
<sup>2</sup>When disconnecting the Driver Support Unit (DSU), otherwise longitudinal control is stock ACC. For DSU locations, see [Toyota Wiki page](https://community.comma.ai/wiki/index.php/Toyota). <br />
Expand Down
97 changes: 67 additions & 30 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,81 @@
Version 0.6.0.4-ku7 (2019-07-**)
Version 0.6.2.6-ku7 (2019-08)
========================
* HKG - Log to cloudlog rather than print to stdout
* HKG - WIP: mapd is going to need a lot of reworking
* HKG - Forward LKAS_Icon (not really an icon)
* HKG - Disengage Properly
* HKG - Fixed Brute Force Checksum Learner
* HKG - Detect Genesis and default min speed
* HLG - Fix Min Speed Code
* Merged in 0.6.2
* HKG - Fixed Panda, but no PUF yet
* HKG - Do not let Stock LKAS engage (@xx979xx)
* HKG - Reinstate CLU11
* HKG - Change S&G Resume as per @xx979xx changes
* HKG - Remove pcm_cancel_cmd to (hopefully) rectify SCC dash errors

Version 0.6.2 (2019-07-29)
========================
* New driving model!
* Improve lane tracking with double lines
* Strongly improve stationary vehicle detection
* Strongly reduce cases of braking due to false leads
* Better lead tracking around turns
* Improve cut-in prediction by using neural network
* Improve lateral control on Toyota Camry and C-HR thanks to zorrobyte!
* Fix unintended openpilot disengagements on Jeep thanks to adhintz!
* Fix delayed transition to offroad when car is turned off

Version 0.6.1 (2019-07-21)
========================
* Remote SSH with comma prime and [ssh.comma.ai](https://ssh.comma.ai)
* Panda code Misra-c2012 compliance, tested against cppcheck coverage
* Lockout openpilot after 3 terminal alerts for driver distracted or unresponsive
* Toyota Sienna support thanks to wocsor!

Version 0.6.0.5-ku7 (2019-08-**) ---- never publically released
========================
* HKG - Improve Min Speed
* HKG - Support Genesis (@xx979xx)

Version 0.6.0.4-ku7 (2019-08-06)
========================
* HKG - Log to cloudlog rather than print to stdout
* HKG - WIP: mapd is going to need a lot of reworking
* HKG - Forward LKAS_Icon (not really an icon)
* HKG - Disengage Properly
* HKG - Fixed Brute Force Checksum Learner
* HKG - Detect Genesis and default min speed
* HKG - Fix Min Speed Code
* HKG - Change Down Rate (@TK211X)
* HKG - Temporarily remove CLU11 (@TK211X)

Version 0.6.0.3-ku7 (2019-07-09)
========================
* HKG - Send fingerprints to Sentry
* HKG - WIP: bring back mapd from 0.5.12
* HKG - WIP: Auto Set Cruise to Speed Limit
* HKG - Don't Learn Min Steer Speed when turning corners
* HKG - Create MDPS12 Message (to reduce/stop Stock cam faults)
* HKG - Implement Min Speed Speed Warning
* HKG - Send fingerprints to Sentry
* HKG - WIP: bring back mapd from 0.5.12
* HKG - WIP: Auto Set Cruise to Speed Limit
* HKG - Don't Learn Min Steer Speed when turning corners
* HKG - Create MDPS12 Message (to reduce/stop Stock cam faults)
* HKG - Implement Min Speed Speed Warning

Version 0.6.0.2-ku7 (2019-07-08)
========================
* HKG - Auto Discover Checksum if LKAS11 Message not present
* HKG - Disable Torque on Lane Change
* HKG - Auto Learn Min Steer Speed Cutoff
* HKG - Disable during Min Steer Speed, where min speed is learnt
* HKG - Improve Support, maybe even Genesis
* HKG - Clean up redundant code, remove last "Fingerprint" stuff
* HKG - Add Sentry Crash Reporting
* HKG - PUF is back, Auto Forward CAM/CAR when EON is not active
* HKG - Hopefully a better attempt at "Remove remnants of CP UI"
* HKG - Auto Discover Checksum if LKAS11 Message not present
* HKG - Disable Torque on Lane Change
* HKG - Auto Learn Min Steer Speed Cutoff
* HKG - Disable during Min Steer Speed, where min speed is learnt
* HKG - Improve Support, maybe even Genesis
* HKG - Clean up redundant code, remove last "Fingerprint" stuff
* HKG - Add Sentry Crash Reporting
* HKG - PUF is back, Auto Forward CAM/CAR when EON is not active
* HKG - Hopefully a better attempt at "Remove remnants of CP UI"

Version 0.6.0.1-ku7 (2019-07-05)
========================
* HKG - Auto Support Cars with all 3 Gear Selector Types
* HKG - Auto Support Cars with no SCC
* HKG - Auto Learn Checksum from LKAS11
* HKG - Do not diable on Accelerator or Brake
* HKG - Removed Fingerprint Requiement
* HKG - Removed Noisy Console/Logs
* HKG - Remove remnants of CP UI
* HKG - Auto Support Cars with all 3 Gear Selector Types
* HKG - Auto Support Cars with no SCC
* HKG - Auto Learn Checksum from LKAS11
* HKG - Do not diable on Accelerator or Brake
* HKG - Removed Fingerprint Requiement
* HKG - Removed Noisy Console/Logs
* HKG - Remove remnants of CP UI




Version 0.6 (2019-07-01)
========================
Expand Down
Binary file modified apk/ai.comma.plus.offroad.apk
Binary file not shown.
18 changes: 18 additions & 0 deletions cereal/car.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ struct CarEvent @0x9b1657f34caf3ad3 {
controlsFailed @51;
sensorDataInvalid @52;
commIssue @53;
tooDistracted @54;
posenetInvalid @55;
}
}

Expand Down Expand Up @@ -322,6 +324,7 @@ struct CarParams {
lateralTuning :union {
pid @26 :LateralPIDTuning;
indi @27 :LateralINDITuning;
lqr @40 :LateralLQRTuning;
}

steerLimitAlert @28 :Bool;
Expand All @@ -337,6 +340,7 @@ struct CarParams {
steerActuatorDelay @36 :Float32; # Steering wheel actuator delay in seconds
openpilotLongitudinalControl @37 :Bool; # is openpilot doing the longitudinal control?
carVin @38 :Text; # VIN number queried during fingerprinting
isPandaBlack @39: Bool;

struct LateralPIDTuning {
kpBP @0 :List(Float32);
Expand All @@ -363,6 +367,20 @@ struct CarParams {
actuatorEffectiveness @3 :Float32;
}

struct LateralLQRTuning {
scale @0 :Float32;
ki @1 :Float32;
dcGain @2 :Float32;

# State space system
a @3 :List(Float32);
b @4 :List(Float32);
c @5 :List(Float32);

k @6 :List(Float32); # LQR gain
l @7 :List(Float32); # Kalman gain
}


enum SafetyModel {
# does NOT match board setting
Expand Down
49 changes: 45 additions & 4 deletions cereal/log.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,20 @@ struct HealthData {
started @2 :Bool;
controlsAllowed @3 :Bool;
gasInterceptorDetected @4 :Bool;
startedSignalDetected @5 :Bool;
isGreyPanda @6 :Bool;
startedSignalDetectedDeprecated @5 :Bool;
hasGps @6 :Bool;
canSendErrs @7 :UInt32;
canFwdErrs @8 :UInt32;
gmlanSendErrs @9 :UInt32;
hwType @10: HwType;

enum HwType {
unknown @0;
whitePanda @1;
greyPanda @2;
blackPanda @3;
pedal @4;
}
}

struct LiveUI {
Expand Down Expand Up @@ -343,6 +355,8 @@ struct RadarState @0x9a185389d6fdd05f {
fcw @10 :Bool;
status @11 :Bool;
aLeadTau @12 :Float32;
modelProb @13 :Float32;
radar @14 :Bool;
}
}

Expand All @@ -359,6 +373,8 @@ struct LiveCalibrationData {
# 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);
}

struct LiveTracks {
Expand Down Expand Up @@ -434,9 +450,12 @@ struct ControlsState @0x97ff69c53601abf1 {
vCurvature @46 :Float32;
decelForTurn @47 :Bool;

decelForModel @54 :Bool;

lateralControlState :union {
indiState @52 :LateralINDIState;
pidState @53 :LateralPIDState;
lqrState @55 :LateralLQRState;
}

enum OpenpilotState @0xdbe58b96d2d1ac61 {
Expand Down Expand Up @@ -491,6 +510,13 @@ struct ControlsState @0x97ff69c53601abf1 {
saturated @8 :Bool;
}

struct LateralLQRState {
active @0 :Bool;
steerAngle @1 :Float32;
i @2 :Float32;
output @3 :Float32;
}

}

struct LiveEventData {
Expand All @@ -508,6 +534,8 @@ struct ModelData {
freePath @6 :List(Float32);

settings @5 :ModelSettings;
leadFuture @7 :LeadData;
speed @8 :List(Float32);

struct PathData {
points @0 :List(Float32);
Expand All @@ -523,6 +551,10 @@ struct ModelData {
std @2 :Float32;
relVel @3 :Float32;
relVelStd @4 :Float32;
relY @5 :Float32;
relYStd @6 :Float32;
relA @7 :Float32;
relAStd @8 :Float32;
}

struct ModelSettings {
Expand Down Expand Up @@ -640,6 +672,7 @@ struct Plan {
mpc1 @1;
mpc2 @2;
mpc3 @3;
model @4;
}
}

Expand All @@ -662,6 +695,7 @@ struct PathPlan {
angleOffset @11 :Float32;
sensorValid @14 :Bool;
commIssue @15 :Bool;
posenetValid @16 :Bool;
}

struct LiveLocationData {
Expand Down Expand Up @@ -1640,8 +1674,13 @@ struct OrbKeyFrame {

struct DriverMonitoring {
frameId @0 :UInt32;
descriptor @1 :List(Float32);
std @2 :Float32;
descriptorDEPRECATED @1 :List(Float32);
stdDEPRECATED @2 :Float32;
faceOrientation @3 :List(Float32);
facePosition @4 :List(Float32);
faceProb @5 :Float32;
leftEyeProb @6 :Float32;
rightEyeProb @7 :Float32;
}

struct Boot {
Expand All @@ -1659,6 +1698,8 @@ struct LiveParametersData {
steerRatio @5 :Float32;
sensorValid @6 :Bool;
yawRate @7 :Float32;
posenetSpeed @8 :Float32;
posenetValid @9 :Bool;
}

struct LiveMapData {
Expand Down
17 changes: 16 additions & 1 deletion common/file_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_tmpdir_on_same_filesystem(path):
normpath = os.path.normpath(path)
parts = normpath.split("/")
if len(parts) > 1:
if parts[1].startswith("raid"):
if parts[1].startswith("raid") or parts[1].startswith("datasets"):
if len(parts) > 2 and parts[2] == "runner":
return "/{}/runner/tmp".format(parts[1])
elif len(parts) > 2 and parts[2] == "aws":
Expand Down Expand Up @@ -101,3 +101,18 @@ def atomic_write_in_dir(path, **kwargs):
writer = AtomicWriter(path, **kwargs)
return writer._open(_get_fileobject_func(writer, os.path.dirname(path)))

def atomic_write_in_dir_neos(path, contents, mode=None):
"""
Atomically writes contents to path using a temporary file in the same directory
as path. Useful on NEOS, where `os.link` (required by atomic_write_in_dir) is missing.
"""

f = tempfile.NamedTemporaryFile(delete=False, prefix=".tmp", dir=os.path.dirname(path))
f.write(contents)
f.flush()
if mode is not None:
os.fchmod(f.fileno(), mode)
os.fsync(f.fileno())
f.close()

os.rename(f.name, path)
Loading

0 comments on commit fc7e323

Please sign in to comment.