Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from commaai:master #27

Merged
merged 66 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
fdeb590
ui: adjust laneless design (#24246)
sshane Apr 18, 2022
86fcb82
VW: Add FW for 2019 Volkswagen e-Golf MK7 (#24247)
Knudn Apr 18, 2022
ce91f45
HKG: Add FW for 2022 Hyundai Elantra Hybrid (#24249)
sshane Apr 18, 2022
067273b
controlsd: check if process should be running (#24250)
adeebshihadeh Apr 18, 2022
f6034ec
Hyundai: Car Port for Ioniq Plug-in Hybrid 2019 (#24089)
sunnyhaibin Apr 18, 2022
233a167
controlsd: handle controls mismatch race (#24245)
adeebshihadeh Apr 19, 2022
5c48e7b
remove comma two support (#24248)
adeebshihadeh Apr 19, 2022
0ac35a6
loggerd: prereqs for deanlee loggerd omx encoder (try 2) (#24252)
geohot Apr 19, 2022
40cf4a7
Update SNPE to 1.61.0.3358 (#24253)
geohot Apr 19, 2022
1795a2a
C2: remove some dead code (#24256)
geohot Apr 19, 2022
e9ef650
joystickd: add WEB support, add logitech joystick support
geohot Apr 19, 2022
13e18b6
joystickd: add send thread
geohot Apr 19, 2022
148e747
rebuild libyuv for x86_64
adeebshihadeh Apr 18, 2022
0cc162a
bump submodules
adeebshihadeh Apr 19, 2022
c5378cf
improve tici thermal control (#24228)
adeebshihadeh Apr 19, 2022
ce74bd4
docs: add video link for 2019 Subaru Crosstrek (#24251)
cellfreak Apr 19, 2022
28149ea
test_onroad: fix min -> max (#23824)
adeebshihadeh Apr 19, 2022
76a8338
manager: start bridge and web joystick for notcars (#24212)
adeebshihadeh Apr 19, 2022
1ddcba2
Add missing AVALONH_TSS2 fwdCamera f/w (#24261)
ErichMoraga Apr 19, 2022
397bd25
Disambiguate frame id in latencylogger (#24164)
lukaspetersson Apr 19, 2022
27b0674
modeld tests (#24263)
adeebshihadeh Apr 19, 2022
273831a
ui: make the path double wide for e2e
geohot Apr 19, 2022
492489e
ui: adjust e2e path width
sshane Apr 19, 2022
6877059
add joystick to release
adeebshihadeh Apr 20, 2022
fe0bcda
Lateral torque-based control with roll on TSS2 corolla and TSSP rav4 …
haraschax Apr 20, 2022
a762567
Offline localizer: accept addition camera (#24266)
haraschax Apr 20, 2022
6de434f
Honda: do same standstill check as panda (#24262)
sshane Apr 20, 2022
e95a250
Carla pip dependency and fix for git init (#24258)
gijskoning Apr 20, 2022
6ab7b2f
swaglog: delay creating zmq socket to first use - fix modeld crash in…
gijskoning Apr 20, 2022
13254ce
Add wide camera to Carla (#23989)
gijskoning Apr 20, 2022
506650b
Latcontrol torque: max_torque rename (#24265)
haraschax Apr 20, 2022
70775df
Add missing AVALON_TSS2 firmwares (#24273)
ErichMoraga Apr 20, 2022
e063f77
Latencylogger list logreader (#24276)
lukaspetersson Apr 20, 2022
3b2421b
precise power measurement script
geohot Apr 20, 2022
e515831
test_models: add Honda segment for standstill controls mismatch (#24275)
sshane Apr 20, 2022
0fbb7a4
athena: fix random test failure (#24278)
adeebshihadeh Apr 20, 2022
a959650
VW MQB: Remove metric units detection (#24280)
jyoung8607 Apr 20, 2022
b42b3a8
update refs after VW signal removal
adeebshihadeh Apr 20, 2022
4c90208
paramsd: use real logMonoTime (#24279)
adeebshihadeh Apr 20, 2022
f7c2b8b
paramsd: fix variable cpu usage (#24281)
adeebshihadeh Apr 20, 2022
aef6154
launch corolla script for desk replay
Apr 20, 2022
8d24655
loggerd: Separate writer from encoder (#24257)
geohot Apr 20, 2022
17cb65c
Toyota: resolve controls mismatch due to interceptor thresholds (#23710)
sshane Apr 21, 2022
6e62df6
Make safetyParam unsigned (#24160)
sshane Apr 21, 2022
3830047
ui: Fix path artefact when going over hill (#24285)
pd0wm Apr 21, 2022
303f4ea
fix --extras on device: move ui.cc into widgets_src (#24286)
pd0wm Apr 21, 2022
207df47
manager: cleanup ensure_running (#24270)
pd0wm Apr 21, 2022
b8b15d5
mypy: enable --warn-unreachable (#24282)
GregorKikelj Apr 21, 2022
462a107
CI: add job for complete build (#24283)
adeebshihadeh Apr 21, 2022
6bbb168
test onroad: increase DM execution threshold instant max
adeebshihadeh Apr 21, 2022
c5a7009
Add missing Highlander Hybrid TSS2 fw (#24289)
kadupitiya Apr 22, 2022
37dbc7b
CI: power draw test (#24292)
adeebshihadeh Apr 22, 2022
9be23cb
Simulator Tests (#24274)
gijskoning Apr 22, 2022
b9907e8
UI: remove RGB buffer usage (#24298)
jwooning Apr 22, 2022
3741908
Do not run model when skipping frames (#23949)
pd0wm Apr 22, 2022
b88fb03
tici downclock (#24088)
adeebshihadeh Apr 22, 2022
3063c70
updated: only run offroad & disable automatic git garbage collection …
pd0wm Apr 22, 2022
70987fd
more verbose debug alerts (#24126)
adeebshihadeh Apr 22, 2022
e8a9b9e
updated: reduce frequency of unnecessary updates (#24301)
adeebshihadeh Apr 23, 2022
f4d1703
longActive: consider longitudinal control (#24295)
sshane Apr 23, 2022
d9683b6
Hyundai: update supported Kona EV model years
adeebshihadeh Apr 24, 2022
b5f65a5
Hyundai: remove mismatched video (#24307)
Azenzic Apr 24, 2022
785a228
Add missing LEXUS_RX_TSS2 engine & fwdCamera f/w (#24309)
ErichMoraga Apr 24, 2022
13e1c0b
Revert "UI: remove RGB buffer usage (#24298)"
adeebshihadeh Apr 24, 2022
01968ca
Simulator: Fix keyboard input (#24320)
gijskoning Apr 25, 2022
43f43b1
UI: use YUV stream instead of RGB (#24317)
jwooning Apr 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .github/workflows/selfdrive_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ jobs:
rm -rf /tmp/scons_cache/* && \
scons -j$(nproc) --cache-populate"

build_all:
name: build all
runs-on: ubuntu-20.04
timeout-minutes: 50
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build Docker image
run: eval "$BUILD"
- name: Build openpilot with all flags
run: ${{ env.RUN }} "scons -j$(nproc) --extras --test"

#build_mac:
# name: build macos
# runs-on: macos-latest
Expand Down Expand Up @@ -257,6 +270,7 @@ jobs:
$UNIT_TEST selfdrive/athena && \
$UNIT_TEST selfdrive/thermald && \
$UNIT_TEST selfdrive/hardware/tici && \
$UNIT_TEST selfdrive/modeld && \
$UNIT_TEST tools/lib/tests && \
./selfdrive/boardd/tests/test_boardd_usbprotocol && \
./selfdrive/common/tests/test_util && \
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ repos:
exclude: '^(pyextra/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)/'
additional_dependencies: ['git+https://github.com/numpy/numpy-stubs', 'types-requests', 'types-atomicwrites',
'types-pycurl']
args:
- --warn-unreachable
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.openpilot_base
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ RUN cd /tmp && \
rm -rf /tmp/* && \
rm -rf /root/.cache && \
pip uninstall -y pipenv && \

# remove unused architectures from gcc for panda
cd /usr/lib/gcc/arm-none-eabi/9.2.1 && \
rm -rf arm/ && \
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
RUN sudo git config --global --add safe.directory /tmp/openpilot

94 changes: 12 additions & 82 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ fi

ln -snf ${env.TEST_DIR} /data/pythonpath

if [ -f /EON ]; then
# kill all old procs in the openpilot cpuset
while read p; do
kill "\$p" || true
done < /dev/cpuset/app/tasks

echo \$\$ > /dev/cpuset/app/tasks || true

mkdir -p /dev/shm
chmod 777 /dev/shm
fi

cd ${env.TEST_DIR} || true
${cmd}
exit 0
Expand Down Expand Up @@ -62,29 +50,15 @@ pipeline {
}

stages {
stage('build releases') {
stage('build release3') {
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
when {
branch 'devel-staging'
}

parallel {
stage('release2') {
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
steps {
phone_steps("eon-build", [
["build release2-staging & dashcam-staging", "PUSH=1 $SOURCE_DIR/release/build_release.sh"],
])
}
}

stage('release3') {
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
steps {
phone_steps("tici", [
["build release3-staging & dashcam3-staging", "PUSH=1 $SOURCE_DIR/release/build_release.sh"],
])
}
}
steps {
phone_steps("tici", [
["build release3-staging & dashcam3-staging", "PUSH=1 $SOURCE_DIR/release/build_release.sh"],
])
}
}

Expand All @@ -106,41 +80,6 @@ pipeline {
stages {
stage('parallel tests') {
parallel {
stage('C2: build') {
steps {
phone_steps("eon-build", [
["build master-ci", "cd $SOURCE_DIR/release && EXTRA_FILES='tools/' ./build_devel.sh"],
["build openpilot", "cd selfdrive/manager && ./build.py"],
["test manager", "python selfdrive/manager/test/test_manager.py"],
["onroad tests", "cd selfdrive/test/ && ./test_onroad.py"],
["test car interfaces", "cd selfdrive/car/tests/ && ./test_car_interfaces.py"],
])
}
}

stage('C2: replay') {
steps {
phone_steps("eon2", [
["build", "cd selfdrive/manager && ./build.py"],
["model replay", "cd selfdrive/test/process_replay && ./model_replay.py"],
])
}
}

stage('C2: HW + Unit Tests') {
steps {
phone_steps("eon", [
["build", "cd selfdrive/manager && ./build.py"],
["test sounds", "python selfdrive/ui/tests/test_soundd.py"],
["test boardd loopback", "python selfdrive/boardd/tests/test_boardd_loopback.py"],
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],
["test encoder", "python selfdrive/loggerd/tests/test_encoder.py"],
["test logcatd", "python selfdrive/logcatd/tests/test_logcatd_android.py"],
["test updater", "python selfdrive/hardware/eon/test_neos_updater.py"],
])
}
}

/*
stage('Power Consumption Tests') {
steps {
Expand All @@ -162,7 +101,7 @@ pipeline {
}
*/

stage('C3: build') {
stage('build') {
environment {
R3_PUSH = "${env.BRANCH_NAME == 'master' ? '1' : ' '}"
}
Expand All @@ -177,28 +116,19 @@ pipeline {
}
}

stage('C3: HW + Unit Tests') {
stage('HW + Unit Tests') {
steps {
phone_steps("tici2", [
["build", "cd selfdrive/manager && ./build.py"],
["test power draw", "python selfdrive/hardware/tici/test_power_draw.py"],
["test boardd loopback", "python selfdrive/boardd/tests/test_boardd_loopback.py"],
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],
["test encoder", "LD_LIBRARY_PATH=/usr/local/lib python selfdrive/loggerd/tests/test_encoder.py"],
])
}
}

stage('C2: camerad') {
steps {
phone_steps("eon-party", [
["build", "cd selfdrive/manager && ./build.py"],
["test camerad", "python selfdrive/camerad/test/test_camerad.py"],
["test exposure", "python selfdrive/camerad/test/test_exposure.py"],
])
}
}

stage('C3: camerad') {
stage('camerad') {
steps {
phone_steps("tici-party", [
["build", "cd selfdrive/manager && ./build.py"],
Expand All @@ -208,7 +138,7 @@ pipeline {
}
}

stage('C3: replay') {
stage('replay') {
steps {
phone_steps("tici3", [
["build", "cd selfdrive/manager && ./build.py"],
Expand All @@ -225,7 +155,7 @@ pipeline {
branch 'master'
}
steps {
phone_steps("eon-build", [
phone_steps("tici-build", [
["push devel", "cd $SOURCE_DIR/release && PUSH='master-ci' ./build_devel.sh"],
])
}
Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ breathe = "*"
subprocess32 = "*"
tenacity = "*"
mpld3 = "*"
carla = "==0.9.12"

[packages]
atomicwrites = "*"
Expand Down
15 changes: 14 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Running in a car
To use openpilot in a car, you need four things
* This software. It's free and available right here.
* One of [the 150+ supported cars](docs/CARS.md). We support Honda, Toyota, Hyundai, Nissan, Kia, Chrysler, Lexus, Acura, Audi, VW, and more. If your car is not supported, but has adaptive cruise control and lane keeping assist, it's likely able to run openpilot.
* A supported device to run this software. This can be a [comma two](https://comma.ai/shop/products/two), [comma three](https://comma.ai/shop/products/three), or if you like to experiment, a [Ubuntu computer with webcams](https://github.com/commaai/openpilot/tree/master/tools/webcam).
* A way to connect to your car. With a comma two or three, you need only a [car harness](https://comma.ai/shop/products/car-harness). With an EON Gold or PC, you also need a [black panda](https://comma.ai/shop/products/panda).
* A supported device to run this software: a [comma three](https://comma.ai/shop/products/three), or if you like to experiment, a [Ubuntu computer with webcams](https://github.com/commaai/openpilot/tree/master/tools/webcam).
* A way to connect to your car. With a comma three, you need only a [car harness](https://comma.ai/shop/products/car-harness). With a PC, you also need a [black panda](https://comma.ai/shop/products/panda).

We have detailed instructions for [how to install the device in a car](https://comma.ai/setup).

Expand Down
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Version 0.8.14 (2022-0X-XX)
========================
* bigmodel!
* comma body support
* Hyundai Ioniq Plug-in Hybrid 2019 support thanks to sunnyhaibin!
* Hyundai Tucson Diesel 2019 support thanks to sunnyhaibin!
* Toyota Alphard Hybrid 2021 support
* Toyota Avalon Hybrid 2022 support
Expand Down
55 changes: 15 additions & 40 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,9 @@ lenv = {

rpath = lenv["LD_LIBRARY_PATH"].copy()

if arch == "aarch64" or arch == "larch64":
if arch == "larch64":
lenv["LD_LIBRARY_PATH"] += ['/data/data/com.termux/files/usr/lib']

if arch == "aarch64":
# android
lenv["ANDROID_DATA"] = os.environ['ANDROID_DATA']
lenv["ANDROID_ROOT"] = os.environ['ANDROID_ROOT']

cpppath = [
"#third_party/opencl/include",
]
Expand All @@ -92,27 +87,17 @@ if arch == "aarch64" or arch == "larch64":
f"#third_party/acados/{arch}/lib",
]

if arch == "larch64":
libpath += [
"#third_party/snpe/larch64",
"#third_party/libyuv/larch64/lib",
"/usr/lib/aarch64-linux-gnu"
]
cpppath += [
"#selfdrive/camerad/include",
]
cflags = ["-DQCOM2", "-mcpu=cortex-a57"]
cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"]
rpath += ["/usr/local/lib"]
else:
rpath = []
libpath += [
"#third_party/snpe/aarch64",
"#third_party/libyuv/lib",
"/system/vendor/lib64"
]
cflags = ["-DQCOM", "-D_USING_LIBCXX", "-mcpu=cortex-a57"]
cxxflags = ["-DQCOM", "-D_USING_LIBCXX", "-mcpu=cortex-a57"]
libpath += [
"#third_party/snpe/larch64",
"#third_party/libyuv/larch64/lib",
"/usr/lib/aarch64-linux-gnu"
]
cpppath += [
"#selfdrive/camerad/include",
]
cflags = ["-DQCOM2", "-mcpu=cortex-a57"]
cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"]
rpath += ["/usr/local/lib"]
else:
cflags = []
cxxflags = []
Expand Down Expand Up @@ -259,6 +244,7 @@ if os.environ.get('SCONS_PROGRESS'):

SHARED = False

# TODO: this can probably be removed
def abspath(x):
if arch == 'aarch64':
pth = os.path.join("/data/pythonpath", x[0].path)
Expand Down Expand Up @@ -287,9 +273,7 @@ Export('envCython')

# Qt build environment
qt_env = env.Clone()
qt_modules = ["Widgets", "Gui", "Core", "Network", "Concurrent", "Multimedia", "Quick", "Qml", "QuickWidgets", "Location", "Positioning"]
if arch != "aarch64":
qt_modules += ["DBus"]
qt_modules = ["Widgets", "Gui", "Core", "Network", "Concurrent", "Multimedia", "Quick", "Qml", "QuickWidgets", "Location", "Positioning", "DBus"]

qt_libs = []
if arch == "Darwin":
Expand All @@ -304,15 +288,6 @@ if arch == "Darwin":
qt_env["LINKFLAGS"] += ["-F" + os.path.join(qt_env['QTDIR'], "lib")]
qt_env["FRAMEWORKS"] += [f"Qt{m}" for m in qt_modules] + ["OpenGL"]
qt_env.AppendENVPath('PATH', os.path.join(qt_env['QTDIR'], "bin"))
elif arch == "aarch64":
qt_env['QTDIR'] = "/usr"
qt_dirs = [
f"/usr/include/qt",
]
qt_dirs += [f"/usr/include/qt/Qt{m}" for m in qt_modules]

qt_libs = [f"Qt5{m}" for m in qt_modules]
qt_libs += ['EGL', 'GLESv3', 'c++_shared']
else:
qt_env['QTDIR'] = "/usr"
qt_dirs = [
Expand Down Expand Up @@ -390,7 +365,7 @@ rednose_config = {
},
}

if arch not in ["aarch64", "larch64"]:
if arch != "larch64":
rednose_config['to_build'].update({
'gnss': ('#selfdrive/locationd/models/gnss_kf.py', True, []),
'loc_4': ('#selfdrive/locationd/models/loc_kf.py', True, []),
Expand Down
2 changes: 1 addition & 1 deletion cereal
14 changes: 0 additions & 14 deletions common/file_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,12 @@ def _get_fileobject():
return writer.get_fileobject(dir=temp_dir)
return _get_fileobject

def monkeypatch_os_link():
# This is neccesary on EON/C2, where os.link is patched out of python
if not hasattr(os, 'link'):
from cffi import FFI
ffi = FFI()
ffi.cdef("int link(const char *oldpath, const char *newpath);")
libc = ffi.dlopen(None)

def link(src, dest):
return libc.link(src.encode(), dest.encode())
os.link = link

def atomic_write_on_fs_tmp(path, **kwargs):
"""Creates an atomic writer using a temporary file in a temporary directory
on the same filesystem as path.
"""
# TODO(mgraczyk): This use of AtomicWriter relies on implementation details to set the temp
# directory.
monkeypatch_os_link()
writer = AtomicWriter(path, **kwargs)
return writer._open(_get_fileobject_func(writer, get_tmpdir_on_same_filesystem(path)))

Expand All @@ -108,6 +95,5 @@ def atomic_write_in_dir(path, **kwargs):
"""Creates an atomic writer using a temporary file in the same directory
as the destination file.
"""
monkeypatch_os_link()
writer = AtomicWriter(path, **kwargs)
return writer._open(_get_fileobject_func(writer, os.path.dirname(path)))
Loading