Skip to content

Commit 22a4193

Browse files
author
Vehicle Researcher
committed
openpilot v0.8.1 release
1 parent 29d9e1c commit 22a4193

File tree

201 files changed

+4097
-3347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+4097
-3347
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ one
5353
openpilot
5454
notebooks
5555
xx
56+
hyperthneed
5657
panda_jungle
5758
apks
5859
openpilot-apks
@@ -66,3 +67,4 @@ pandaextra
6667
flycheck_*
6768

6869
cppcheck_report.txt
70+
comma.sh

CONTRIBUTING.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Our software is open source so you can solve your own problems without needing help from others. And if you solve a problem and are so kind, you can upstream it for the rest of the world to use.
44

5-
Most open source development activity is coordinated through our [Discord](https://discord.comma.ai). A lot of documentation is available on our [medium](https://medium.com/@comma_ai/).
5+
Most open source development activity is coordinated through our [GitHub Discussions](https://github.com/commaai/openpilot/discussions) and [Discord](https://discord.comma.ai). A lot of documentation is available on our [medium](https://medium.com/@comma_ai/).
66

77
## Getting Started
88

@@ -12,23 +12,19 @@ Most open source development activity is coordinated through our [Discord](https
1212

1313
## Testing
1414

15-
### Local Testing
16-
17-
You can test your changes on your machine by running `run_docker_tests.sh`. This will run some automated tests in docker against your code.
18-
1915
### Automated Testing
2016

21-
All PRs and commits are automatically checked by Github Actions. Check out `.github/workflows/` for what Github Actions runs. Any new tests should be added to Github Actions.
17+
All PRs and commits are automatically checked by GitHub Actions. Check out `.github/workflows/` for what GitHub Actions runs. Any new tests should be added to GitHub Actions.
2218

2319
### Code Style and Linting
2420

25-
Code is automatically checked for style by Github Actions as part of the automated tests. You can also run these tests yourself by running `pre-commit run --all`.
21+
Code is automatically checked for style by GitHub Actions as part of the automated tests. You can also run these tests yourself by running `pre-commit run --all`.
2622

2723
## Car Ports (openpilot)
2824

2925
We've released a [Model Port guide](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) for porting to Toyota/Lexus models.
3026

31-
If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84). You might also be eligible for a bounty.
27+
If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84).
3228

3329
## Pull Requests
3430

@@ -38,12 +34,10 @@ git clone https://github.com/commaai/openpilot.git --recursive
3834
```
3935
Or alternatively, when on the master branch:
4036
```
41-
git submodule init
42-
git submodule update
37+
git submodule update --init
4338
```
4439
The reasons for having submodules on a dedicated repository and our new development philosophy can be found in our [post about externalization](https://medium.com/@comma_ai/a-2020-theme-externalization-13b33326d8b3).
4540
Modules that are in seperate repositories include:
46-
* apks
4741
* cereal
4842
* laika
4943
* opendbc

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ pipeline {
124124
stage('Replay Tests') {
125125
steps {
126126
phone_steps("eon2", [
127-
["camerad/modeld replay", "cd selfdrive/test/process_replay && ./camera_replay.py"],
127+
["camerad/modeld replay", "QCOM_REPLAY=1 scons -j4 && cd selfdrive/test/process_replay && ./camera_replay.py"],
128128
])
129129
}
130130
}
131131

132132
stage('HW + Unit Tests') {
133133
steps {
134134
phone_steps("eon", [
135-
["build cereal", "SCONS_CACHE=1 scons -j4 cereal/"],
135+
["build", "SCONS_CACHE=1 scons -j4"],
136136
["test sounds", "nosetests -s selfdrive/test/test_sounds.py"],
137137
["test boardd loopback", "nosetests -s selfdrive/boardd/tests/test_boardd_loopback.py"],
138138
["test loggerd", "CI=1 python selfdrive/loggerd/tests/test_loggerd.py"],

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,27 @@ Supported Cars
6464

6565
| Make | Model (US Market Reference) | Supported Package | ACC | No ACC accel below | No ALC below |
6666
| ----------| ------------------------------| ------------------| -----------------| -------------------| ------------------|
67-
| Acura | ILX 2016-18 | AcuraWatch Plus | openpilot | 25mph<sup>1</sup> | 25mph |
67+
| Acura | ILX 2016-19 | AcuraWatch Plus | openpilot | 25mph<sup>1</sup> | 25mph |
6868
| Acura | RDX 2016-18 | AcuraWatch Plus | openpilot | 25mph<sup>1</sup> | 12mph |
6969
| Acura | RDX 2020 | All | Stock | 0mph | 3mph |
7070
| Honda | Accord 2018-20 | All | Stock | 0mph | 3mph |
7171
| Honda | Accord Hybrid 2018-20 | All | Stock | 0mph | 3mph |
72-
| Honda | Civic Hatchback 2017-19 | Honda Sensing | Stock | 0mph | 12mph |
72+
| Honda | Civic Hatchback 2017-21 | Honda Sensing | Stock | 0mph | 12mph |
7373
| Honda | Civic Sedan/Coupe 2016-18 | Honda Sensing | openpilot | 0mph | 12mph |
7474
| Honda | Civic Sedan/Coupe 2019-20 | All | Stock | 0mph | 2mph<sup>2</sup> |
7575
| Honda | CR-V 2015-16 | Touring | openpilot | 25mph<sup>1</sup> | 12mph |
7676
| Honda | CR-V 2017-20 | Honda Sensing | Stock | 0mph | 12mph |
7777
| Honda | CR-V Hybrid 2017-2019 | Honda Sensing | Stock | 0mph | 12mph |
7878
| Honda | Fit 2018-19 | Honda Sensing | openpilot | 25mph<sup>1</sup> | 12mph |
79-
| Honda | HR-V 2019 | Honda Sensing | openpilot | 25mph<sup>1</sup> | 12mph |
79+
| Honda | HR-V 2019-20 | Honda Sensing | openpilot | 25mph<sup>1</sup> | 12mph |
8080
| Honda | Insight 2019-20 | All | Stock | 0mph | 3mph |
8181
| Honda | Inspire 2018 | All | Stock | 0mph | 3mph |
8282
| Honda | Odyssey 2018-20 | Honda Sensing | openpilot | 25mph<sup>1</sup> | 0mph |
8383
| Honda | Passport 2019 | All | openpilot | 25mph<sup>1</sup> | 12mph |
8484
| Honda | Pilot 2016-19 | Honda Sensing | openpilot | 25mph<sup>1</sup> | 12mph |
8585
| Honda | Ridgeline 2017-20 | Honda Sensing | openpilot | 25mph<sup>1</sup> | 12mph |
86-
| Hyundai | Palisade 2020 | All | Stock | 0mph | 0mph |
87-
| Hyundai | Sonata 2020 | All | Stock | 0mph | 0mph |
86+
| Hyundai | Palisade 2020 | All | Stock | 0mph | 0mph |
87+
| Hyundai | Sonata 2020-21 | All | Stock | 0mph | 0mph |
8888
| Lexus | CT Hybrid 2017-18 | LSS | Stock<sup>3</sup>| 0mph | 0mph |
8989
| Lexus | ES 2019-20 | All | openpilot | 0mph | 0mph |
9090
| Lexus | ES Hybrid 2019 | All | openpilot | 0mph | 0mph |
@@ -93,11 +93,12 @@ Supported Cars
9393
| Lexus | NX 2018 | All | Stock<sup>3</sup>| 0mph | 0mph |
9494
| Lexus | NX Hybrid 2018 | All | Stock<sup>3</sup>| 0mph | 0mph |
9595
| Lexus | RX 2016-18 | All | Stock<sup>3</sup>| 0mph | 0mph |
96-
| Lexus | RX 2020 | All | openpilot | 0mph | 0mph |
96+
| Lexus | RX 2020-21 | All | openpilot | 0mph | 0mph |
9797
| Lexus | RX Hybrid 2016-19 | All | Stock<sup>3</sup>| 0mph | 0mph |
9898
| Lexus | RX Hybrid 2020 | All | openpilot | 0mph | 0mph |
9999
| Toyota | Avalon 2016-18 | TSS-P | Stock<sup>3</sup>| 20mph<sup>1</sup> | 0mph |
100100
| Toyota | Camry 2018-20 | All | Stock | 0mph<sup>4</sup> | 0mph |
101+
| Toyota | Camry 2021 | All | openpilot | 0mph | 0mph |
101102
| Toyota | Camry Hybrid 2018-20 | All | Stock | 0mph<sup>4</sup> | 0mph |
102103
| Toyota | C-HR 2017-19 | All | Stock | 0mph | 0mph |
103104
| Toyota | C-HR Hybrid 2017-19 | All | Stock | 0mph | 0mph |
@@ -106,9 +107,9 @@ Supported Cars
106107
| Toyota | Corolla Hatchback 2019-20 | All | openpilot | 0mph | 0mph |
107108
| Toyota | Corolla Hybrid 2020-21 | All | openpilot | 0mph | 0mph |
108109
| Toyota | Highlander 2017-19 | All | Stock<sup>3</sup>| 0mph | 0mph |
109-
| Toyota | Highlander 2020 | All | openpilot | 0mph | 0mph |
110+
| Toyota | Highlander 2020-21 | All | openpilot | 0mph | 0mph |
110111
| Toyota | Highlander Hybrid 2017-19 | All | Stock<sup>3</sup>| 0mph | 0mph |
111-
| Toyota | Highlander Hybrid 2020 | All | openpilot | 0mph | 0mph |
112+
| Toyota | Highlander Hybrid 2020-21 | All | openpilot | 0mph | 0mph |
112113
| Toyota | Prius 2016-20 | TSS-P | Stock<sup>3</sup>| 0mph | 0mph |
113114
| Toyota | Prius 2021 | All | openpilot | 0mph | 0mph |
114115
| Toyota | Prius Prime 2017-20 | All | Stock<sup>3</sup>| 0mph | 0mph |
@@ -143,7 +144,8 @@ Community Maintained Cars and Features
143144
| Holden | Astra 2017<sup>1</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
144145
| Hyundai | Elantra 2017-19 | SCC + LKAS | Stock | 19mph | 34mph |
145146
| Hyundai | Genesis 2015-16 | SCC + LKAS | Stock | 19mph | 37mph |
146-
| Hyundai | Ioniq Electric 2019-20 | SCC + LKAS | Stock | 0mph | 32mph |
147+
| Hyundai | Ioniq Electric 2019 | SCC + LKAS | Stock | 0mph | 32mph |
148+
| Hyundai | Ioniq Electric 2020 | SCC + LKAS | Stock | 0mph | 0mph |
147149
| Hyundai | Kona 2020 | SCC + LKAS | Stock | 0mph | 0mph |
148150
| Hyundai | Kona EV 2019 | SCC + LKAS | Stock | 0mph | 0mph |
149151
| Hyundai | Santa Fe 2019 | All | Stock | 0mph | 0mph |
@@ -162,7 +164,7 @@ Community Maintained Cars and Features
162164
| Nissan | X-Trail 2017 | ProPILOT | Stock | 0mph | 0mph |
163165
| Subaru | Ascent 2019 | EyeSight | Stock | 0mph | 0mph |
164166
| Subaru | Crosstrek 2018-19 | EyeSight | Stock | 0mph | 0mph |
165-
| Subaru | Forester 2019 | EyeSight | Stock | 0mph | 0mph |
167+
| Subaru | Forester 2019-20 | EyeSight | Stock | 0mph | 0mph |
166168
| Subaru | Impreza 2017-19 | EyeSight | Stock | 0mph | 0mph |
167169
| Volkswagen| Golf 2015-19 | Driver Assistance | Stock | 0mph | 0mph |
168170

RELEASES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Version 0.8.1 (2020-12-21)
2+
========================
3+
* Original EON is deprecated, upgrade to comma two
4+
* Better model performance in heavy rain
5+
* Better lane positioning in turns
6+
* Fixed bug where model would cut turns on empty roads at night
7+
* Fixed issue where some Toyotas would not completely stop thanks to briskspirit!
8+
* Toyota Camry 2021 with TSS2.5 support
9+
* Hyundai Ioniq Electric 2020 support thanks to baldwalker!
10+
111
Version 0.8.0 (2020-11-30)
212
========================
313
* New driving model: fully 3D and improved cut-in detection

SConstruct

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import Cython
2-
import distutils
31
import os
42
import shutil
53
import subprocess
64
import sys
5+
import sysconfig
76
import platform
87
import numpy as np
9-
from sysconfig import get_paths
108

119
TICI = os.path.isfile('/TICI')
1210
Decider('MD5-timestamp')
@@ -19,10 +17,6 @@ AddOption('--asan',
1917
action='store_true',
2018
help='turn on ASAN')
2119

22-
# Rebuild cython extensions if python, distutils, or cython change
23-
cython_dependencies = [Value(v) for v in (sys.version, distutils.__version__, Cython.__version__)]
24-
Export('cython_dependencies')
25-
2620
real_arch = arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
2721
if platform.system() == "Darwin":
2822
arch = "Darwin"
@@ -130,10 +124,6 @@ else:
130124
# change pythonpath to this
131125
lenv["PYTHONPATH"] = Dir("#").path
132126

133-
#Get the path for Python.h for cython linking
134-
python_path = get_paths()['include']
135-
numpy_path = np.get_include()
136-
137127
env = Environment(
138128
ENV=lenv,
139129
CCFLAGS=[
@@ -188,30 +178,27 @@ env = Environment(
188178
CXXFLAGS=["-std=c++1z"] + cxxflags,
189179
LIBPATH=libpath + [
190180
"#cereal",
181+
"#phonelibs",
182+
"#opendbc/can",
191183
"#selfdrive/boardd",
192184
"#selfdrive/common",
193-
"#phonelibs",
194185
],
195186
CYTHONCFILESUFFIX=".cpp",
196-
tools=["default", "cython"]
187+
COMPILATIONDB_USE_ABSPATH=True,
188+
tools=["default", "cython", "compilation_db"],
197189
)
198190

191+
if GetOption('test'):
192+
env.CompilationDatabase('compile_commands.json')
193+
199194
if os.environ.get('SCONS_CACHE'):
200195
cache_dir = '/tmp/scons_cache'
201-
202-
if os.getenv('CI'):
203-
branch = os.getenv('GIT_BRANCH')
204-
205-
if QCOM_REPLAY:
206-
cache_dir = '/tmp/scons_cache_qcom_replay'
207-
elif branch is not None and branch != 'master':
208-
cache_dir_branch = '/tmp/scons_cache_' + branch
209-
if not os.path.isdir(cache_dir_branch) and os.path.isdir(cache_dir):
210-
shutil.copytree(cache_dir, cache_dir_branch)
211-
cache_dir = cache_dir_branch
212-
elif TICI:
196+
if TICI:
213197
cache_dir = '/data/scons_cache'
214198

199+
if QCOM_REPLAY:
200+
cache_dir = '/tmp/scons_cache_qcom_replay'
201+
215202
CacheDir(cache_dir)
216203

217204
node_interval = 5
@@ -235,22 +222,20 @@ def abspath(x):
235222
# rpath works elsewhere
236223
return x[0].path.rsplit("/", 1)[1][:-3]
237224

238-
#Cython build enviroment
225+
# Cython build enviroment
226+
py_include = sysconfig.get_paths()['include']
239227
envCython = env.Clone()
240-
envCython["CPPPATH"] += [python_path, numpy_path]
228+
envCython["CPPPATH"] += [py_include, np.get_include()]
241229
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-deprecated-declarations"]
242230

243-
python_libs = []
231+
envCython["LIBS"] = []
244232
if arch == "Darwin":
245-
envCython["LINKFLAGS"]=["-bundle", "-undefined", "dynamic_lookup"]
233+
envCython["LINKFLAGS"] = ["-bundle", "-undefined", "dynamic_lookup"]
246234
elif arch == "aarch64":
247-
envCython["LINKFLAGS"]=["-shared"]
248-
249-
python_libs.append(os.path.basename(python_path))
235+
envCython["LINKFLAGS"] = ["-shared"]
236+
envCython["LIBS"] = [os.path.basename(py_include)]
250237
else:
251-
envCython["LINKFLAGS"]=["-pthread", "-shared"]
252-
253-
envCython["LIBS"] = python_libs
238+
envCython["LINKFLAGS"] = ["-pthread", "-shared"]
254239

255240
Export('envCython')
256241

@@ -311,3 +296,4 @@ if arch != "Darwin":
311296

312297
if arch == "x86_64":
313298
SConscript(['tools/lib/index_log/SConscript'])
299+

cereal/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
gen
22
node_modules
33
package-lock.json
4+
*.tmp
45
*.pyc
56
__pycache__
67
.*.swp

cereal/SConscript

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Import('env', 'arch', 'zmq', 'cython_dependencies')
1+
Import('env', 'envCython', 'arch', 'zmq')
22

33
import shutil
44

@@ -55,11 +55,7 @@ Depends('messaging/bridge.cc', services_h)
5555
# different target?
5656
#env.Program('messaging/demo', ['messaging/demo.cc'], LIBS=[messaging_lib, 'zmq'])
5757

58-
59-
env.Command(['messaging/messaging_pyx.so', 'messaging/messaging_pyx.cpp'],
60-
cython_dependencies + [messaging_lib, 'messaging/messaging_pyx_setup.py', 'messaging/messaging_pyx.pyx', 'messaging/messaging.pxd'],
61-
"cd " + messaging_dir.path + " && python3 messaging_pyx_setup.py build_ext --inplace")
62-
58+
envCython.Program('messaging/messaging_pyx.so', 'messaging/messaging_pyx.pyx', LIBS=envCython["LIBS"]+[messaging_lib, "zmq"])
6359

6460
if GetOption('test'):
6561
env.Program('messaging/test_runner', ['messaging/test_runner.cc', 'messaging/msgq_tests.cc'], LIBS=[messaging_lib])

cereal/car.capnp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ struct CarEvent @0x9b1657f34caf3ad3 {
101101
fanMalfunction @91;
102102
cameraMalfunction @92;
103103

104+
startupOneplus @82;
105+
104106
gasUnavailableDEPRECATED @3;
105107
dataNeededDEPRECATED @16;
106108
modelCommIssueDEPRECATED @27;
@@ -112,8 +114,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
112114
invalidGiraffeHondaDEPRECATED @49;
113115
invalidGiraffeToyotaDEPRECATED @60;
114116
whitePandaUnsupportedDEPRECATED @81;
115-
startupGreyPandaDEPRECATED @82;
116-
canErrorPersistentDEPRECATED @83;
117+
commIssueWarningDEPRECATED @83;
117118
focusRecoverActiveDEPRECATED @86;
118119
neosUpdateRequiredDEPRECATED @88;
119120
modelLagWarningDEPRECATED @93;
@@ -398,6 +399,9 @@ struct CarParams {
398399
steerRateCost @33 :Float32; # Lateral MPC cost on steering rate
399400
steerControlType @34 :SteerControlType;
400401
radarOffCan @35 :Bool; # True when radar objects aren't visible on CAN
402+
minSpeedCan @51 :Float32; # Minimum vehicle speed from CAN (below this value drops to 0)
403+
stoppingBrakeRate @52 :Float32; # brake_travel/s while trying to stop
404+
startingBrakeRate @53 :Float32; # brake_travel/s while releasing on restart
401405

402406
steerActuatorDelay @36 :Float32; # Steering wheel actuator delay in seconds
403407
openpilotLongitudinalControl @37 :Bool; # is openpilot doing the longitudinal control?

cereal/log.capnp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ struct InitData {
4949
neo @1;
5050
chffrAndroid @2;
5151
chffrIos @3;
52+
tici @4;
53+
pc @5;
5254
}
5355

5456
struct AndroidBuildInfo {
@@ -629,6 +631,7 @@ struct ModelData {
629631
frameDropPerc @13 :Float32;
630632
timestampEof @9 :UInt64;
631633
modelExecutionTime @14 :Float32;
634+
gpuExecutionTime @16 :Float32;
632635
rawPred @15 :Data;
633636

634637
path @1 :PathData;
@@ -697,6 +700,7 @@ struct ModelDataV2 {
697700
frameDropPerc @2 :Float32;
698701
timestampEof @3 :UInt64;
699702
modelExecutionTime @15 :Float32;
703+
gpuExecutionTime @17 :Float32;
700704
rawPred @16 :Data;
701705

702706
position @4 :XYZTData;
@@ -1952,6 +1956,7 @@ struct OrbKeyFrame {
19521956
struct DriverState {
19531957
frameId @0 :UInt32;
19541958
modelExecutionTime @14 :Float32;
1959+
dspExecutionTime @16 :Float32;
19551960
rawPred @15 :Data;
19561961

19571962
descriptorDEPRECATED @1 :List(Float32);

0 commit comments

Comments
 (0)