mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-08 13:44:54 +08:00
Compare commits
373 Commits
toyota-can
...
docs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0bae722215 | ||
|
|
32bbcfa975 | ||
|
|
738b361a25 | ||
|
|
b61ccf2bee | ||
|
|
c8d543a8fe | ||
|
|
801c107aa1 | ||
|
|
7e79d5424f | ||
|
|
6dde8560fe | ||
|
|
2655a2e138 | ||
|
|
06cc8af9bf | ||
|
|
c918e5bbdc | ||
|
|
922ad64d13 | ||
|
|
31b3776150 | ||
|
|
1e5ad42e7a | ||
|
|
58c72df0be | ||
|
|
b2667cac32 | ||
|
|
fd07e80c34 | ||
|
|
bf628bd042 | ||
|
|
5043f5e7a4 | ||
|
|
83a84ba4bc | ||
|
|
7d225a1e33 | ||
|
|
450d5a4458 | ||
|
|
d06a404bd9 | ||
|
|
27dfd5cbf0 | ||
|
|
2e82908c07 | ||
|
|
b71914e006 | ||
|
|
a9d5c9e23a | ||
|
|
c01719bb99 | ||
|
|
6dd72973ec | ||
|
|
4e0a26be8d | ||
|
|
7c3759e147 | ||
|
|
baaa2704ee | ||
|
|
00afa068a1 | ||
|
|
6bea70ac86 | ||
|
|
fc372e2ae1 | ||
|
|
cd22ee3327 | ||
|
|
e97a1d1a44 | ||
|
|
6795b09d0a | ||
|
|
20d484c7cb | ||
|
|
7e1a8d41a1 | ||
|
|
0c452dbafe | ||
|
|
56ed377197 | ||
|
|
92f9684fdb | ||
|
|
91b7752268 | ||
|
|
2ebf09eb07 | ||
|
|
90af6be9b8 | ||
|
|
3504ccb639 | ||
|
|
443cd795a3 | ||
|
|
06b2c68e03 | ||
|
|
3478ac1338 | ||
|
|
ce04d25f7d | ||
|
|
0c7abf3855 | ||
|
|
0b9ab8bb91 | ||
|
|
6b52ee7ef2 | ||
|
|
c3d5c5f016 | ||
|
|
0374979397 | ||
|
|
a17a38d8c3 | ||
|
|
8b13186a32 | ||
|
|
9c5bf2ce0a | ||
|
|
f9b5d1e9e5 | ||
|
|
041606de4c | ||
|
|
daaec59464 | ||
|
|
56ef3751d8 | ||
|
|
c244a5d485 | ||
|
|
308475fcc9 | ||
|
|
a7de971334 | ||
|
|
61658fbfe3 | ||
|
|
5ef0040ac6 | ||
|
|
c188c96956 | ||
|
|
0376600dec | ||
|
|
cfc28176f2 | ||
|
|
7b104c682b | ||
|
|
42f43c3231 | ||
|
|
b2201c2a1d | ||
|
|
d1005f3b69 | ||
|
|
24d3f07a2f | ||
|
|
b10c2ada79 | ||
|
|
d44fde7117 | ||
|
|
d634894300 | ||
|
|
8856585129 | ||
|
|
e7cc70f3fa | ||
|
|
de0790f912 | ||
|
|
a6b562e0c1 | ||
|
|
60ae57a3ed | ||
|
|
5a0c064346 | ||
|
|
ca5234a32f | ||
|
|
fd1937c6d4 | ||
|
|
a27efe5796 | ||
|
|
870430e19f | ||
|
|
6cbef7bc13 | ||
|
|
9cc0d7a1c9 | ||
|
|
e244aabe88 | ||
|
|
b15390d351 | ||
|
|
2af7b3441e | ||
|
|
87c495b761 | ||
|
|
d016071df3 | ||
|
|
940c5b3b3f | ||
|
|
256ee6cf6f | ||
|
|
b5855bcade | ||
|
|
8f328f17fc | ||
|
|
b6f3692b56 | ||
|
|
6266feeed2 | ||
|
|
876ac69047 | ||
|
|
16047e3c3d | ||
|
|
47ca2c9381 | ||
|
|
29a3b3315f | ||
|
|
10f3f56801 | ||
|
|
7eb65e878b | ||
|
|
2e42bf9fa4 | ||
|
|
3beee1b80e | ||
|
|
3a958b882a | ||
|
|
1b17bf40cd | ||
|
|
6e8f325024 | ||
|
|
cc21fd3ac3 | ||
|
|
010a32bb9b | ||
|
|
6f6dfa6bba | ||
|
|
a37d3569bd | ||
|
|
d3e26cf695 | ||
|
|
05e331736d | ||
|
|
ab9a58c64a | ||
|
|
ddf05d7126 | ||
|
|
59a16b9cdc | ||
|
|
276713ddf9 | ||
|
|
e1a4189c1f | ||
|
|
a1f4ba55bf | ||
|
|
d899834b63 | ||
|
|
c5372e9041 | ||
|
|
1bf0fb3851 | ||
|
|
fe39ffa55a | ||
|
|
0437998bce | ||
|
|
de8f7c4584 | ||
|
|
286c4f8403 | ||
|
|
0977a91d65 | ||
|
|
245d5bba9c | ||
|
|
2ef29967e8 | ||
|
|
6d559c4219 | ||
|
|
3cc4683eb7 | ||
|
|
ac08c79139 | ||
|
|
04dcdf46bc | ||
|
|
7f1def00b2 | ||
|
|
94ee6b0f43 | ||
|
|
91696ba6c8 | ||
|
|
608a1c2baa | ||
|
|
93a96695ea | ||
|
|
146c64b0f1 | ||
|
|
4cd5c1b3c2 | ||
|
|
811363cab9 | ||
|
|
b2e94548b9 | ||
|
|
cf5ae3cbca | ||
|
|
561c490b2a | ||
|
|
496ae85f67 | ||
|
|
5c630b20a9 | ||
|
|
c2a7437972 | ||
|
|
1550520b63 | ||
|
|
bcb4a6a3e3 | ||
|
|
7835b9aa17 | ||
|
|
f2c4749420 | ||
|
|
238fca2334 | ||
|
|
72ecc330e2 | ||
|
|
d9b5a1e30b | ||
|
|
f43dc93bd9 | ||
|
|
06a5a380df | ||
|
|
a4166563e1 | ||
|
|
1792a60053 | ||
|
|
538e1e8a9a | ||
|
|
7a43e2cb67 | ||
|
|
571937da84 | ||
|
|
6442752486 | ||
|
|
ed34c4cfd6 | ||
|
|
8810948eca | ||
|
|
0b6da2077f | ||
|
|
159d3a30e3 | ||
|
|
6db6d79211 | ||
|
|
a064de7ceb | ||
|
|
c787507449 | ||
|
|
3352e48c51 | ||
|
|
081bb51e58 | ||
|
|
faa23595af | ||
|
|
cf083711bb | ||
|
|
9f7002fdf1 | ||
|
|
761c349490 | ||
|
|
03a14ff864 | ||
|
|
c48b724de1 | ||
|
|
542e14306e | ||
|
|
79bc6c3a52 | ||
|
|
8952c947d1 | ||
|
|
a1e9cf9df9 | ||
|
|
8a64cc57a9 | ||
|
|
2ddf95d47f | ||
|
|
8bd8066589 | ||
|
|
44cf6b358e | ||
|
|
ded5e5c8d0 | ||
|
|
21b8189a45 | ||
|
|
76a552715f | ||
|
|
bd3b7a1d87 | ||
|
|
8543afc78a | ||
|
|
12f923445b | ||
|
|
0e127cf88b | ||
|
|
c5b65d072d | ||
|
|
ed8d1a65c3 | ||
|
|
91930c2d0d | ||
|
|
111e8897be | ||
|
|
19459d2b2e | ||
|
|
5af3f32157 | ||
|
|
16dda06a0c | ||
|
|
76d084d877 | ||
|
|
90a9ef277c | ||
|
|
b32227e69f | ||
|
|
7cc237aa4c | ||
|
|
0a14e19808 | ||
|
|
c16879f2b8 | ||
|
|
8d0cb9c8cf | ||
|
|
2ecdd2810c | ||
|
|
35e38f5fe4 | ||
|
|
2a0ac63fa5 | ||
|
|
ca058bcc81 | ||
|
|
f96406b13f | ||
|
|
0738c05d9f | ||
|
|
08b76d3de6 | ||
|
|
cef81da1e9 | ||
|
|
f4a36f7f74 | ||
|
|
f911493177 | ||
|
|
fa2050ab1a | ||
|
|
4bffe422e4 | ||
|
|
f881a9ba68 | ||
|
|
afa9ec1138 | ||
|
|
ddf8abc14a | ||
|
|
5f722d2c93 | ||
|
|
31ac5a216d | ||
|
|
1b262a5a52 | ||
|
|
517289f3a5 | ||
|
|
6fcd2187e1 | ||
|
|
8fa3f60de7 | ||
|
|
a3f40dbac3 | ||
|
|
f99dc2eab2 | ||
|
|
cdcc2f6766 | ||
|
|
1304f95978 | ||
|
|
c4393277fb | ||
|
|
7cd9ab27e6 | ||
|
|
ece999c548 | ||
|
|
082cf39d73 | ||
|
|
f41d77b24f | ||
|
|
f45f239774 | ||
|
|
02e550e2cb | ||
|
|
06298b28f1 | ||
|
|
a694d051b3 | ||
|
|
468a50b6f6 | ||
|
|
4e8a4f87f4 | ||
|
|
30350f4207 | ||
|
|
c98ba4ff4c | ||
|
|
c46cf9f536 | ||
|
|
23e1c4f49e | ||
|
|
d6af0e6eb5 | ||
|
|
09926bf5b5 | ||
|
|
f9f33c4dc4 | ||
|
|
5fc6fe68f6 | ||
|
|
806655b052 | ||
|
|
5d54743d8b | ||
|
|
b28ff40d4d | ||
|
|
07163f793b | ||
|
|
66687746f9 | ||
|
|
b27fa58444 | ||
|
|
8bca2ca758 | ||
|
|
cefddf4b9b | ||
|
|
f829c90de6 | ||
|
|
6bd3cab8a8 | ||
|
|
e54c0091bc | ||
|
|
48568cba0b | ||
|
|
6ecb1060be | ||
|
|
93977e2ee2 | ||
|
|
8650ca837f | ||
|
|
6853f1db29 | ||
|
|
140aa95523 | ||
|
|
69544c57fd | ||
|
|
a3f2452fa7 | ||
|
|
c736d43cce | ||
|
|
a28cc71b8b | ||
|
|
612c518dd6 | ||
|
|
5ccabb9d54 | ||
|
|
0bb2f8c9d4 | ||
|
|
3c4ddba992 | ||
|
|
488d84c664 | ||
|
|
b6a0c89dc5 | ||
|
|
a6f4cdb319 | ||
|
|
b80d3e113b | ||
|
|
d80cde6e41 | ||
|
|
c6db0cd4b6 | ||
|
|
489afc3842 | ||
|
|
b5f86446d4 | ||
|
|
62b5fd54e6 | ||
|
|
7aeb7085a3 | ||
|
|
edafe139a4 | ||
|
|
80f4becabf | ||
|
|
3a74f8c568 | ||
|
|
5eed9490c6 | ||
|
|
c8e10139c2 | ||
|
|
966bb6cc54 | ||
|
|
57b461a186 | ||
|
|
887ea25b6d | ||
|
|
735c2fb48e | ||
|
|
028f5ca1f4 | ||
|
|
d6238c285a | ||
|
|
80e23509ba | ||
|
|
c07ddcefb0 | ||
|
|
4f407dabcd | ||
|
|
fd34659dc3 | ||
|
|
1f85860f7e | ||
|
|
14f3f6dd1a | ||
|
|
e527b463a5 | ||
|
|
7dc56dc064 | ||
|
|
0a98ee9e4f | ||
|
|
43d162e8fb | ||
|
|
e8f65bc652 | ||
|
|
037e6e749a | ||
|
|
d984fb1bae | ||
|
|
3661a01489 | ||
|
|
7fd131e01c | ||
|
|
5d8e54ae3e | ||
|
|
422885dce6 | ||
|
|
136574fbcb | ||
|
|
f81e7245fe | ||
|
|
0cb6b7b807 | ||
|
|
4a869778a9 | ||
|
|
a120053d12 | ||
|
|
a48988ccb3 | ||
|
|
a5f9c2fc23 | ||
|
|
6704f63a3d | ||
|
|
8e13d8abd0 | ||
|
|
8831b11a24 | ||
|
|
03a4f7ef9a | ||
|
|
c393973916 | ||
|
|
27f89e6634 | ||
|
|
4166c9fccb | ||
|
|
ced5f417b8 | ||
|
|
f67f84109e | ||
|
|
eea07462fa | ||
|
|
96d1b876bb | ||
|
|
56d3014298 | ||
|
|
ae6aa0f008 | ||
|
|
ecde604198 | ||
|
|
4af41ffce6 | ||
|
|
0650964559 | ||
|
|
2dac616bef | ||
|
|
5a9fdde156 | ||
|
|
9bb6e997aa | ||
|
|
cd03aa19a1 | ||
|
|
10065c8c28 | ||
|
|
1b426a3160 | ||
|
|
c91225b52e | ||
|
|
49a611df59 | ||
|
|
2ba6df2506 | ||
|
|
9b7bf4a101 | ||
|
|
a61badb564 | ||
|
|
2e21deeae8 | ||
|
|
132f10365a | ||
|
|
98bc70344f | ||
|
|
0fa8e01d1f | ||
|
|
f142f1cd70 | ||
|
|
eb5cd542d9 | ||
|
|
1257d31a56 | ||
|
|
2e9b980fc2 | ||
|
|
2b7f91d151 | ||
|
|
7665045fc6 | ||
|
|
af1583cdfc | ||
|
|
a46007d84d | ||
|
|
13b71b4e81 | ||
|
|
b084294dc0 | ||
|
|
6cf95918c5 | ||
|
|
0072449b01 | ||
|
|
f03efab907 | ||
|
|
cddc3b9e8f | ||
|
|
d977a5bd62 | ||
|
|
99c2fcc797 |
58
.github/workflows/auto-cache/action.yaml
vendored
58
.github/workflows/auto-cache/action.yaml
vendored
@@ -1,58 +0,0 @@
|
||||
name: 'automatically cache based on current runner'
|
||||
|
||||
inputs:
|
||||
path:
|
||||
description: 'path to cache'
|
||||
required: true
|
||||
key:
|
||||
description: 'key'
|
||||
required: true
|
||||
restore-keys:
|
||||
description: 'restore-keys'
|
||||
required: true
|
||||
save:
|
||||
description: 'whether to save the cache'
|
||||
default: 'true'
|
||||
required: false
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: 'cache hit occurred'
|
||||
value: ${{ (contains(runner.name, 'nsc') && steps.ns-cache.outputs.cache-hit) ||
|
||||
(!contains(runner.name, 'nsc') && inputs.save != 'false' && steps.gha-cache.outputs.cache-hit) ||
|
||||
(!contains(runner.name, 'nsc') && inputs.save == 'false' && steps.gha-cache-ro.outputs.cache-hit) }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: setup namespace cache
|
||||
id: ns-cache
|
||||
if: ${{ contains(runner.name, 'nsc') }}
|
||||
uses: namespacelabs/nscloud-cache-action@v1
|
||||
with:
|
||||
path: ${{ inputs.path }}
|
||||
|
||||
- name: setup github cache
|
||||
id: gha-cache
|
||||
if: ${{ !contains(runner.name, 'nsc') && inputs.save != 'false' }}
|
||||
uses: 'actions/cache@v4'
|
||||
with:
|
||||
path: ${{ inputs.path }}
|
||||
key: ${{ inputs.key }}
|
||||
restore-keys: ${{ inputs.restore-keys }}
|
||||
|
||||
- name: setup github cache
|
||||
id: gha-cache-ro
|
||||
if: ${{ !contains(runner.name, 'nsc') && inputs.save == 'false' }}
|
||||
uses: 'actions/cache/restore@v4'
|
||||
with:
|
||||
path: ${{ inputs.path }}
|
||||
key: ${{ inputs.key }}
|
||||
restore-keys: ${{ inputs.restore-keys }}
|
||||
|
||||
# make the directory manually in case we didn't get a hit, so it doesn't fail on future steps
|
||||
- id: scons-cache-setup
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ inputs.path }}
|
||||
sudo chmod -R 777 ${{ inputs.path }}
|
||||
sudo chown -R $USER ${{ inputs.path }}
|
||||
8
.github/workflows/badges.yaml
vendored
8
.github/workflows/badges.yaml
vendored
@@ -5,9 +5,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BASE_IMAGE: sunnypilot-base
|
||||
DOCKER_REGISTRY: ghcr.io/sunnypilot
|
||||
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $DOCKER_REGISTRY/$BASE_IMAGE:latest /bin/bash -c
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
|
||||
jobs:
|
||||
badges:
|
||||
@@ -20,10 +18,10 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Push badges
|
||||
run: |
|
||||
${{ env.RUN }} "python3 selfdrive/ui/translations/create_badges.py"
|
||||
python3 selfdrive/ui/translations/create_badges.py
|
||||
|
||||
rm .gitattributes
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ jobs:
|
||||
run: |
|
||||
echo '${{ needs.setup.outputs.model_matrix }}' > matrix.json
|
||||
built=(); while IFS= read -r line; do built+=("$line"); done < <(
|
||||
ls output | sed -E 's/^model-//' | sed -E 's/-[0-9]+$//' | sed -E 's/ \([^)]*\)//' | awk '{gsub(/^ +| +$/, ""); print}'
|
||||
find output -maxdepth 1 -name 'model-*' -printf "%f\n" | sed -E 's/^model-//' | sed -E 's/-[0-9]+$//' | sed -E 's/ \([^)]*\)//' | awk '{gsub(/^ +| +$/, ""); print}'
|
||||
)
|
||||
jq -c --argjson built "$(printf '%s\n' "${built[@]}" | jq -R . | jq -s .)" \
|
||||
'map(select(.display_name as $n | ($built | index($n | gsub("^ +| +$"; "")) | not)))' matrix.json > retry_matrix.json
|
||||
@@ -168,6 +168,7 @@ jobs:
|
||||
if: ${{ !cancelled() && (needs.get_and_build.result != 'failure' || needs.retry_get_and_build.result == 'success' || (needs.retry_failed_models.outputs.retry_matrix != '[]' && needs.retry_failed_models.outputs.retry_matrix != '')) }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
model: ${{ fromJson(needs.setup.outputs.model_matrix) }}
|
||||
|
||||
34
.github/workflows/cereal_validation.yaml
vendored
34
.github/workflows/cereal_validation.yaml
vendored
@@ -20,27 +20,23 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
PYTHONWARNINGS: error
|
||||
BASE_IMAGE: openpilot-base
|
||||
BUILD: selfdrive/test/docker_build.sh base
|
||||
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
|
||||
CI: 1
|
||||
|
||||
jobs:
|
||||
generate_cereal_artifact:
|
||||
name: Generate cereal validation artifacts
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: ${{ env.RUN }} "scons -j$(nproc) cereal"
|
||||
run: scons -j$(nproc) cereal
|
||||
- name: Generate the log file
|
||||
run: |
|
||||
${{ env.RUN }} "cereal/messaging/tests/validate_sp_cereal_upstream.py -g -f schema_instances.bin" && \
|
||||
ls -la
|
||||
ls -la cereal/messaging/tests
|
||||
export PYTHONPATH=${{ github.workspace }}
|
||||
python3 cereal/messaging/tests/validate_sp_cereal_upstream.py -g -f schema_instances.bin
|
||||
- name: 'Prepare artifact'
|
||||
run: |
|
||||
mkdir -p "cereal/messaging/tests/cereal_validations"
|
||||
@@ -57,20 +53,26 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: generate_cereal_artifact
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout sunnypilot
|
||||
uses: actions/checkout@v6
|
||||
- name: Checkout upstream openpilot
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: 'commaai/openpilot'
|
||||
path: openpilot
|
||||
submodules: true
|
||||
ref: "refs/heads/master"
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: ${{ env.RUN }} "scons -j$(nproc) cereal"
|
||||
working-directory: openpilot
|
||||
run: scons -j$(nproc) cereal
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: cereal_validations
|
||||
path: cereal/messaging/tests/cereal_validations
|
||||
path: openpilot/cereal/messaging/tests/cereal_validations
|
||||
- name: 'Run the validation'
|
||||
run: |
|
||||
chmod +x cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py
|
||||
${{ env.RUN }} "cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py -r -f cereal/messaging/tests/cereal_validations/schema_instances.bin"
|
||||
export PYTHONPATH=${{ github.workspace }}/openpilot
|
||||
chmod +x openpilot/cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py
|
||||
python3 openpilot/cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py -r -f openpilot/cereal/messaging/tests/cereal_validations/schema_instances.bin
|
||||
|
||||
101
.github/workflows/ci_weekly_report.yaml
vendored
101
.github/workflows/ci_weekly_report.yaml
vendored
@@ -1,101 +0,0 @@
|
||||
name: weekly CI test report
|
||||
on:
|
||||
schedule:
|
||||
- cron: '37 9 * * 1' # 9:37AM UTC -> 2:37AM PST every monday
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ci_runs:
|
||||
description: 'The amount of runs to trigger in CI test report'
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CI_RUNS: ${{ github.event.inputs.ci_runs || '50' }}
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
ci_runs: ${{ steps.ci_runs_setup.outputs.matrix }}
|
||||
steps:
|
||||
- id: ci_runs_setup
|
||||
name: CI_RUNS=${{ env.CI_RUNS }}
|
||||
run: |
|
||||
matrix=$(python3 -c "import json; print(json.dumps({ 'run_number' : list(range(${{ env.CI_RUNS }})) }))")
|
||||
echo "matrix=$matrix" >> $GITHUB_OUTPUT
|
||||
|
||||
ci_matrix_run:
|
||||
needs: [ setup ]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{fromJSON(needs.setup.outputs.ci_runs)}}
|
||||
uses: sunnypilot/sunnypilot/.github/workflows/ci_weekly_run.yaml@master
|
||||
with:
|
||||
run_number: ${{ matrix.run_number }}
|
||||
|
||||
report:
|
||||
needs: [ci_matrix_run]
|
||||
runs-on: ubuntu-latest
|
||||
if: always() && github.repository == 'commaai/openpilot'
|
||||
steps:
|
||||
- name: Get job results
|
||||
uses: actions/github-script@v8
|
||||
id: get-job-results
|
||||
with:
|
||||
script: |
|
||||
const jobs = await github
|
||||
.paginate("GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt}/jobs", {
|
||||
owner: "commaai",
|
||||
repo: "${{ github.event.repository.name }}",
|
||||
run_id: "${{ github.run_id }}",
|
||||
attempt: "${{ github.run_attempt }}",
|
||||
})
|
||||
var report = {}
|
||||
jobs.slice(1, jobs.length-1).forEach(job => {
|
||||
if (job.conclusion === "skipped") return;
|
||||
const jobName = job.name.split(" / ")[2];
|
||||
const runRegex = /\((.*?)\)/;
|
||||
const run = job.name.match(runRegex)[1];
|
||||
report[jobName] = report[jobName] || { successes: [], failures: [], canceled: [] };
|
||||
switch (job.conclusion) {
|
||||
case "success":
|
||||
report[jobName].successes.push({ "run_number": run, "link": job.html_url}); break;
|
||||
case "failure":
|
||||
report[jobName].failures.push({ "run_number": run, "link": job.html_url }); break;
|
||||
case "canceled":
|
||||
report[jobName].canceled.push({ "run_number": run, "link": job.html_url }); break;
|
||||
}
|
||||
});
|
||||
return JSON.stringify({"jobs": report});
|
||||
|
||||
- name: Add job results to summary
|
||||
env:
|
||||
JOB_RESULTS: ${{ fromJSON(steps.get-job-results.outputs.result) }}
|
||||
run: |
|
||||
cat <<EOF >> template.html
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Job</th>
|
||||
<th>✅ Passing</th>
|
||||
<th>❌ Failure Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key in jobs.keys() %}<tr>
|
||||
<td>{% for i in range(5) %}{% if i+1 <= (5 * jobs[key]["successes"]|length // ${{ env.CI_RUNS }}) %}🟩{% else %}🟥{% endif %}{% endfor%}</td>
|
||||
<td>{{ key }}</td>
|
||||
<td>{{ 100 * jobs[key]["successes"]|length // ${{ env.CI_RUNS }} }}%</td>
|
||||
<td>{% if jobs[key]["failures"]|length > 0 %}<details>{% for failure in jobs[key]["failures"] %}<a href="{{ failure['link'] }}">Log for run #{{ failure['run_number'] }}</a><br>{% endfor %}</details>{% else %}{% endif %}</td>
|
||||
</td>
|
||||
</tr>{% endfor %}
|
||||
</table>
|
||||
EOF
|
||||
|
||||
pip install jinja2-cli
|
||||
echo $JOB_RESULTS | jinja2 template.html > report.html
|
||||
echo "# CI Test Report - ${{ env.CI_RUNS }} Runs" >> $GITHUB_STEP_SUMMARY
|
||||
cat report.html >> $GITHUB_STEP_SUMMARY
|
||||
17
.github/workflows/ci_weekly_run.yaml
vendored
17
.github/workflows/ci_weekly_run.yaml
vendored
@@ -1,17 +0,0 @@
|
||||
name: weekly CI test run
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
run_number:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
concurrency:
|
||||
group: ci-run-${{ inputs.run_number }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
uses: sunnypilot/sunnypilot/.github/workflows/tests.yaml@master
|
||||
with:
|
||||
run_number: ${{ inputs.run_number }}
|
||||
21
.github/workflows/compile-openpilot/action.yaml
vendored
21
.github/workflows/compile-openpilot/action.yaml
vendored
@@ -1,21 +0,0 @@
|
||||
name: 'compile openpilot'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- shell: bash
|
||||
name: Build openpilot with all flags
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc)"
|
||||
${{ env.RUN }} "release/check-dirty.sh"
|
||||
- shell: bash
|
||||
name: Cleanup scons cache and rebuild
|
||||
run: |
|
||||
${{ env.RUN }} "rm -rf /tmp/scons_cache/* && \
|
||||
scons -j$(nproc) --cache-populate"
|
||||
- name: Save scons cache
|
||||
uses: actions/cache/save@v4
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
path: .ci_cache/scons_cache
|
||||
key: scons-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
|
||||
66
.github/workflows/docs-sp.yaml
vendored
Normal file
66
.github/workflows/docs-sp.yaml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
name: sunnypilot docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- docs
|
||||
paths:
|
||||
- 'docs_sp/**'
|
||||
- 'zensical.toml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs_sp/**'
|
||||
- 'zensical.toml'
|
||||
|
||||
concurrency:
|
||||
group: docs-sp-${{ github.event_name == 'push' && github.ref == 'refs/heads/docs' && github.run_id || github.head_ref || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: build sunnypilot docs
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install uv
|
||||
uv pip install --system zensical
|
||||
|
||||
- name: Build docs
|
||||
run: zensical build
|
||||
|
||||
# Push to docs.sunnypilot.ai
|
||||
- uses: actions/checkout@v6
|
||||
if: github.ref == 'refs/heads/docs' && github.repository == 'sunnypilot/sunnypilot'
|
||||
with:
|
||||
path: sunnypilot-docs
|
||||
ssh-key: ${{ secrets.OPENPILOT_DOCS_KEY }}
|
||||
repository: sunnypilot/sunnypilot-docs
|
||||
|
||||
- name: Push to GitHub Pages
|
||||
if: github.ref == 'refs/heads/docs' && github.repository == 'sunnypilot/sunnypilot'
|
||||
run: |
|
||||
set -x
|
||||
|
||||
source release/identity.sh
|
||||
|
||||
cd sunnypilot-docs
|
||||
git checkout --orphan tmp
|
||||
git rm -rf .
|
||||
|
||||
cp -r ../docs_site_sp/ docs/
|
||||
|
||||
touch docs/.nojekyll
|
||||
echo -n docs.sunnypilot.ai > docs/CNAME
|
||||
|
||||
git add -f .
|
||||
git commit -m "build sunnypilot docs"
|
||||
|
||||
git push -f origin tmp:gh-pages
|
||||
47
.github/workflows/forum-docs.yaml
vendored
Normal file
47
.github/workflows/forum-docs.yaml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Sync docs to Discourse
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["sunnypilot docs"]
|
||||
types:
|
||||
- completed
|
||||
branches:
|
||||
- docs
|
||||
|
||||
concurrency:
|
||||
group: forum-docs-sync
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
name: sync docs to Discourse
|
||||
runs-on: ubuntu-24.04
|
||||
if: >
|
||||
github.event.workflow_run.conclusion == 'success' &&
|
||||
github.repository == 'sunnypilot/sunnypilot'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: docs
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.3'
|
||||
|
||||
- name: Restore sync cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .discourse_sync_cache
|
||||
key: discourse-sync-${{ hashFiles('docs_sp/**/*.md') }}
|
||||
restore-keys: |
|
||||
discourse-sync-
|
||||
|
||||
- name: Sync to Discourse
|
||||
env:
|
||||
DISCOURSE_URL: ${{ secrets.DISCOURSE_URL }}
|
||||
DISCOURSE_API_KEY: ${{ secrets.DISCOURSE_API_KEY }}
|
||||
DISCOURSE_API_USER: ${{ secrets.DISCOURSE_API_USER }}
|
||||
DISCOURSE_CATEGORY: ${{ vars.DISCOURSE_DOCS_CATEGORY || 'documentation' }}
|
||||
DOCS_BASE_URL: https://docs.sunnypilot.ai
|
||||
run: ruby docs_sp/tools/sync_docs_discourse.rb --verbose
|
||||
151
.github/workflows/mici_raylib_ui_preview.yaml
vendored
151
.github/workflows/mici_raylib_ui_preview.yaml
vendored
@@ -1,151 +0,0 @@
|
||||
name: "mici raylib ui preview"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request_target:
|
||||
types: [assigned, opened, synchronize, reopened, edited]
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- 'selfdrive/assets/**'
|
||||
- 'selfdrive/ui/**'
|
||||
- 'system/ui/**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
UI_JOB_NAME: "Create mici raylib UI Report"
|
||||
REPORT_NAME: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
|
||||
SHA: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.sha || github.event.pull_request.head.sha }}
|
||||
BRANCH_NAME: "openpilot/pr-${{ github.event.number }}-mici-raylib-ui"
|
||||
MASTER_BRANCH_NAME: "openpilot_master_ui_mici_raylib"
|
||||
# All report files are pushed here
|
||||
REPORT_FILES_BRANCH_NAME: "mici-raylib-ui-reports"
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
name: preview
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
actions: read
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Waiting for ui generation to end
|
||||
uses: lewagon/wait-on-check-action@v1.3.4
|
||||
with:
|
||||
ref: ${{ env.SHA }}
|
||||
check-name: ${{ env.UI_JOB_NAME }}
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
allowed-conclusions: success
|
||||
wait-interval: 20
|
||||
|
||||
- name: Getting workflow run ID
|
||||
id: get_run_id
|
||||
run: |
|
||||
echo "run_id=$(curl https://api.github.com/repos/${{ github.repository }}/commits/${{ env.SHA }}/check-runs | jq -r '.check_runs[] | select(.name == "${{ env.UI_JOB_NAME }}") | .html_url | capture("(?<number>[0-9]+)") | .number')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Getting proposed ui # filename: pr_ui/mici_ui_replay.mp4
|
||||
id: download-artifact
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run_id: ${{ steps.get_run_id.outputs.run_id }}
|
||||
search_artifacts: true
|
||||
name: mici-raylib-report-1-${{ env.REPORT_NAME }}
|
||||
path: ${{ github.workspace }}/pr_ui
|
||||
|
||||
- name: Getting master ui # filename: master_ui_raylib/mici_ui_replay.mp4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: sunnypilot/ci-artifacts
|
||||
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
|
||||
path: ${{ github.workspace }}/master_ui_raylib
|
||||
ref: ${{ env.MASTER_BRANCH_NAME }}
|
||||
|
||||
- name: Saving new master ui
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
working-directory: ${{ github.workspace }}/master_ui_raylib
|
||||
run: |
|
||||
git checkout --orphan=new_master_ui_mici_raylib
|
||||
git rm -rf *
|
||||
git branch -D ${{ env.MASTER_BRANCH_NAME }}
|
||||
git branch -m ${{ env.MASTER_BRANCH_NAME }}
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
mv ${{ github.workspace }}/pr_ui/* .
|
||||
git add .
|
||||
git commit -m "mici raylib video for commit ${{ env.SHA }}"
|
||||
git push origin ${{ env.MASTER_BRANCH_NAME }} --force
|
||||
|
||||
- name: Setup FFmpeg
|
||||
uses: AnimMouse/setup-ffmpeg@ae28d57dabbb148eff63170b6bf7f2b60062cbae
|
||||
|
||||
- name: Finding diff
|
||||
if: github.event_name == 'pull_request_target'
|
||||
id: find_diff
|
||||
run: |
|
||||
# Find the video file from PR
|
||||
pr_video="${{ github.workspace }}/pr_ui/mici_ui_replay_proposed.mp4"
|
||||
mv "${{ github.workspace }}/pr_ui/mici_ui_replay.mp4" "$pr_video"
|
||||
|
||||
master_video="${{ github.workspace }}/pr_ui/mici_ui_replay_master.mp4"
|
||||
mv "${{ github.workspace }}/master_ui_raylib/mici_ui_replay.mp4" "$master_video"
|
||||
|
||||
# Run report
|
||||
export PYTHONPATH=${{ github.workspace }}
|
||||
baseurl="https://github.com/sunnypilot/ci-artifacts/raw/refs/heads/${{ env.BRANCH_NAME }}"
|
||||
diff_exit_code=0
|
||||
python3 ${{ github.workspace }}/selfdrive/ui/tests/diff/diff.py "${{ github.workspace }}/pr_ui/mici_ui_replay_master.mp4" "${{ github.workspace }}/pr_ui/mici_ui_replay_proposed.mp4" "diff.html" --basedir "$baseurl" --no-open || diff_exit_code=$?
|
||||
|
||||
# Copy diff report files
|
||||
cp ${{ github.workspace }}/selfdrive/ui/tests/diff/report/diff.html ${{ github.workspace }}/pr_ui/
|
||||
cp ${{ github.workspace }}/selfdrive/ui/tests/diff/report/diff.mp4 ${{ github.workspace }}/pr_ui/
|
||||
|
||||
REPORT_URL="https://sunnypilot.github.io/ci-artifacts/diff_pr_${{ github.event.number }}.html"
|
||||
if [ $diff_exit_code -eq 0 ]; then
|
||||
DIFF="✅ Videos are identical! [View Diff Report]($REPORT_URL)"
|
||||
else
|
||||
DIFF="❌ <strong>Videos differ!</strong> [View Diff Report]($REPORT_URL)"
|
||||
fi
|
||||
echo "DIFF=$DIFF" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Saving proposed ui
|
||||
if: github.event_name == 'pull_request_target'
|
||||
working-directory: ${{ github.workspace }}/master_ui_raylib
|
||||
run: |
|
||||
# Overwrite PR branch w/ proposed ui, and master ui at this point in time for future reference
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
git checkout --orphan=${{ env.BRANCH_NAME }}
|
||||
git rm -rf *
|
||||
mv ${{ github.workspace }}/pr_ui/* .
|
||||
git add .
|
||||
git commit -m "mici raylib video for PR #${{ github.event.number }}"
|
||||
git push origin ${{ env.BRANCH_NAME }} --force
|
||||
|
||||
# Append diff report to report files branch
|
||||
git fetch origin ${{ env.REPORT_FILES_BRANCH_NAME }}
|
||||
git checkout ${{ env.REPORT_FILES_BRANCH_NAME }}
|
||||
cp ${{ github.workspace }}/selfdrive/ui/tests/diff/report/diff.html diff_pr_${{ github.event.number }}.html
|
||||
git add diff_pr_${{ github.event.number }}.html
|
||||
git commit -m "mici raylib ui diff report for PR #${{ github.event.number }}" || echo "No changes to commit"
|
||||
git push origin ${{ env.REPORT_FILES_BRANCH_NAME }}
|
||||
|
||||
- name: Comment Video on PR
|
||||
if: github.event_name == 'pull_request_target'
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
message: |
|
||||
<!-- _(run_id_video_mici_raylib **${{ github.run_id }}**)_ -->
|
||||
## mici raylib UI Preview
|
||||
${{ steps.find_diff.outputs.DIFF }}
|
||||
comment_tag: run_id_video_mici_raylib
|
||||
pr_number: ${{ github.event.number }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
6
.github/workflows/model_review.yaml
vendored
6
.github/workflows/model_review.yaml
vendored
@@ -17,6 +17,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- name: Checkout master
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
@@ -25,14 +27,12 @@ jobs:
|
||||
- run: git lfs pull
|
||||
- run: cd base && git lfs pull
|
||||
|
||||
- run: pip install onnx
|
||||
|
||||
- name: scripts/reporter.py
|
||||
id: report
|
||||
run: |
|
||||
echo "content<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "## Model Review" >> $GITHUB_OUTPUT
|
||||
MASTER_PATH=${{ github.workspace }}/base python scripts/reporter.py >> $GITHUB_OUTPUT
|
||||
PYTHONPATH=${{ github.workspace }} MASTER_PATH=${{ github.workspace }}/base python scripts/reporter.py >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Post model report comment
|
||||
|
||||
105
.github/workflows/post-to-discourse/action.yml
vendored
105
.github/workflows/post-to-discourse/action.yml
vendored
@@ -1,105 +0,0 @@
|
||||
name: 'Post to Discourse'
|
||||
description: 'Posts a message to a Discourse topic (existing or new)'
|
||||
|
||||
inputs:
|
||||
discourse-url:
|
||||
description: 'Discourse instance URL (e.g., https://discourse.example.com)'
|
||||
required: true
|
||||
api-key:
|
||||
description: 'Discourse API key'
|
||||
required: true
|
||||
api-username:
|
||||
description: 'Discourse API username'
|
||||
required: true
|
||||
topic-id:
|
||||
description: 'Discourse topic ID to post to (use this OR category-id + title)'
|
||||
required: false
|
||||
category-id:
|
||||
description: 'Category ID for new topic (required if topic-id not provided)'
|
||||
required: false
|
||||
title:
|
||||
description: 'Title for new topic (required if topic-id not provided)'
|
||||
required: false
|
||||
message:
|
||||
description: 'Message content (markdown supported)'
|
||||
required: true
|
||||
|
||||
outputs:
|
||||
post-number:
|
||||
description: 'The post number in the topic'
|
||||
value: ${{ steps.post.outputs.post_number }}
|
||||
post-url:
|
||||
description: 'Direct URL to the post'
|
||||
value: ${{ steps.post.outputs.post_url }}
|
||||
topic-id:
|
||||
description: 'The topic ID (useful when creating a new topic)'
|
||||
value: ${{ steps.post.outputs.topic_id }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Post to Discourse
|
||||
id: post
|
||||
shell: bash
|
||||
run: |
|
||||
# Validate inputs
|
||||
if [ -z "${{ inputs.topic-id }}" ] && ([ -z "${{ inputs.category-id }}" ] || [ -z "${{ inputs.title }}" ]); then
|
||||
echo "❌ Error: Must provide either topic-id OR both category-id and title"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "${{ inputs.topic-id }}" ] && ([ -n "${{ inputs.category-id }}" ] || [ -n "${{ inputs.title }}" ]); then
|
||||
echo "⚠️ Warning: Both topic-id and category-id/title provided. Will post to existing topic."
|
||||
fi
|
||||
|
||||
# Determine if creating new topic or posting to existing
|
||||
if [ -n "${{ inputs.topic-id }}" ]; then
|
||||
echo "📝 Posting to existing topic ID: ${{ inputs.topic-id }}"
|
||||
|
||||
# Create JSON payload for posting to existing topic
|
||||
PAYLOAD=$(jq -n \
|
||||
--arg content '${{ inputs.message }}' \
|
||||
--arg topic_id "${{ inputs.topic-id }}" \
|
||||
'{topic_id: $topic_id, raw: $content}')
|
||||
else
|
||||
echo "✨ Creating new topic: ${{ inputs.title }}"
|
||||
|
||||
# Create JSON payload for new topic
|
||||
PAYLOAD=$(jq -n \
|
||||
--arg content '${{ inputs.message }}' \
|
||||
--arg title "${{ inputs.title }}" \
|
||||
--arg category "${{ inputs.category-id }}" \
|
||||
'{title: $title, category: ($category | tonumber), raw: $content}')
|
||||
fi
|
||||
|
||||
# Post to Discourse
|
||||
RESPONSE=$(curl -s -w "\n%{http_code}" \
|
||||
-X POST "${{ inputs.discourse-url }}/posts.json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Api-Key: ${{ inputs.api-key }}" \
|
||||
-H "Api-Username: ${{ inputs.api-username }}" \
|
||||
-d "$PAYLOAD")
|
||||
|
||||
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
|
||||
BODY=$(echo "$RESPONSE" | sed '$d')
|
||||
|
||||
if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then
|
||||
echo "✅ Successfully posted to Discourse!"
|
||||
|
||||
POST_NUMBER=$(echo "$BODY" | jq -r '.post_number // "unknown"')
|
||||
TOPIC_ID=$(echo "$BODY" | jq -r '.topic_id // "${{ inputs.topic-id }}"')
|
||||
POST_URL="${{ inputs.discourse-url }}/t/${TOPIC_ID}/${POST_NUMBER}"
|
||||
|
||||
echo "post_number=${POST_NUMBER}" >> $GITHUB_OUTPUT
|
||||
echo "post_url=${POST_URL}" >> $GITHUB_OUTPUT
|
||||
echo "topic_id=${TOPIC_ID}" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "Topic ID: ${TOPIC_ID}"
|
||||
echo "Post number: ${POST_NUMBER}"
|
||||
echo "URL: ${POST_URL}"
|
||||
else
|
||||
echo "❌ Failed to post to Discourse"
|
||||
echo "HTTP Code: ${HTTP_CODE}"
|
||||
echo "Response: ${BODY}"
|
||||
exit 1
|
||||
fi
|
||||
4
.github/workflows/prebuilt.yaml
vendored
4
.github/workflows/prebuilt.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
|
||||
env:
|
||||
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
BUILD: release/ci/docker_build_sp.sh prebuilt
|
||||
BUILD: release/ci/docker_build_sp.sh
|
||||
|
||||
jobs:
|
||||
build_prebuilt:
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
wait-interval: 30
|
||||
running-workflow-name: 'build prebuilt'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
check-regexp: ^((?!.*(build master-ci).*).)*$
|
||||
check-regexp: ^((?!.*(build master-ci|create badges).*).)*$
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
175
.github/workflows/raylib_ui_preview.yaml
vendored
175
.github/workflows/raylib_ui_preview.yaml
vendored
@@ -1,175 +0,0 @@
|
||||
name: "raylib ui preview"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request_target:
|
||||
types: [assigned, opened, synchronize, reopened, edited]
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- 'selfdrive/assets/**'
|
||||
- 'selfdrive/ui/**'
|
||||
- 'system/ui/**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
UI_JOB_NAME: "Create raylib UI Report"
|
||||
REPORT_NAME: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
|
||||
SHA: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.sha || github.event.pull_request.head.sha }}
|
||||
BRANCH_NAME: "openpilot/pr-${{ github.event.number }}-raylib-ui"
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
name: preview
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
actions: read
|
||||
steps:
|
||||
- name: Waiting for ui generation to start
|
||||
run: sleep 30
|
||||
|
||||
- name: Waiting for ui generation to end
|
||||
uses: lewagon/wait-on-check-action@v1.3.4
|
||||
with:
|
||||
ref: ${{ env.SHA }}
|
||||
check-name: ${{ env.UI_JOB_NAME }}
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
allowed-conclusions: success
|
||||
wait-interval: 20
|
||||
|
||||
- name: Getting workflow run ID
|
||||
id: get_run_id
|
||||
run: |
|
||||
echo "run_id=$(curl https://api.github.com/repos/${{ github.repository }}/commits/${{ env.SHA }}/check-runs | jq -r '.check_runs[] | select(.name == "${{ env.UI_JOB_NAME }}") | .html_url | capture("(?<number>[0-9]+)") | .number')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Getting proposed ui
|
||||
id: download-artifact
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run_id: ${{ steps.get_run_id.outputs.run_id }}
|
||||
search_artifacts: true
|
||||
name: raylib-report-1-${{ env.REPORT_NAME }}
|
||||
path: ${{ github.workspace }}/pr_ui
|
||||
|
||||
- name: Getting master ui
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: sunnypilot/ci-artifacts
|
||||
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
|
||||
path: ${{ github.workspace }}/master_ui_raylib
|
||||
ref: openpilot_master_ui_raylib
|
||||
|
||||
- name: Saving new master ui
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
working-directory: ${{ github.workspace }}/master_ui_raylib
|
||||
run: |
|
||||
git checkout --orphan=new_master_ui_raylib
|
||||
git rm -rf *
|
||||
git branch -D openpilot_master_ui_raylib
|
||||
git branch -m openpilot_master_ui_raylib
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
mv ${{ github.workspace }}/pr_ui/*.png .
|
||||
git add .
|
||||
git commit -m "raylib screenshots for commit ${{ env.SHA }}"
|
||||
git push origin openpilot_master_ui_raylib --force
|
||||
|
||||
- name: Finding diff
|
||||
if: github.event_name == 'pull_request_target'
|
||||
id: find_diff
|
||||
run: >-
|
||||
sudo apt-get update && sudo apt-get install -y imagemagick
|
||||
|
||||
scenes=$(find ${{ github.workspace }}/pr_ui/*.png -type f -printf "%f\n" | cut -d '.' -f 1 | grep -v 'pair_device')
|
||||
A=($scenes)
|
||||
|
||||
DIFF=""
|
||||
TABLE="<details><summary>All Screenshots</summary>"
|
||||
TABLE="${TABLE}<table>"
|
||||
|
||||
for ((i=0; i<${#A[*]}; i=i+1));
|
||||
do
|
||||
# Check if the master file exists
|
||||
if [ ! -f "${{ github.workspace }}/master_ui_raylib/${A[$i]}.png" ]; then
|
||||
# This is a new file in PR UI that doesn't exist in master
|
||||
DIFF="${DIFF}<details open>"
|
||||
DIFF="${DIFF}<summary>${A[$i]} : \$\${\\color{cyan}\\text{NEW}}\$\$</summary>"
|
||||
DIFF="${DIFF}<table>"
|
||||
|
||||
DIFF="${DIFF}<tr>"
|
||||
DIFF="${DIFF} <td> <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
|
||||
DIFF="${DIFF}</tr>"
|
||||
|
||||
DIFF="${DIFF}</table>"
|
||||
DIFF="${DIFF}</details>"
|
||||
elif ! compare -fuzz 2% -highlight-color DeepSkyBlue1 -lowlight-color Black -compose Src ${{ github.workspace }}/master_ui_raylib/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png; then
|
||||
convert ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png -transparent black mask.png
|
||||
composite mask.png ${{ github.workspace }}/master_ui_raylib/${A[$i]}.png composite_diff.png
|
||||
convert -delay 100 ${{ github.workspace }}/master_ui_raylib/${A[$i]}.png composite_diff.png -loop 0 ${{ github.workspace }}/pr_ui/${A[$i]}_diff.gif
|
||||
|
||||
mv ${{ github.workspace }}/master_ui_raylib/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}_master_ref.png
|
||||
|
||||
DIFF="${DIFF}<details open>"
|
||||
DIFF="${DIFF}<summary>${A[$i]} : \$\${\\color{red}\\text{DIFFERENT}}\$\$</summary>"
|
||||
DIFF="${DIFF}<table>"
|
||||
|
||||
DIFF="${DIFF}<tr>"
|
||||
DIFF="${DIFF} <td> master <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_master_ref.png\"> </td>"
|
||||
DIFF="${DIFF} <td> proposed <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
|
||||
DIFF="${DIFF}</tr>"
|
||||
|
||||
DIFF="${DIFF}<tr>"
|
||||
DIFF="${DIFF} <td> diff <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_diff.png\"> </td>"
|
||||
DIFF="${DIFF} <td> composite diff <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_diff.gif\"> </td>"
|
||||
DIFF="${DIFF}</tr>"
|
||||
|
||||
DIFF="${DIFF}</table>"
|
||||
DIFF="${DIFF}</details>"
|
||||
else
|
||||
rm -f ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png
|
||||
fi
|
||||
|
||||
INDEX=$(($i % 2))
|
||||
if [[ $INDEX -eq 0 ]]; then
|
||||
TABLE="${TABLE}<tr>"
|
||||
fi
|
||||
TABLE="${TABLE} <td> <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
|
||||
if [[ $INDEX -eq 1 || $(($i + 1)) -eq ${#A[*]} ]]; then
|
||||
TABLE="${TABLE}</tr>"
|
||||
fi
|
||||
done
|
||||
|
||||
TABLE="${TABLE}</table></details>"
|
||||
|
||||
echo "DIFF=$DIFF$TABLE" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Saving proposed ui
|
||||
if: github.event_name == 'pull_request_target'
|
||||
working-directory: ${{ github.workspace }}/master_ui_raylib
|
||||
run: |
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
git checkout --orphan=${{ env.BRANCH_NAME }}
|
||||
git rm -rf *
|
||||
mv ${{ github.workspace }}/pr_ui/* .
|
||||
git add .
|
||||
git commit -m "raylib screenshots for PR #${{ github.event.number }}"
|
||||
git push origin ${{ env.BRANCH_NAME }} --force
|
||||
|
||||
- name: Comment Screenshots on PR
|
||||
if: github.event_name == 'pull_request_target'
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
message: |
|
||||
<!-- _(run_id_screenshots_raylib **${{ github.run_id }}**)_ -->
|
||||
## raylib UI Preview
|
||||
${{ steps.find_diff.outputs.DIFF }}
|
||||
comment_tag: run_id_screenshots_raylib
|
||||
pr_number: ${{ github.event.number }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
17
.github/workflows/release.yaml
vendored
17
.github/workflows/release.yaml
vendored
@@ -7,20 +7,12 @@ on:
|
||||
jobs:
|
||||
build___nightly:
|
||||
name: build __nightly
|
||||
env:
|
||||
ImageOS: ubuntu24
|
||||
container:
|
||||
image: ghcr.io/sunnypilot/sunnypilot-base:latest
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
permissions:
|
||||
checks: read
|
||||
contents: write
|
||||
steps:
|
||||
- name: Install wait-on-check-action dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libyaml-dev
|
||||
- name: Wait for green check mark
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
uses: lewagon/wait-on-check-action@ccfb013c15c8afb7bf2b7c028fb74dc5a068cccc
|
||||
@@ -29,14 +21,11 @@ jobs:
|
||||
wait-interval: 30
|
||||
running-workflow-name: 'build __nightly'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
check-regexp: ^((?!.*(build prebuilt).*).)*$
|
||||
- uses: actions/checkout@v6
|
||||
check-regexp: ^((?!.*(build prebuilt|create badges).*).)*$
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
- name: Pull LFS
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
git lfs pull
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Push __nightly
|
||||
run: BRANCH=__nightly release/build_stripped.sh
|
||||
|
||||
45
.github/workflows/repo-maintenance.yaml
vendored
45
.github/workflows/repo-maintenance.yaml
vendored
@@ -6,9 +6,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BASE_IMAGE: sunnypilot-base
|
||||
BUILD: release/ci/docker_build_sp.sh base
|
||||
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
|
||||
jobs:
|
||||
update_translations:
|
||||
@@ -16,10 +14,11 @@ jobs:
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Update translations
|
||||
run: |
|
||||
${{ env.RUN }} "python3 selfdrive/ui/update_translations.py --vanish"
|
||||
run: python3 selfdrive/ui/update_translations.py --vanish
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
|
||||
with:
|
||||
@@ -35,34 +34,44 @@ jobs:
|
||||
package_updates:
|
||||
name: package_updates
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/sunnypilot/sunnypilot-base:latest
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: uv lock
|
||||
if: github.repository == 'commaai/openpilot'
|
||||
run: |
|
||||
python3 -m ensurepip --upgrade
|
||||
pip3 install uv
|
||||
uv lock --upgrade
|
||||
run: uv lock --upgrade
|
||||
- name: uv pip tree
|
||||
id: pip_tree
|
||||
run: |
|
||||
echo 'PIP_TREE<<EOF' >> $GITHUB_OUTPUT
|
||||
uv pip tree >> $GITHUB_OUTPUT
|
||||
echo 'EOF' >> $GITHUB_OUTPUT
|
||||
- name: venv size
|
||||
id: venv_size
|
||||
run: |
|
||||
echo 'VENV_SIZE<<EOF' >> $GITHUB_OUTPUT
|
||||
echo "Total: $(du -sh .venv | cut -f1)" >> $GITHUB_OUTPUT
|
||||
echo "" >> $GITHUB_OUTPUT
|
||||
echo "Top 10 by size:" >> $GITHUB_OUTPUT
|
||||
du -sh .venv/lib/python*/site-packages/* 2>/dev/null \
|
||||
| grep -v '\.dist-info' \
|
||||
| grep -v '__pycache__' \
|
||||
| sort -rh \
|
||||
| head -10 \
|
||||
| while IFS=$'\t' read size path; do echo "$size ${path##*/}"; done >> $GITHUB_OUTPUT
|
||||
echo 'EOF' >> $GITHUB_OUTPUT
|
||||
- name: bump submodules
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
git config submodule.msgq.update none
|
||||
git config submodule.rednose_repo.update none
|
||||
git config submodule.teleoprtc_repo.update none
|
||||
git config submodule.tinygrad.update none
|
||||
git submodule update --remote
|
||||
git add .
|
||||
- name: update car docs
|
||||
run: |
|
||||
export PYTHONPATH="$PWD"
|
||||
scons -j$(nproc) --minimal opendbc_repo
|
||||
python selfdrive/car/docs.py
|
||||
git add docs/CARS.md
|
||||
@@ -80,6 +89,12 @@ jobs:
|
||||
Automatic PR from repo-maintenance -> package_updates
|
||||
|
||||
```
|
||||
$ du -sh .venv && du -sh .venv/lib/python*/site-packages/* | sort -rh | head -10
|
||||
${{ steps.venv_size.outputs.VENV_SIZE }}
|
||||
```
|
||||
|
||||
```
|
||||
$ uv pip tree
|
||||
${{ steps.pip_tree.outputs.PIP_TREE }}
|
||||
```
|
||||
labels: bot
|
||||
|
||||
52
.github/workflows/setup-with-retry/action.yaml
vendored
52
.github/workflows/setup-with-retry/action.yaml
vendored
@@ -1,52 +0,0 @@
|
||||
name: 'openpilot env setup, with retry on failure'
|
||||
|
||||
inputs:
|
||||
docker_hub_pat:
|
||||
description: 'Auth token for Docker Hub, required for BuildJet jobs'
|
||||
required: false
|
||||
default: ''
|
||||
sleep_time:
|
||||
description: 'Time to sleep between retries'
|
||||
required: false
|
||||
default: 30
|
||||
|
||||
outputs:
|
||||
duration:
|
||||
description: 'Duration of the setup process in seconds'
|
||||
value: ${{ steps.get_duration.outputs.duration }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: start_time
|
||||
shell: bash
|
||||
run: echo "START_TIME=$(date +%s)" >> $GITHUB_ENV
|
||||
- id: setup1
|
||||
uses: ./.github/workflows/setup
|
||||
continue-on-error: true
|
||||
with:
|
||||
is_retried: true
|
||||
- if: steps.setup1.outcome == 'failure'
|
||||
shell: bash
|
||||
run: sleep ${{ inputs.sleep_time }}
|
||||
- id: setup2
|
||||
if: steps.setup1.outcome == 'failure'
|
||||
uses: ./.github/workflows/setup
|
||||
continue-on-error: true
|
||||
with:
|
||||
is_retried: true
|
||||
- if: steps.setup2.outcome == 'failure'
|
||||
shell: bash
|
||||
run: sleep ${{ inputs.sleep_time }}
|
||||
- id: setup3
|
||||
if: steps.setup2.outcome == 'failure'
|
||||
uses: ./.github/workflows/setup
|
||||
with:
|
||||
is_retried: true
|
||||
- id: get_duration
|
||||
shell: bash
|
||||
run: |
|
||||
END_TIME=$(date +%s)
|
||||
DURATION=$((END_TIME - START_TIME))
|
||||
echo "Total duration: $DURATION seconds"
|
||||
echo "duration=$DURATION" >> $GITHUB_OUTPUT
|
||||
56
.github/workflows/setup/action.yaml
vendored
56
.github/workflows/setup/action.yaml
vendored
@@ -1,56 +0,0 @@
|
||||
name: 'openpilot env setup'
|
||||
|
||||
inputs:
|
||||
is_retried:
|
||||
description: 'A mock param that asserts that we use the setup-with-retry instead of this action directly'
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
# assert that this action is retried using the setup-with-retry
|
||||
- shell: bash
|
||||
if: ${{ inputs.is_retried == 'false' }}
|
||||
run: |
|
||||
echo "You should not run this action directly. Use setup-with-retry instead"
|
||||
exit 1
|
||||
|
||||
- shell: bash
|
||||
name: No retries!
|
||||
run: |
|
||||
if [ "${{ github.run_attempt }}" -gt ${{ github.event.pull_request.head.repo.fork && github.event.pull_request.author_association == 'NONE' && 2 || 1}} ]; then
|
||||
echo -e "\033[0;31m##################################################"
|
||||
echo -e "\033[0;31m Retries not allowed! Fix the flaky test! "
|
||||
echo -e "\033[0;31m##################################################\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# do this after checkout to ensure our custom LFS config is used to pull from GitLab
|
||||
- shell: bash
|
||||
run: git lfs pull
|
||||
|
||||
# build cache
|
||||
- id: date
|
||||
shell: bash
|
||||
run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
|
||||
- shell: bash
|
||||
run: echo "$CACHE_COMMIT_DATE"
|
||||
- id: scons-cache
|
||||
uses: ./.github/workflows/auto-cache
|
||||
with:
|
||||
path: .ci_cache/scons_cache
|
||||
key: scons-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
scons-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}
|
||||
scons-${{ runner.arch }}
|
||||
# as suggested here: https://github.com/moby/moby/issues/32816#issuecomment-910030001
|
||||
- id: normalize-file-permissions
|
||||
shell: bash
|
||||
name: Normalize file permissions to ensure a consistent docker build cache
|
||||
run: |
|
||||
find . -type f -executable -not -perm 755 -exec chmod 755 {} \;
|
||||
find . -type f -not -executable -not -perm 644 -exec chmod 644 {} \;
|
||||
# build our docker image
|
||||
- shell: bash
|
||||
run: eval ${{ env.BUILD }}
|
||||
12
.github/workflows/sunnypilot-build-model.yaml
vendored
12
.github/workflows/sunnypilot-build-model.yaml
vendored
@@ -173,9 +173,18 @@ jobs:
|
||||
|
||||
echo "Compiling: $onnx_file -> $output_file"
|
||||
QCOM=1 python3 "${{ env.TINYGRAD_PATH }}/examples/openpilot/compile3.py" "$onnx_file" "$output_file"
|
||||
QCOM=1 python3 "${{ env.MODELS_DIR }}/../get_model_metadata.py" "$onnx_file" || true
|
||||
DEV=QCOM FLOAT16=1 NOLOCALS=1 JIT_BATCH_SIZE=0 python3 "${{ env.MODELS_DIR }}/../get_model_metadata.py" "$onnx_file" || true
|
||||
done
|
||||
|
||||
- name: Validate Model Outputs
|
||||
run: |
|
||||
source /etc/profile
|
||||
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
|
||||
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
|
||||
python3 "${{ github.workspace }}/release/ci/model_generator.py" \
|
||||
--validate-only \
|
||||
--model-dir "${{ env.MODELS_DIR }}"
|
||||
|
||||
- name: Prepare Output
|
||||
run: |
|
||||
sudo rm -rf ${{ env.OUTPUT_DIR }}
|
||||
@@ -184,7 +193,6 @@ jobs:
|
||||
# Copy the model files
|
||||
rsync -avm \
|
||||
--include='*.dlc' \
|
||||
--include='*.thneed' \
|
||||
--include='*.pkl' \
|
||||
--include='*.onnx' \
|
||||
--exclude='*' \
|
||||
|
||||
@@ -180,8 +180,6 @@ jobs:
|
||||
./release/release_files.py | sort | uniq | rsync -rRl${RUNNER_DEBUG:+v} --files-from=- . $BUILD_DIR/
|
||||
cd $BUILD_DIR
|
||||
sed -i '/from .board.jungle import PandaJungle, PandaJungleDFU/s/^/#/' panda/__init__.py
|
||||
echo "Building sunnypilot's modeld..."
|
||||
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal sunnypilot/modeld
|
||||
echo "Building sunnypilot's modeld_v2..."
|
||||
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal sunnypilot/modeld_v2
|
||||
echo "Building sunnypilot's locationd..."
|
||||
@@ -219,7 +217,6 @@ jobs:
|
||||
--exclude='**/.venv/' \
|
||||
--exclude='selfdrive/modeld/models/driving_vision.onnx' \
|
||||
--exclude='selfdrive/modeld/models/driving_policy.onnx' \
|
||||
--exclude='sunnypilot/modeld*/models/supercombo.onnx' \
|
||||
--exclude='third_party/*x86*' \
|
||||
--exclude='third_party/*Darwin*' \
|
||||
--delete-excluded \
|
||||
|
||||
@@ -241,10 +241,3 @@ jobs:
|
||||
gh run watch "$RUN_ID"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Trigger prebuilt workflow
|
||||
if: success() && steps.push-changes.outputs.has_changes == 'true'
|
||||
run: |
|
||||
gh workflow run sunnypilot-build-prebuilt.yaml --ref "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
93
.github/workflows/sync-docs-discourse.yml
vendored
Normal file
93
.github/workflows/sync-docs-discourse.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
# Discourse Docs Sync — one-way push from docs_sp/ Markdown to Discourse API.
|
||||
#
|
||||
# WARNING: This workflow is strictly for Discourse API syncing.
|
||||
# Do NOT add Zensical build steps, GitHub Pages deployment, or any
|
||||
# static-site generation to this file. Those belong in docs.yaml.
|
||||
|
||||
name: Sync Docs to Discourse
|
||||
|
||||
on:
|
||||
push:
|
||||
# paths:
|
||||
# - "docs_sp/**"
|
||||
# - "zensical.toml"
|
||||
pull_request:
|
||||
# paths:
|
||||
# - "docs_sp/**"
|
||||
# - "zensical.toml"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
smoke-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup environment
|
||||
run: ./tools/op.sh setup
|
||||
|
||||
- name: Smoke test - post one doc to Discourse
|
||||
env:
|
||||
DISCOURSE_URL: ${{ secrets.DISCOURSE_URL }}
|
||||
DISCOURSE_API_KEY: ${{ secrets.DISCOURSE_API_KEY }}
|
||||
DISCOURSE_API_USER: ${{ secrets.DISCOURSE_API_USER }}
|
||||
DISCOURSE_CATEGORY_MAP: '{"getting-started": 133}'
|
||||
run: |
|
||||
uv run --python 3.12 python -c "
|
||||
import os, sys
|
||||
sys.path.insert(0, 'docs_sp/tools')
|
||||
from pathlib import Path
|
||||
from converter import convert
|
||||
from discourse_client import DiscourseClient, DiscourseConfig
|
||||
|
||||
DOC_PATH = 'getting-started/what-is-sunnypilot.md'
|
||||
GITHUB_BRANCH = os.environ.get('GITHUB_REF_NAME', 'master')
|
||||
|
||||
raw = (Path('docs_sp') / DOC_PATH).read_text()
|
||||
body = convert(raw, file_path=DOC_PATH)
|
||||
|
||||
# Append sync footer
|
||||
gh_url = f'https://github.com/sunnypilot/sunnypilot/blob/{GITHUB_BRANCH}/docs_sp/{DOC_PATH}'
|
||||
body = body.rstrip('\n') + f'\n\n---\n<small>This document is version-controlled. Suggest changes [on GitHub]({gh_url}).</small>\n\n[^docs-sync]: docs-sync-id: {DOC_PATH}\n'
|
||||
|
||||
# Extract title from front matter or first heading
|
||||
title = None
|
||||
for line in raw.splitlines():
|
||||
s = line.strip()
|
||||
if s.startswith('title:'):
|
||||
title = s[len('title:'):].strip().strip('\"').strip(\"'\")
|
||||
break
|
||||
if s.startswith('# '):
|
||||
title = s[2:].strip()
|
||||
break
|
||||
title = f'{title or \"What is sunnypilot?\"} - sunnypilot Docs'
|
||||
|
||||
print(f'Title: {title}')
|
||||
print(f'Body: {len(body)} chars')
|
||||
|
||||
config = DiscourseConfig.from_env()
|
||||
client = DiscourseClient(config)
|
||||
category_id = config.category_id_for(DOC_PATH)
|
||||
print(f'Category ID: {category_id}')
|
||||
|
||||
existing = client.find_topic_by_sync_id(DOC_PATH)
|
||||
if existing is not None:
|
||||
topic_id = existing['id']
|
||||
post_id = client.first_post_id(topic_id)
|
||||
if post_id is None:
|
||||
print(f'ERROR: No first post for topic {topic_id}')
|
||||
sys.exit(1)
|
||||
result = client.update_post(post_id, body, edit_reason='CI smoke test')
|
||||
if result is None:
|
||||
print('ERROR: Failed to update post')
|
||||
sys.exit(1)
|
||||
print(f'Updated: {config.base_url}/t/{topic_id}')
|
||||
else:
|
||||
result = client.create_topic(title=title, raw=body, category_id=category_id, tags=['docs-auto-sync'])
|
||||
if result is None:
|
||||
print('ERROR: Failed to create topic')
|
||||
sys.exit(1)
|
||||
print(f'Created: {config.base_url}/t/{result.get(\"topic_id\", \"?\")}')
|
||||
|
||||
print('Smoke test passed!')
|
||||
"
|
||||
78
.github/workflows/test-discourse.yaml.yml
vendored
78
.github/workflows/test-discourse.yaml.yml
vendored
@@ -1,78 +0,0 @@
|
||||
name: Debug Discourse Posting
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
test-discourse-post:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Post test message to Discourse
|
||||
uses: ./.github/workflows/post-to-discourse
|
||||
with:
|
||||
discourse-url: ${{ vars.DISCOURSE_URL }}
|
||||
api-key: ${{ secrets.DISCOURSE_API_KEY }}
|
||||
api-username: ${{ secrets.DISCOURSE_API_USERNAME }}
|
||||
topic-id: ${{ vars.DISCOURSE_UPDATES_TOPIC_ID }}
|
||||
message: |
|
||||
## 🧪 Test Post from GitHub Actions
|
||||
|
||||
**This is a test post to verify Discourse integration**
|
||||
|
||||
- **Workflow**: ${{ github.workflow }}
|
||||
- **Run Number**: #${{ github.run_number }}
|
||||
- **Branch**: `${{ github.ref_name }}`
|
||||
- **Commit**: ${{ github.sha }}
|
||||
- **Actor**: @${{ github.actor }}
|
||||
- **Timestamp**: ${{ github.event.head_commit.timestamp }}
|
||||
|
||||
---
|
||||
|
||||
### Fake Build Info (for testing)
|
||||
- **Version**: 0.9.8-test
|
||||
- **Build**: #42
|
||||
- **Branch**: release-test
|
||||
|
||||
[View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
||||
|
||||
*This is an automated test message. Drive safe! 🚗💨*
|
||||
|
||||
|
||||
- name: Create topic on Discourse
|
||||
uses: ./.github/workflows/post-to-discourse
|
||||
with:
|
||||
discourse-url: ${{ vars.DISCOURSE_URL }}
|
||||
api-key: ${{ secrets.DISCOURSE_API_KEY }}
|
||||
api-username: ${{ secrets.DISCOURSE_API_USERNAME }}
|
||||
#topic-id: ${{ vars.DISCOURSE_UPDATES_TOPIC_ID }}
|
||||
category-id: 4
|
||||
title: "This is a test of a new topic instead of a reply"
|
||||
message: |
|
||||
## 🧪 Test Post from GitHub Actions
|
||||
|
||||
**This is a test post to verify Discourse integration**
|
||||
|
||||
- **Workflow**: ${{ github.workflow }}
|
||||
- **Run Number**: #${{ github.run_number }}
|
||||
- **Branch**: `${{ github.ref_name }}`
|
||||
- **Commit**: ${{ github.sha }}
|
||||
- **Actor**: @${{ github.actor }}
|
||||
- **Timestamp**: ${{ github.event.head_commit.timestamp }}
|
||||
|
||||
---
|
||||
|
||||
### Fake Build Info (for testing)
|
||||
- **Version**: 0.9.8-test
|
||||
- **Build**: #42
|
||||
- **Branch**: release-test
|
||||
|
||||
[View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
||||
|
||||
*This is an automated test message. Drive safe! 🚗💨*
|
||||
- name: Display results
|
||||
if: always()
|
||||
run: |
|
||||
echo "::notice::Discourse post test completed"
|
||||
echo "Check your Discourse topic to verify the post appeared correctly"
|
||||
216
.github/workflows/tests.yaml
vendored
216
.github/workflows/tests.yaml
vendored
@@ -18,13 +18,8 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
PYTHONWARNINGS: error
|
||||
BASE_IMAGE: sunnypilot-base
|
||||
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
BUILD: release/ci/docker_build_sp.sh base
|
||||
|
||||
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
|
||||
|
||||
CI: 1
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
PYTEST: pytest --continue-on-collection-errors --durations=0 -n logical
|
||||
|
||||
jobs:
|
||||
@@ -34,10 +29,11 @@ jobs:
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
env:
|
||||
STRIPPED_DIR: /tmp/releasepilot
|
||||
PYTHONPATH: /tmp/releasepilot
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
@@ -51,17 +47,15 @@ jobs:
|
||||
- name: Build devel
|
||||
timeout-minutes: 1
|
||||
run: TARGET_DIR=$STRIPPED_DIR release/build_stripped.sh
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot and run checks
|
||||
timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 10 || 30) }} # allow more time when we missed the scons cache
|
||||
run: |
|
||||
cd $STRIPPED_DIR
|
||||
${{ env.RUN }} "python3 system/manager/build.py"
|
||||
timeout-minutes: 30
|
||||
working-directory: ${{ env.STRIPPED_DIR }}
|
||||
run: python3 system/manager/build.py
|
||||
- name: Run tests
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
cd $STRIPPED_DIR
|
||||
${{ env.RUN }} "release/check-dirty.sh"
|
||||
working-directory: ${{ env.STRIPPED_DIR }}
|
||||
run: release/check-dirty.sh
|
||||
- name: Check submodules
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
timeout-minutes: 3
|
||||
@@ -83,73 +77,20 @@ jobs:
|
||||
fi
|
||||
release/check-submodules.sh
|
||||
|
||||
build:
|
||||
runs-on: ${{
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup docker push
|
||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'sunnypilot/sunnypilot'
|
||||
run: |
|
||||
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
|
||||
$DOCKER_LOGIN
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- uses: ./.github/workflows/compile-openpilot
|
||||
timeout-minutes: 30
|
||||
|
||||
build_mac:
|
||||
name: build macOS
|
||||
if: false # tmp disable due to brew install not working
|
||||
runs-on: ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-macos-8x14' || 'macos-latest' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
|
||||
- name: Homebrew cache
|
||||
uses: ./.github/workflows/auto-cache
|
||||
with:
|
||||
save: false # No need save here if we manually save it later conditionally
|
||||
path: ~/Library/Caches/Homebrew
|
||||
key: brew-macos-${{ hashFiles('tools/Brewfile') }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
brew-macos-${{ hashFiles('tools/Brewfile') }}
|
||||
brew-macos-
|
||||
- name: Install dependencies
|
||||
run: ./tools/mac_setup.sh
|
||||
env:
|
||||
PYTHONWARNINGS: default # package install has DeprecationWarnings
|
||||
HOMEBREW_DISPLAY_INSTALL_TIMES: 1
|
||||
- name: Save Homebrew cache
|
||||
uses: actions/cache/save@v4
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
path: ~/Library/Caches/Homebrew
|
||||
key: brew-macos-${{ hashFiles('tools/Brewfile') }}-${{ github.sha }}
|
||||
- run: git lfs pull
|
||||
- name: Getting scons cache
|
||||
uses: ./.github/workflows/auto-cache
|
||||
with:
|
||||
save: false # No need save here if we manually save it later conditionally
|
||||
path: /tmp/scons_cache
|
||||
key: scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}
|
||||
scons-${{ runner.arch }}-macos
|
||||
- name: Remove Homebrew from environment
|
||||
run: |
|
||||
FILTERED=$(echo "$PATH" | tr ':' '\n' | grep -v '/opt/homebrew' | tr '\n' ':')
|
||||
echo "PATH=${FILTERED}/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" >> $GITHUB_ENV
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Building openpilot
|
||||
run: . .venv/bin/activate && scons -j$(nproc)
|
||||
- name: Save scons cache
|
||||
uses: actions/cache/save@v4
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
path: /tmp/scons_cache
|
||||
key: scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
|
||||
run: scons
|
||||
|
||||
static_analysis:
|
||||
name: static analysis
|
||||
@@ -157,18 +98,16 @@ jobs:
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
env:
|
||||
PYTHONWARNINGS: default
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Static analysis
|
||||
timeout-minutes: 1
|
||||
run: ${{ env.RUN }} "scripts/lint/lint.sh"
|
||||
run: scripts/lint/lint.sh
|
||||
|
||||
unit_tests:
|
||||
name: unit tests
|
||||
@@ -176,24 +115,22 @@ jobs:
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
id: setup-step
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: ${{ env.RUN }} "scons -j$(nproc)"
|
||||
run: scons -j$(nproc)
|
||||
- name: Run unit tests
|
||||
timeout-minutes: ${{ contains(runner.name, 'nsc') && ((steps.setup-step.outputs.duration < 18) && 1 || 2) || 999 }}
|
||||
timeout-minutes: ${{ contains(runner.name, 'nsc') && 2 || 999 }}
|
||||
run: |
|
||||
${{ env.RUN }} "source selfdrive/test/setup_xvfb.sh && \
|
||||
# Pre-compile Python bytecode so each pytest worker doesn't need to
|
||||
$PYTEST --collect-only -m 'not slow' -qq && \
|
||||
MAX_EXAMPLES=1 $PYTEST -m 'not slow' && \
|
||||
chmod -R 777 /tmp/comma_download_cache"
|
||||
source selfdrive/test/setup_xvfb.sh
|
||||
# Pre-compile Python bytecode so each pytest worker doesn't need to
|
||||
$PYTEST --collect-only -m 'not slow' -qq
|
||||
MAX_EXAMPLES=1 $PYTEST -m 'not slow'
|
||||
|
||||
process_replay:
|
||||
name: process replay
|
||||
@@ -202,29 +139,19 @@ jobs:
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
id: setup-step
|
||||
- name: Cache test routes
|
||||
id: dependency-cache
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: .ci_cache/comma_download_cache
|
||||
key: proc-replay-${{ hashFiles('selfdrive/test/process_replay/test_processes.py') }}
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc)"
|
||||
run: scons -j$(nproc)
|
||||
- name: Run replay
|
||||
timeout-minutes: ${{ contains(runner.name, 'nsc') && (steps.dependency-cache.outputs.cache-hit == 'true') && ((steps.setup-step.outputs.duration < 18) && 1 || 2) || 20 }}
|
||||
timeout-minutes: ${{ contains(runner.name, 'nsc') && 2 || 20 }}
|
||||
continue-on-error: ${{ github.ref == 'refs/heads/master' }}
|
||||
run: |
|
||||
${{ env.RUN }} "selfdrive/test/process_replay/test_processes.py -j$(nproc) && \
|
||||
chmod -R 777 /tmp/comma_download_cache"
|
||||
run: selfdrive/test/process_replay/test_processes.py -j$(nproc)
|
||||
- name: Print diff
|
||||
id: print-diff
|
||||
if: always()
|
||||
@@ -246,21 +173,21 @@ jobs:
|
||||
if: github.repository == 'commaai/openpilot' && github.ref == 'refs/heads/master'
|
||||
working-directory: ${{ github.workspace }}/ci-artifacts
|
||||
run: |
|
||||
git checkout --orphan process-replay
|
||||
git rm -rf .
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
git fetch origin process-replay || true
|
||||
git checkout process-replay 2>/dev/null || git checkout --orphan process-replay
|
||||
cp ${{ github.workspace }}/selfdrive/test/process_replay/fakedata/*.zst .
|
||||
echo "${{ github.sha }}" > ref_commit
|
||||
git add .
|
||||
git commit -m "process-replay refs for ${{ github.repository }}@${{ github.sha }}"
|
||||
git push origin process-replay --force
|
||||
git commit -m "process-replay refs for ${{ github.repository }}@${{ github.sha }}" || echo "No changes to commit"
|
||||
git push origin process-replay
|
||||
- name: Run regen
|
||||
if: false
|
||||
timeout-minutes: 4
|
||||
run: |
|
||||
${{ env.RUN }} "ONNXCPU=1 $PYTEST selfdrive/test/process_replay/test_regen.py && \
|
||||
chmod -R 777 /tmp/comma_download_cache"
|
||||
env:
|
||||
ONNXCPU: 1
|
||||
run: $PYTEST selfdrive/test/process_replay/test_regen.py
|
||||
|
||||
simulator_driving:
|
||||
name: simulator driving
|
||||
@@ -268,73 +195,44 @@ jobs:
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
if: false # FIXME: Started to timeout recently
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
id: setup-step
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc)"
|
||||
run: scons -j$(nproc)
|
||||
- name: Driving test
|
||||
timeout-minutes: ${{ (steps.setup-step.outputs.duration < 18) && 1 || 2 }}
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
${{ env.RUN }} "source selfdrive/test/setup_xvfb.sh && \
|
||||
source selfdrive/test/setup_vsound.sh && \
|
||||
CI=1 pytest -s tools/sim/tests/test_metadrive_bridge.py"
|
||||
source selfdrive/test/setup_xvfb.sh
|
||||
pytest -s tools/sim/tests/test_metadrive_bridge.py
|
||||
|
||||
create_raylib_ui_report:
|
||||
name: Create raylib UI Report
|
||||
create_ui_report:
|
||||
name: Create UI Report
|
||||
runs-on: ${{
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: ${{ env.RUN }} "scons -j$(nproc)"
|
||||
- name: Create raylib UI Report
|
||||
run: >
|
||||
${{ env.RUN }} "PYTHONWARNINGS=ignore &&
|
||||
source selfdrive/test/setup_xvfb.sh &&
|
||||
python3 selfdrive/ui/tests/test_ui/raylib_screenshots.py"
|
||||
- name: Upload Raylib UI Report
|
||||
run: scons -j$(nproc)
|
||||
- name: Create UI Report
|
||||
run: |
|
||||
source selfdrive/test/setup_xvfb.sh
|
||||
python3 selfdrive/ui/tests/diff/replay.py
|
||||
python3 selfdrive/ui/tests/diff/replay.py --big
|
||||
- name: Upload UI Report
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: raylib-report-${{ inputs.run_number || '1' }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
|
||||
path: selfdrive/ui/tests/test_ui/raylib_report/screenshots
|
||||
|
||||
create_mici_raylib_ui_report:
|
||||
name: Create mici raylib UI Report
|
||||
runs-on: ${{
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- name: Build openpilot
|
||||
run: ${{ env.RUN }} "scons -j$(nproc)"
|
||||
- name: Create mici raylib UI Report
|
||||
run: >
|
||||
${{ env.RUN }} "PYTHONWARNINGS=ignore &&
|
||||
source selfdrive/test/setup_xvfb.sh &&
|
||||
WINDOWED=1 python3 selfdrive/ui/tests/diff/replay.py"
|
||||
- name: Upload Raylib UI Report
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: mici-raylib-report-${{ inputs.run_number || '1' }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
|
||||
name: ui-report-${{ inputs.run_number || '1' }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
|
||||
path: selfdrive/ui/tests/diff/report
|
||||
|
||||
175
.github/workflows/ui_preview.yaml
vendored
Normal file
175
.github/workflows/ui_preview.yaml
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
name: "ui preview"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request_target:
|
||||
types: [assigned, opened, synchronize, reopened, edited]
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- 'selfdrive/assets/**'
|
||||
- 'selfdrive/ui/**'
|
||||
- 'system/ui/**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
UI_JOB_NAME: "Create UI Report"
|
||||
REPORT_NAME: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
|
||||
SHA: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.sha || github.event.pull_request.head.sha }}
|
||||
BRANCH_NAME: "openpilot/pr-${{ github.event.number }}-ui-preview"
|
||||
REPORT_FILES_BRANCH_NAME: "mici-raylib-ui-reports"
|
||||
|
||||
# variant:video_prefix:master_branch
|
||||
VARIANTS: "mici:mici_ui_replay:openpilot_master_ui_mici_raylib big:tizi_ui_replay:openpilot_master_ui_big_raylib"
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
name: preview
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
actions: read
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Waiting for ui generation to end
|
||||
uses: lewagon/wait-on-check-action@v1.3.4
|
||||
with:
|
||||
ref: ${{ env.SHA }}
|
||||
check-name: ${{ env.UI_JOB_NAME }}
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
allowed-conclusions: success
|
||||
wait-interval: 20
|
||||
|
||||
- name: Getting workflow run ID
|
||||
id: get_run_id
|
||||
run: |
|
||||
echo "run_id=$(curl https://api.github.com/repos/${{ github.repository }}/commits/${{ env.SHA }}/check-runs | jq -r '.check_runs[] | select(.name == "${{ env.UI_JOB_NAME }}") | .html_url | capture("(?<number>[0-9]+)") | .number')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Getting proposed ui
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run_id: ${{ steps.get_run_id.outputs.run_id }}
|
||||
search_artifacts: true
|
||||
name: ui-report-1-${{ env.REPORT_NAME }}
|
||||
path: ${{ github.workspace }}/pr_ui
|
||||
|
||||
- name: Getting mici master ui
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: sunnypilot/ci-artifacts
|
||||
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
|
||||
path: ${{ github.workspace }}/master_mici
|
||||
ref: openpilot_master_ui_mici_raylib
|
||||
|
||||
- name: Getting big master ui
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: sunnypilot/ci-artifacts
|
||||
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
|
||||
path: ${{ github.workspace }}/master_big
|
||||
ref: openpilot_master_ui_big_raylib
|
||||
|
||||
- name: Saving new master ui
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
run: |
|
||||
for variant in $VARIANTS; do
|
||||
IFS=':' read -r name video branch <<< "$variant"
|
||||
master_dir="${{ github.workspace }}/master_${name}"
|
||||
cd "$master_dir"
|
||||
git checkout --orphan=new_branch
|
||||
git rm -rf *
|
||||
git branch -D "$branch"
|
||||
git branch -m "$branch"
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
cp "${{ github.workspace }}/pr_ui/${video}.mp4" .
|
||||
git add .
|
||||
git commit -m "${name} video for commit ${{ env.SHA }}"
|
||||
git push origin "$branch" --force
|
||||
done
|
||||
|
||||
- name: Setup FFmpeg
|
||||
uses: AnimMouse/setup-ffmpeg@ae28d57dabbb148eff63170b6bf7f2b60062cbae
|
||||
|
||||
- name: Finding diffs
|
||||
if: github.event_name == 'pull_request_target'
|
||||
id: find_diff
|
||||
run: |
|
||||
export PYTHONPATH=${{ github.workspace }}
|
||||
baseurl="https://github.com/sunnypilot/ci-artifacts/raw/refs/heads/${{ env.BRANCH_NAME }}"
|
||||
|
||||
COMMENT=""
|
||||
for variant in $VARIANTS; do
|
||||
IFS=':' read -r name video _ <<< "$variant"
|
||||
diff_name="${name}_diff"
|
||||
|
||||
mv "${{ github.workspace }}/pr_ui/${video}.mp4" "${{ github.workspace }}/pr_ui/${video}_proposed.mp4"
|
||||
cp "${{ github.workspace }}/master_${name}/${video}.mp4" "${{ github.workspace }}/pr_ui/${video}_master.mp4"
|
||||
|
||||
diff_exit_code=0
|
||||
python3 ${{ github.workspace }}/selfdrive/ui/tests/diff/diff.py \
|
||||
"${{ github.workspace }}/pr_ui/${video}_master.mp4" \
|
||||
"${{ github.workspace }}/pr_ui/${video}_proposed.mp4" \
|
||||
"${diff_name}.html" --basedir "$baseurl" --no-open || diff_exit_code=$?
|
||||
|
||||
cp "${{ github.workspace }}/selfdrive/ui/tests/diff/report/${diff_name}.html" "${{ github.workspace }}/pr_ui/"
|
||||
cp "${{ github.workspace }}/selfdrive/ui/tests/diff/report/${diff_name}.mp4" "${{ github.workspace }}/pr_ui/"
|
||||
|
||||
REPORT_URL="https://sunnypilot.github.io/ci-artifacts/${diff_name}_pr_${{ github.event.number }}.html"
|
||||
if [ $diff_exit_code -eq 0 ]; then
|
||||
COMMENT+="**${name}**: Videos are identical! [View Diff Report]($REPORT_URL)"$'\n'
|
||||
else
|
||||
COMMENT+="**${name}**: ⚠️ <strong>Videos differ!</strong> [View Diff Report]($REPORT_URL)"$'\n'
|
||||
fi
|
||||
done
|
||||
|
||||
{
|
||||
echo "COMMENT<<EOF"
|
||||
echo "$COMMENT"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Saving proposed ui
|
||||
if: github.event_name == 'pull_request_target'
|
||||
working-directory: ${{ github.workspace }}/master_mici
|
||||
run: |
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
git checkout --orphan=${{ env.BRANCH_NAME }}
|
||||
git rm -rf *
|
||||
mv ${{ github.workspace }}/pr_ui/* .
|
||||
git add .
|
||||
git commit -m "ui videos for PR #${{ github.event.number }}"
|
||||
git push origin ${{ env.BRANCH_NAME }} --force
|
||||
|
||||
# Append diff reports to report files branch
|
||||
git fetch origin ${{ env.REPORT_FILES_BRANCH_NAME }}
|
||||
git checkout ${{ env.REPORT_FILES_BRANCH_NAME }}
|
||||
for variant in $VARIANTS; do
|
||||
IFS=':' read -r name _ _ <<< "$variant"
|
||||
diff_name="${name}_diff"
|
||||
cp "${{ github.workspace }}/selfdrive/ui/tests/diff/report/${diff_name}.html" "${diff_name}_pr_${{ github.event.number }}.html"
|
||||
git add "${diff_name}_pr_${{ github.event.number }}.html"
|
||||
done
|
||||
git commit -m "ui diff reports for PR #${{ github.event.number }}" || echo "No changes to commit"
|
||||
git push origin ${{ env.REPORT_FILES_BRANCH_NAME }}
|
||||
|
||||
- name: Comment on PR
|
||||
if: github.event_name == 'pull_request_target'
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
message: |
|
||||
<!-- _(run_id_ui_preview **${{ github.run_id }}**)_ -->
|
||||
## UI Preview
|
||||
${{ steps.find_diff.outputs.COMMENT }}
|
||||
comment_tag: run_id_ui_preview
|
||||
pr_number: ${{ github.event.number }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
51
.github/workflows/vendor_third_party.yaml
vendored
51
.github/workflows/vendor_third_party.yaml
vendored
@@ -1,51 +0,0 @@
|
||||
name: vendor third_party
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.ref != 'refs/heads/master'
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-24.04, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build
|
||||
run: third_party/build.sh
|
||||
- name: Package artifacts
|
||||
run: |
|
||||
git add -A third_party/
|
||||
git diff --cached --name-only -- third_party/ | tar -cf /tmp/third_party_build.tar -T -
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: third-party-${{ runner.os }}
|
||||
path: /tmp/third_party_build.tar
|
||||
|
||||
commit:
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: /tmp/artifacts
|
||||
- name: Commit vendored libraries
|
||||
run: |
|
||||
for f in /tmp/artifacts/*/third_party_build.tar; do
|
||||
tar xf "$f"
|
||||
done
|
||||
git add third_party/
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to commit"
|
||||
exit 0
|
||||
fi
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git commit -m "third_party: rebuild vendor libraries"
|
||||
git push
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -15,6 +15,8 @@ a.out
|
||||
.cache/
|
||||
|
||||
/docs_site/
|
||||
/docs_site_sp/
|
||||
/.discourse_sync_cache/
|
||||
|
||||
*.mp4
|
||||
*.dylib
|
||||
@@ -64,9 +66,7 @@ flycheck_*
|
||||
cppcheck_report.txt
|
||||
comma*.sh
|
||||
|
||||
selfdrive/modeld/models/*.pkl
|
||||
sunnypilot/modeld*/thneed/compile
|
||||
sunnypilot/modeld*/models/*.thneed
|
||||
selfdrive/modeld/models/*.pkl*
|
||||
sunnypilot/modeld*/models/*.pkl
|
||||
|
||||
# openpilot log files
|
||||
|
||||
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -15,7 +15,7 @@
|
||||
url = https://github.com/commaai/teleoprtc
|
||||
[submodule "tinygrad"]
|
||||
path = tinygrad_repo
|
||||
url = https://github.com/commaai/tinygrad.git
|
||||
url = https://github.com/sunnypilot/tinygrad.git
|
||||
[submodule "sunnypilot/neural_network_data"]
|
||||
path = sunnypilot/neural_network_data
|
||||
url = https://github.com/sunnypilot/neural-network-data.git
|
||||
|
||||
101
CHANGELOG.md
101
CHANGELOG.md
@@ -1,5 +1,104 @@
|
||||
sunnypilot Version 2025.003.000 (20xx-xx-xx)
|
||||
sunnypilot Version 2026.001.000 (2026-03-xx)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
* Complete rewrite of the user interface from Qt C++ to Raylib Python
|
||||
* comma four support
|
||||
* ui: sunnypilot toggle style by @nayan8teen
|
||||
* ui: fix scroll panel mouse wheel behavior by @nayan8teen
|
||||
* ui: sunnypilot panels by @nayan8teen
|
||||
* sunnylink: centralize key pair handling in sunnylink registration by @devtekve
|
||||
* ui: reimplement sunnypilot branding with Raylib by @sunnyhaibin
|
||||
* ui: Platform Selector by @Discountchubbs
|
||||
* ui: vehicle brand settings by @Discountchubbs
|
||||
* ui: sunnylink client-side implementation by @nayan8teen
|
||||
* ui: `NetworkUISP` by @Discountchubbs
|
||||
* ui: add sunnypilot font by @nayan8teen
|
||||
* ui: sunnypilot sponsor tier color mapping by @sunnyhaibin
|
||||
* ui: sunnylink panel by @nayan8teen
|
||||
* ui: Models panel by @Discountchubbs
|
||||
* ui: software panel by @Discountchubbs
|
||||
* modeld_v2: support planplus outputs by @Discountchubbs
|
||||
* ui: OSM panel by @Discountchubbs
|
||||
* ui: Developer panel extension by @Discountchubbs
|
||||
* sunnylink: Vehicle Selector support by @sunnyhaibin
|
||||
* [TIZI/TICI] ui: Developer Metrics by @rav4kumar
|
||||
* [comma 4] ui: sunnylink panel by @nayan8teen
|
||||
* ui: lateral-only and longitudinal-only UI statuses support by @royjr
|
||||
* sunnylink: elliptic curve keys support and improve key path handling by @nayan8teen
|
||||
* sunnylink: block remote modification of SSH key parameters by @zikeji
|
||||
* [TIZI/TICI] ui: rainbow path by @rav4kumar
|
||||
* [TIZI/TICI] ui: chevron metrics by @rav4kumar
|
||||
* ui: include MADS enabled state to `engaged` check by @sunnyhaibin
|
||||
* Toyota: Enforce Factory Longitudinal Control by @sunnyhaibin
|
||||
* ui: fix malformed dongle ID display on the PC if dongleID is not set by @dzid26
|
||||
* SL: Re enable and validate ingestion of swaglogs by @devtekve
|
||||
* modeld_v2: planplus model tuning by @Discountchubbs
|
||||
* ui: fix Always Offroad button visibility by @nayan8teen
|
||||
* Reimplement sunnypilot Terms of Service & sunnylink Consent Screens by @sunnyhaibin
|
||||
* [TIZI/TICI] ui: update dmoji position and Developer UI adjustments by @rav4kumar
|
||||
* modeld: configurable camera offset by @Discountchubbs
|
||||
* [TIZI/TICI] ui: sunnylink status on sidebar by @Copilot
|
||||
* ui: Global Brightness Override by @nayan8teen
|
||||
* ui: Customizable Interactive Timeout by @sunnyhaibin
|
||||
* sunnylink: add units to param metadata by @nayan8teen
|
||||
* ui: Customizable Onroad Brightness by @sunnyhaibin
|
||||
* [TIZI/TICI] ui: Steering panel by @nayan8teen
|
||||
* [TIZI/TICI] ui: Rocket Fuel by @rav4kumar
|
||||
* [TIZI/TICI] ui: MICI style turn signals by @rav4kumar
|
||||
* [TIZI/TICI] ui: MICI style blindspot indicators by @sunnyhaibin
|
||||
* [MICI] ui: display blindspot indicators when available by @rav4kumar
|
||||
* [TIZI/TICI] ui: Road Name by @rav4kumar
|
||||
* [TIZI/TICI] ui: Blue "Exit Always Offroad" button by @dzid26
|
||||
* [TIZI/TICI] ui: Speed Limit by @rav4kumar
|
||||
* Reapply "latcontrol_torque: lower kp and lower friction threshold (commaai/openpilot#36619)" by @sunnyhaibin
|
||||
* [TIZI/TICI] ui: steering arc by @royjr
|
||||
* [TIZI/TICI] ui: Smart Cruise Control elements by @sunnyhaibin
|
||||
* [TIZI/TICI] ui: Green Light and Lead Departure elements by @sunnyhaibin
|
||||
* [TIZI/TICI] ui: standstill timer by @sunnyhaibin
|
||||
* [MICI] ui: driving models selector by @Discountchubbs
|
||||
* [TIZI/TICI] ui: Hide vEgo and True vEgo by @sunnyhaibin
|
||||
* [TIZI/TICI] ui: Visuals panel by @nayan8teen
|
||||
* Device: Retain QuickBoot state after op switch by @nayan8teen
|
||||
* [TIZI/TICI] ui: Trips panel by @sunnyhaibin
|
||||
* [TIZI/TICI] ui: dynamic ICBM status by @sunnyhaibin
|
||||
* [TIZI/TICI] ui: Cruise panel by @sunnyhaibin
|
||||
* ui: better wake mode support by @nayan8teen
|
||||
* Pause Lateral Control with Blinker: Post-Blinker Delay by @CHaucke89
|
||||
* SCC-V: Use p97 for predicted lateral accel by @yasu-oh
|
||||
* Controls: Support for Torque Lateral Control v0 Tune by @sunnyhaibin
|
||||
* What's Changed (sunnypilot/opendbc)
|
||||
* Honda: DBC for Accord 9th Generation by @mvl-boston
|
||||
* FCA: update tire stiffness values for `RAM_HD` by @dparring
|
||||
* Honda: Nidec hybrid baseline brake support by @mvl-boston
|
||||
* Subaru Global Gen2: bump steering limits and update tuning by @sunnyhaibin
|
||||
* Toyota: Enforce Stock Longitudinal Control by @rav4kumar
|
||||
* Nissan: use MADS enabled status for LKAS HUD logic by @downquark7
|
||||
* Reapply "Lateral: lower friction threshold (#2915)" (#378) by @sunnyhaibin
|
||||
* HKG: add KIA_FORTE_2019_NON_SCC fingerprint by @royjr
|
||||
* Nissan: Parse cruise control buttons by @downquark7
|
||||
* Rivian: Add stalk down ACC behavior to match stock Rivian by @lukasloetkolben
|
||||
* Tesla: remove `TESLA_MODEL_X` from `dashcamOnly` by @ssysm
|
||||
* Hyundai Longitudinal: refactor tuning by @Discountchubbs
|
||||
* Tesla: add fingerprint for Model 3 Performance HW4 by @sunnyhaibin
|
||||
* Toyota: do not disable radar when smartDSU or CAN Filter detected by @sunnyhaibin
|
||||
* Honda: add missing `GasInterceptor` messages to Taiwan Odyssey DBC by @mvl-boston
|
||||
* GM: remove `CHEVROLET_EQUINOX_NON_ACC_3RD_GEN` from `dashcamOnly` by @sunnyhaibin
|
||||
* GM: remove `CHEVROLET_BOLT_NON_ACC_2ND_GEN` from `dashcamOnly` by @sunnyhaibin
|
||||
* New Contributors (sunnypilot/sunnypilot)
|
||||
* @TheSecurityDev made their first contribution in "ui: fix sidebar scroll in UI screenshots"
|
||||
* @zikeji made their first contribution in "sunnylink: block remote modification of SSH key parameters"
|
||||
* @Candy0707 made their first contribution in "[TIZI/TICI] ui: Fix misaligned turn signals and blindspot indicators with sidebar"
|
||||
* @CHaucke89 made their first contribution in "Pause Lateral Control with Blinker: Post-Blinker Delay"
|
||||
* @yasu-oh made their first contribution in "SCC-V: Use p97 for predicted lateral accel"
|
||||
* New Contributors (sunnypilot/opendbc)
|
||||
* @AmyJeanes made their first contribution in "Tesla: Fix stock LKAS being blocked when MADS is enabled"
|
||||
* @mvl-boston made their first contribution in "Honda: Update Clarity brake to renamed DBC message name"
|
||||
* @dzid26 made their first contribution in "Tesla: Parse speed limit from CAN"
|
||||
* @firestar5683 made their first contribution in "GM: Non-ACC platforms with steering only support"
|
||||
* @downquark7 made their first contribution in "Nissan: use MADS enabled status for LKAS HUD logic"
|
||||
* @royjr made their first contribution in "HKG: add KIA_FORTE_2019_NON_SCC fingerprint"
|
||||
* @ssysm made their first contribution in "Tesla: remove `TESLA_MODEL_X` from `dashcamOnly`"
|
||||
* Full Changelog: https://github.com/sunnypilot/sunnypilot/compare/v2025.002.000...v2026.001.000
|
||||
|
||||
sunnypilot Version 2025.002.000 (2025-11-06)
|
||||
========================
|
||||
|
||||
@@ -1,14 +1,38 @@
|
||||
FROM ghcr.io/commaai/openpilot-base:latest
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
ENV OPENPILOT_PATH=/home/batman/openpilot
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends sudo tzdata locales && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV LANGUAGE=en_US:en
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
|
||||
ENV NVIDIA_VISIBLE_DEVICES=all
|
||||
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute
|
||||
|
||||
ARG USER=batman
|
||||
ARG USER_UID=1001
|
||||
RUN useradd -m -s /bin/bash -u $USER_UID $USER
|
||||
RUN usermod -aG sudo $USER
|
||||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
USER $USER
|
||||
|
||||
ENV OPENPILOT_PATH=/home/$USER/openpilot
|
||||
RUN mkdir -p ${OPENPILOT_PATH}
|
||||
WORKDIR ${OPENPILOT_PATH}
|
||||
|
||||
COPY . ${OPENPILOT_PATH}/
|
||||
COPY --chown=$USER . ${OPENPILOT_PATH}/
|
||||
|
||||
ENV UV_BIN="/home/batman/.local/bin/"
|
||||
ENV PATH="$UV_BIN:$PATH"
|
||||
RUN UV_PROJECT_ENVIRONMENT=$VIRTUAL_ENV uv run scons --cache-readonly -j$(nproc)
|
||||
ENV UV_BIN="/home/$USER/.local/bin/"
|
||||
ENV VIRTUAL_ENV=${OPENPILOT_PATH}/.venv
|
||||
ENV PATH="$UV_BIN:$VIRTUAL_ENV/bin:$PATH"
|
||||
RUN tools/setup_dependencies.sh && \
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER root
|
||||
RUN git config --global --add safe.directory '*'
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends sudo tzdata locales ssh pulseaudio xvfb x11-xserver-utils gnome-screenshot python3-tk python3-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV LANGUAGE=en_US:en
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
|
||||
COPY tools/install_ubuntu_dependencies.sh /tmp/tools/
|
||||
RUN /tmp/tools/install_ubuntu_dependencies.sh && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* && \
|
||||
cd /usr/lib/gcc/arm-none-eabi/* && \
|
||||
rm -rf arm/ thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
|
||||
|
||||
# Add OpenCL
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
alien \
|
||||
unzip \
|
||||
tar \
|
||||
curl \
|
||||
xz-utils \
|
||||
dbus \
|
||||
gcc-arm-none-eabi \
|
||||
tmux \
|
||||
vim \
|
||||
libx11-6 \
|
||||
wget \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /tmp/opencl-driver-intel && \
|
||||
cd /tmp/opencl-driver-intel && \
|
||||
wget https://github.com/intel/llvm/releases/download/2024-WW14/oclcpuexp-2024.17.3.0.09_rel.tar.gz && \
|
||||
wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/oneapi-tbb-2021.12.0-lin.tgz && \
|
||||
mkdir -p /opt/intel/oclcpuexp_2024.17.3.0.09_rel && \
|
||||
cd /opt/intel/oclcpuexp_2024.17.3.0.09_rel && \
|
||||
tar -zxvf /tmp/opencl-driver-intel/oclcpuexp-2024.17.3.0.09_rel.tar.gz && \
|
||||
mkdir -p /etc/OpenCL/vendors && \
|
||||
echo /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64/libintelocl.so > /etc/OpenCL/vendors/intel_expcpu.icd && \
|
||||
cd /opt/intel && \
|
||||
tar -zxvf /tmp/opencl-driver-intel/oneapi-tbb-2021.12.0-lin.tgz && \
|
||||
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbb.so /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
|
||||
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbbmalloc.so /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
|
||||
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbb.so.12 /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
|
||||
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbbmalloc.so.2 /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
|
||||
mkdir -p /etc/ld.so.conf.d && \
|
||||
echo /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 > /etc/ld.so.conf.d/libintelopenclexp.conf && \
|
||||
ldconfig -f /etc/ld.so.conf.d/libintelopenclexp.conf && \
|
||||
cd / && \
|
||||
rm -rf /tmp/opencl-driver-intel
|
||||
|
||||
ENV NVIDIA_VISIBLE_DEVICES=all
|
||||
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute
|
||||
ENV QTWEBENGINE_DISABLE_SANDBOX=1
|
||||
|
||||
RUN dbus-uuidgen > /etc/machine-id
|
||||
RUN apt-get update && apt-get install -y fonts-noto-cjk fonts-noto-color-emoji
|
||||
|
||||
ARG USER=batman
|
||||
ARG USER_UID=1001
|
||||
RUN useradd -m -s /bin/bash -u $USER_UID $USER
|
||||
RUN usermod -aG sudo $USER
|
||||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
USER $USER
|
||||
|
||||
COPY --chown=$USER pyproject.toml uv.lock /home/$USER
|
||||
COPY --chown=$USER tools/install_python_dependencies.sh /home/$USER/tools/
|
||||
|
||||
ENV VIRTUAL_ENV=/home/$USER/.venv
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
RUN cd /home/$USER && \
|
||||
tools/install_python_dependencies.sh && \
|
||||
rm -rf tools/ pyproject.toml uv.lock .cache
|
||||
|
||||
USER root
|
||||
RUN sudo git config --global --add safe.directory /tmp/openpilot
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM ghcr.io/sunnypilot/sunnypilot-base:latest
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
ENV OPENPILOT_PATH=/home/batman/openpilot
|
||||
|
||||
RUN mkdir -p ${OPENPILOT_PATH}
|
||||
WORKDIR ${OPENPILOT_PATH}
|
||||
|
||||
COPY . ${OPENPILOT_PATH}/
|
||||
|
||||
RUN scons --cache-readonly -j$(nproc)
|
||||
@@ -1,83 +0,0 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends sudo tzdata locales ssh pulseaudio xvfb x11-xserver-utils gnome-screenshot python3-tk python3-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV LANGUAGE=en_US:en
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
|
||||
COPY tools/install_ubuntu_dependencies.sh /tmp/tools/
|
||||
RUN /tmp/tools/install_ubuntu_dependencies.sh && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* && \
|
||||
cd /usr/lib/gcc/arm-none-eabi/* && \
|
||||
rm -rf arm/ thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
|
||||
|
||||
# Add OpenCL
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
alien \
|
||||
unzip \
|
||||
tar \
|
||||
curl \
|
||||
xz-utils \
|
||||
dbus \
|
||||
gcc-arm-none-eabi \
|
||||
tmux \
|
||||
vim \
|
||||
libx11-6 \
|
||||
wget \
|
||||
rsync \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /tmp/opencl-driver-intel && \
|
||||
cd /tmp/opencl-driver-intel && \
|
||||
wget https://github.com/intel/llvm/releases/download/2024-WW14/oclcpuexp-2024.17.3.0.09_rel.tar.gz && \
|
||||
wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/oneapi-tbb-2021.12.0-lin.tgz && \
|
||||
mkdir -p /opt/intel/oclcpuexp_2024.17.3.0.09_rel && \
|
||||
cd /opt/intel/oclcpuexp_2024.17.3.0.09_rel && \
|
||||
tar -zxvf /tmp/opencl-driver-intel/oclcpuexp-2024.17.3.0.09_rel.tar.gz && \
|
||||
mkdir -p /etc/OpenCL/vendors && \
|
||||
echo /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64/libintelocl.so > /etc/OpenCL/vendors/intel_expcpu.icd && \
|
||||
cd /opt/intel && \
|
||||
tar -zxvf /tmp/opencl-driver-intel/oneapi-tbb-2021.12.0-lin.tgz && \
|
||||
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbb.so /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
|
||||
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbbmalloc.so /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
|
||||
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbb.so.12 /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
|
||||
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbbmalloc.so.2 /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
|
||||
mkdir -p /etc/ld.so.conf.d && \
|
||||
echo /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 > /etc/ld.so.conf.d/libintelopenclexp.conf && \
|
||||
ldconfig -f /etc/ld.so.conf.d/libintelopenclexp.conf && \
|
||||
cd / && \
|
||||
rm -rf /tmp/opencl-driver-intel
|
||||
|
||||
ENV NVIDIA_VISIBLE_DEVICES=all
|
||||
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute
|
||||
ENV QTWEBENGINE_DISABLE_SANDBOX=1
|
||||
|
||||
RUN dbus-uuidgen > /etc/machine-id
|
||||
RUN apt-get update && apt-get install -y fonts-noto-cjk fonts-noto-color-emoji
|
||||
|
||||
ARG USER=batman
|
||||
ARG USER_UID=1001
|
||||
RUN useradd -m -s /bin/bash -u $USER_UID $USER
|
||||
RUN usermod -aG sudo $USER
|
||||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
USER $USER
|
||||
|
||||
COPY --chown=$USER pyproject.toml uv.lock /home/$USER
|
||||
COPY --chown=$USER tools/install_python_dependencies.sh /home/$USER/tools/
|
||||
|
||||
ENV VIRTUAL_ENV=/home/$USER/.venv
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
RUN cd /home/$USER && \
|
||||
tools/install_python_dependencies.sh && \
|
||||
rm -rf tools/ pyproject.toml uv.lock .cache
|
||||
|
||||
USER root
|
||||
RUN sudo git config --global --add safe.directory /tmp/openpilot
|
||||
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
@@ -210,30 +210,23 @@ node {
|
||||
'HW + Unit Tests': {
|
||||
deviceStage("tizi-hardware", "tizi-common", ["UNSAFE=1"], [
|
||||
step("build", "cd system/manager && ./build.py"),
|
||||
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py", [diffPaths: ["panda", "selfdrive/pandad/"]]),
|
||||
step("test power draw", "pytest -s system/hardware/tici/tests/test_power_draw.py"),
|
||||
step("test encoder", "LD_LIBRARY_PATH=/usr/local/lib pytest system/loggerd/tests/test_encoder.py", [diffPaths: ["system/loggerd/"]]),
|
||||
step("test manager", "pytest system/manager/test/test_manager.py"),
|
||||
])
|
||||
},
|
||||
'loopback': {
|
||||
deviceStage("loopback", "tizi-loopback", ["UNSAFE=1"], [
|
||||
step("build openpilot", "cd system/manager && ./build.py"),
|
||||
step("test pandad loopback", "pytest selfdrive/pandad/tests/test_pandad_loopback.py"),
|
||||
])
|
||||
},
|
||||
'camerad OX03C10': {
|
||||
deviceStage("OX03C10", "tizi-ox03c10", ["UNSAFE=1"], [
|
||||
step("build", "cd system/manager && ./build.py"),
|
||||
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 60]),
|
||||
step("test exposure", "pytest system/camerad/test/test_exposure.py"),
|
||||
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py", [diffPaths: ["panda", "selfdrive/pandad/"]]),
|
||||
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 90]),
|
||||
])
|
||||
},
|
||||
'camerad OS04C10': {
|
||||
deviceStage("OS04C10", "tici-os04c10", ["UNSAFE=1"], [
|
||||
step("build", "cd system/manager && ./build.py"),
|
||||
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 60]),
|
||||
step("test exposure", "pytest system/camerad/test/test_exposure.py"),
|
||||
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py", [diffPaths: ["panda", "selfdrive/pandad/"]]),
|
||||
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 90]),
|
||||
])
|
||||
},
|
||||
'sensord': {
|
||||
@@ -251,11 +244,9 @@ node {
|
||||
'tizi': {
|
||||
deviceStage("tizi", "tizi", ["UNSAFE=1"], [
|
||||
step("build openpilot", "cd system/manager && ./build.py"),
|
||||
step("test pandad loopback", "SINGLE_PANDA=1 pytest selfdrive/pandad/tests/test_pandad_loopback.py"),
|
||||
step("test pandad loopback", "pytest selfdrive/pandad/tests/test_pandad_loopback.py"),
|
||||
step("test pandad spi", "pytest selfdrive/pandad/tests/test_pandad_spi.py"),
|
||||
step("test amp", "pytest system/hardware/tici/tests/test_amplifier.py"),
|
||||
// TODO: enable once new AGNOS is available
|
||||
// step("test esim", "pytest system/hardware/tici/tests/test_esim.py"),
|
||||
step("test qcomgpsd", "pytest system/qcomgpsd/tests/test_qcomgpsd.py", [diffPaths: ["system/qcomgpsd/"]]),
|
||||
])
|
||||
},
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
Version 0.10.4 (2026-02-17)
|
||||
========================
|
||||
* Kia K7 2017 support thanks to royjr!
|
||||
* Lexus LS 2018 support thanks to Hacheoy!
|
||||
* Reduce comma four standby power usage by 77% to 52 mW
|
||||
|
||||
Version 0.10.3 (2025-12-17)
|
||||
========================
|
||||
|
||||
63
SConstruct
63
SConstruct
@@ -18,6 +18,7 @@ AddOption('--asan', action='store_true', help='turn on ASAN')
|
||||
AddOption('--ubsan', action='store_true', help='turn on UBSan')
|
||||
AddOption('--mutation', action='store_true', help='generate mutation-ready code')
|
||||
AddOption('--ccflags', action='store', type='string', default='', help='pass arbitrary flags over the command line')
|
||||
AddOption('--verbose', action='store_true', default=False, help='show full build commands')
|
||||
AddOption('--minimal',
|
||||
action='store_false',
|
||||
dest='extras',
|
||||
@@ -28,7 +29,6 @@ AddOption('--minimal',
|
||||
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
||||
if platform.system() == "Darwin":
|
||||
arch = "Darwin"
|
||||
brew_prefix = subprocess.check_output(['brew', '--prefix'], encoding='utf8').strip()
|
||||
elif arch == "aarch64" and os.path.isfile('/TICI'):
|
||||
arch = "larch64"
|
||||
assert arch in [
|
||||
@@ -38,6 +38,24 @@ assert arch in [
|
||||
"Darwin", # macOS arm64 (x86 not supported)
|
||||
]
|
||||
|
||||
if arch != "larch64":
|
||||
import bzip2
|
||||
import capnproto
|
||||
import eigen
|
||||
import ffmpeg as ffmpeg_pkg
|
||||
import libjpeg
|
||||
import libyuv
|
||||
import ncurses
|
||||
import python3_dev
|
||||
import zeromq
|
||||
import zstd
|
||||
pkgs = [bzip2, capnproto, eigen, ffmpeg_pkg, libjpeg, libyuv, ncurses, zeromq, zstd]
|
||||
py_include = python3_dev.INCLUDE_DIR
|
||||
else:
|
||||
# TODO: remove when AGNOS has our new vendor pkgs
|
||||
pkgs = []
|
||||
py_include = sysconfig.get_paths()['include']
|
||||
|
||||
env = Environment(
|
||||
ENV={
|
||||
"PATH": os.environ['PATH'],
|
||||
@@ -46,15 +64,13 @@ env = Environment(
|
||||
"ACADOS_PYTHON_INTERFACE_PATH": Dir("#third_party/acados/acados_template").abspath,
|
||||
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer"
|
||||
},
|
||||
CC='clang',
|
||||
CXX='clang++',
|
||||
CCFLAGS=[
|
||||
"-g",
|
||||
"-fPIC",
|
||||
"-O2",
|
||||
"-Wunused",
|
||||
"-Werror",
|
||||
"-Wshadow",
|
||||
"-Wshadow" if arch in ("Darwin", "larch64") else "-Wshadow=local",
|
||||
"-Wno-unknown-warning-option",
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Wno-c99-designator",
|
||||
@@ -73,7 +89,7 @@ env = Environment(
|
||||
"#third_party/acados/include/blasfeo/include",
|
||||
"#third_party/acados/include/hpipm/include",
|
||||
"#third_party/catch2/include",
|
||||
"#third_party/libyuv/include",
|
||||
[x.INCLUDE_DIR for x in pkgs],
|
||||
],
|
||||
LIBPATH=[
|
||||
"#common",
|
||||
@@ -81,8 +97,8 @@ env = Environment(
|
||||
"#third_party",
|
||||
"#selfdrive/pandad",
|
||||
"#rednose/helpers",
|
||||
f"#third_party/libyuv/{arch}/lib",
|
||||
f"#third_party/acados/{arch}/lib",
|
||||
[x.LIB_DIR for x in pkgs],
|
||||
],
|
||||
RPATH=[],
|
||||
CYTHONCFILESUFFIX=".cpp",
|
||||
@@ -94,7 +110,8 @@ env = Environment(
|
||||
|
||||
# Arch-specific flags and paths
|
||||
if arch == "larch64":
|
||||
env.Append(CPPPATH=["#third_party/opencl/include"])
|
||||
env["CC"] = "clang"
|
||||
env["CXX"] = "clang++"
|
||||
env.Append(LIBPATH=[
|
||||
"/usr/local/lib",
|
||||
"/system/vendor/lib64",
|
||||
@@ -105,17 +122,10 @@ if arch == "larch64":
|
||||
env.Append(CXXFLAGS=arch_flags)
|
||||
elif arch == "Darwin":
|
||||
env.Append(LIBPATH=[
|
||||
f"{brew_prefix}/lib",
|
||||
f"{brew_prefix}/opt/openssl@3.0/lib",
|
||||
f"{brew_prefix}/opt/llvm/lib/c++",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Libraries",
|
||||
])
|
||||
env.Append(CCFLAGS=["-DGL_SILENCE_DEPRECATION"])
|
||||
env.Append(CXXFLAGS=["-DGL_SILENCE_DEPRECATION"])
|
||||
env.Append(CPPPATH=[
|
||||
f"{brew_prefix}/include",
|
||||
f"{brew_prefix}/opt/openssl@3.0/include",
|
||||
])
|
||||
else:
|
||||
env.Append(LIBPATH=[
|
||||
"/usr/lib",
|
||||
@@ -138,6 +148,22 @@ if _extra_cc:
|
||||
if arch != "Darwin":
|
||||
env.Append(LINKFLAGS=["-Wl,--as-needed", "-Wl,--no-undefined"])
|
||||
|
||||
# Shorter build output: show brief descriptions instead of full commands.
|
||||
# Full command lines are still printed on failure by scons.
|
||||
if not GetOption('verbose'):
|
||||
for action, short in (
|
||||
("CC", "CC"),
|
||||
("CXX", "CXX"),
|
||||
("LINK", "LINK"),
|
||||
("SHCC", "CC"),
|
||||
("SHCXX", "CXX"),
|
||||
("SHLINK", "LINK"),
|
||||
("AR", "AR"),
|
||||
("RANLIB", "RANLIB"),
|
||||
("AS", "AS"),
|
||||
):
|
||||
env[f"{action}COMSTR"] = f" [{short}] $TARGET"
|
||||
|
||||
# progress output
|
||||
node_interval = 5
|
||||
node_count = 0
|
||||
@@ -149,10 +175,9 @@ if os.environ.get('SCONS_PROGRESS'):
|
||||
Progress(progress_function, interval=node_interval)
|
||||
|
||||
# ********** Cython build environment **********
|
||||
py_include = sysconfig.get_paths()['include']
|
||||
envCython = env.Clone()
|
||||
envCython["CPPPATH"] += [py_include, np.get_include()]
|
||||
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-shadow", "-Wno-deprecated-declarations"]
|
||||
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-cpp", "-Wno-shadow", "-Wno-deprecated-declarations"]
|
||||
envCython["CCFLAGS"].remove("-Werror")
|
||||
|
||||
envCython["LIBS"] = []
|
||||
@@ -215,10 +240,8 @@ SConscript(['selfdrive/SConscript'])
|
||||
|
||||
SConscript(['sunnypilot/SConscript'])
|
||||
|
||||
if Dir('#tools/cabana/').exists() and GetOption('extras'):
|
||||
SConscript(['tools/replay/SConscript'])
|
||||
if arch != "larch64":
|
||||
SConscript(['tools/cabana/SConscript'])
|
||||
if Dir('#tools/cabana/').exists() and arch != "larch64":
|
||||
SConscript(['tools/cabana/SConscript'])
|
||||
|
||||
|
||||
env.CompilationDatabase('compile_commands.json')
|
||||
|
||||
@@ -499,7 +499,8 @@ struct DeviceState @0xa4d8b5af2aa492eb {
|
||||
pmicTempC @39 :List(Float32);
|
||||
intakeTempC @46 :Float32;
|
||||
exhaustTempC @47 :Float32;
|
||||
caseTempC @48 :Float32;
|
||||
gnssTempC @48 :Float32;
|
||||
bottomSocTempC @50 :Float32;
|
||||
maxTempC @44 :Float32; # max of other temps, used to control fan
|
||||
thermalZones @38 :List(ThermalZone);
|
||||
thermalStatus @14 :ThermalStatus;
|
||||
@@ -592,6 +593,7 @@ struct PandaState @0xa7649e2575e4591e {
|
||||
harnessStatus @21 :HarnessStatus;
|
||||
sbu1Voltage @35 :Float32;
|
||||
sbu2Voltage @36 :Float32;
|
||||
soundOutputLevel @37 :UInt16;
|
||||
|
||||
# can health
|
||||
canState0 @29 :PandaCanState;
|
||||
@@ -2232,9 +2234,9 @@ struct DriverMonitoringState @0xb83cda094a1da284 {
|
||||
isActiveMode @16 :Bool;
|
||||
isRHD @4 :Bool;
|
||||
uncertainCount @19 :UInt32;
|
||||
phoneProbOffset @20 :Float32;
|
||||
phoneProbValidCount @21 :UInt32;
|
||||
|
||||
phoneProbOffsetDEPRECATED @20 :Float32;
|
||||
phoneProbValidCountDEPRECATED @21 :UInt32;
|
||||
isPreviewDEPRECATED @15 :Bool;
|
||||
rhdCheckedDEPRECATED @5 :Bool;
|
||||
eventsDEPRECATED @0 :List(Car.OnroadEventDEPRECATED);
|
||||
|
||||
@@ -5,7 +5,7 @@ import numbers
|
||||
import random
|
||||
import threading
|
||||
import time
|
||||
from parameterized import parameterized
|
||||
from openpilot.common.parameterized import parameterized
|
||||
import pytest
|
||||
|
||||
from cereal import log, car
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
import tempfile
|
||||
from typing import Dict
|
||||
from parameterized import parameterized
|
||||
from openpilot.common.parameterized import parameterized
|
||||
|
||||
import cereal.services as services
|
||||
from cereal.services import SERVICE_LIST
|
||||
|
||||
@@ -5,7 +5,6 @@ common_libs = [
|
||||
'swaglog.cc',
|
||||
'util.cc',
|
||||
'ratekeeper.cc',
|
||||
'clutil.cc',
|
||||
]
|
||||
|
||||
_common = env.Library('common', common_libs, LIBS="json11")
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
#include "common/clutil.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
#include "common/util.h"
|
||||
#include "common/swaglog.h"
|
||||
|
||||
namespace { // helper functions
|
||||
|
||||
template <typename Func, typename Id, typename Name>
|
||||
std::string get_info(Func get_info_func, Id id, Name param_name) {
|
||||
size_t size = 0;
|
||||
CL_CHECK(get_info_func(id, param_name, 0, NULL, &size));
|
||||
std::string info(size, '\0');
|
||||
CL_CHECK(get_info_func(id, param_name, size, info.data(), NULL));
|
||||
return info;
|
||||
}
|
||||
inline std::string get_platform_info(cl_platform_id id, cl_platform_info name) { return get_info(&clGetPlatformInfo, id, name); }
|
||||
inline std::string get_device_info(cl_device_id id, cl_device_info name) { return get_info(&clGetDeviceInfo, id, name); }
|
||||
|
||||
void cl_print_info(cl_platform_id platform, cl_device_id device) {
|
||||
size_t work_group_size = 0;
|
||||
cl_device_type device_type = 0;
|
||||
clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_GROUP_SIZE, sizeof(work_group_size), &work_group_size, NULL);
|
||||
clGetDeviceInfo(device, CL_DEVICE_TYPE, sizeof(device_type), &device_type, NULL);
|
||||
const char *type_str = "Other...";
|
||||
switch (device_type) {
|
||||
case CL_DEVICE_TYPE_CPU: type_str ="CL_DEVICE_TYPE_CPU"; break;
|
||||
case CL_DEVICE_TYPE_GPU: type_str = "CL_DEVICE_TYPE_GPU"; break;
|
||||
case CL_DEVICE_TYPE_ACCELERATOR: type_str = "CL_DEVICE_TYPE_ACCELERATOR"; break;
|
||||
}
|
||||
|
||||
LOGD("vendor: %s", get_platform_info(platform, CL_PLATFORM_VENDOR).c_str());
|
||||
LOGD("platform version: %s", get_platform_info(platform, CL_PLATFORM_VERSION).c_str());
|
||||
LOGD("profile: %s", get_platform_info(platform, CL_PLATFORM_PROFILE).c_str());
|
||||
LOGD("extensions: %s", get_platform_info(platform, CL_PLATFORM_EXTENSIONS).c_str());
|
||||
LOGD("name: %s", get_device_info(device, CL_DEVICE_NAME).c_str());
|
||||
LOGD("device version: %s", get_device_info(device, CL_DEVICE_VERSION).c_str());
|
||||
LOGD("max work group size: %zu", work_group_size);
|
||||
LOGD("type = %d, %s", (int)device_type, type_str);
|
||||
}
|
||||
|
||||
void cl_print_build_errors(cl_program program, cl_device_id device) {
|
||||
cl_build_status status;
|
||||
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_STATUS, sizeof(status), &status, NULL);
|
||||
size_t log_size;
|
||||
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size);
|
||||
std::string log(log_size, '\0');
|
||||
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, log_size, &log[0], NULL);
|
||||
|
||||
LOGE("build failed; status=%d, log: %s", status, log.c_str());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
cl_device_id cl_get_device_id(cl_device_type device_type) {
|
||||
cl_uint num_platforms = 0;
|
||||
CL_CHECK(clGetPlatformIDs(0, NULL, &num_platforms));
|
||||
std::unique_ptr<cl_platform_id[]> platform_ids = std::make_unique<cl_platform_id[]>(num_platforms);
|
||||
CL_CHECK(clGetPlatformIDs(num_platforms, &platform_ids[0], NULL));
|
||||
|
||||
for (size_t i = 0; i < num_platforms; ++i) {
|
||||
LOGD("platform[%zu] CL_PLATFORM_NAME: %s", i, get_platform_info(platform_ids[i], CL_PLATFORM_NAME).c_str());
|
||||
|
||||
// Get first device
|
||||
if (cl_device_id device_id = NULL; clGetDeviceIDs(platform_ids[i], device_type, 1, &device_id, NULL) == 0 && device_id) {
|
||||
cl_print_info(platform_ids[i], device_id);
|
||||
return device_id;
|
||||
}
|
||||
}
|
||||
LOGE("No valid openCL platform found");
|
||||
assert(0);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
cl_context cl_create_context(cl_device_id device_id) {
|
||||
return CL_CHECK_ERR(clCreateContext(NULL, 1, &device_id, NULL, NULL, &err));
|
||||
}
|
||||
|
||||
void cl_release_context(cl_context context) {
|
||||
clReleaseContext(context);
|
||||
}
|
||||
|
||||
cl_program cl_program_from_file(cl_context ctx, cl_device_id device_id, const char* path, const char* args) {
|
||||
return cl_program_from_source(ctx, device_id, util::read_file(path), args);
|
||||
}
|
||||
|
||||
cl_program cl_program_from_source(cl_context ctx, cl_device_id device_id, const std::string& src, const char* args) {
|
||||
const char *csrc = src.c_str();
|
||||
cl_program prg = CL_CHECK_ERR(clCreateProgramWithSource(ctx, 1, &csrc, NULL, &err));
|
||||
if (int err = clBuildProgram(prg, 1, &device_id, args, NULL, NULL); err != 0) {
|
||||
cl_print_build_errors(prg, device_id);
|
||||
assert(0);
|
||||
}
|
||||
return prg;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
#define CL_CHECK(_expr) \
|
||||
do { \
|
||||
assert(CL_SUCCESS == (_expr)); \
|
||||
} while (0)
|
||||
|
||||
#define CL_CHECK_ERR(_expr) \
|
||||
({ \
|
||||
cl_int err = CL_INVALID_VALUE; \
|
||||
__typeof__(_expr) _ret = _expr; \
|
||||
assert(_ret&& err == CL_SUCCESS); \
|
||||
_ret; \
|
||||
})
|
||||
|
||||
cl_device_id cl_get_device_id(cl_device_type device_type);
|
||||
cl_context cl_create_context(cl_device_id device_id);
|
||||
void cl_release_context(cl_context context);
|
||||
cl_program cl_program_from_source(cl_context ctx, cl_device_id device_id, const std::string& src, const char* args = nullptr);
|
||||
cl_program cl_program_from_file(cl_context ctx, cl_device_id device_id, const char* path, const char* args);
|
||||
37
common/file_chunker.py
Normal file
37
common/file_chunker.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import math
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
CHUNK_SIZE = 45 * 1024 * 1024 # 45MB, under GitHub's 50MB limit
|
||||
|
||||
def get_chunk_name(name, idx, num_chunks):
|
||||
return f"{name}.chunk{idx+1:02d}of{num_chunks:02d}"
|
||||
|
||||
def get_manifest_path(name):
|
||||
return f"{name}.chunkmanifest"
|
||||
|
||||
def get_chunk_paths(path, file_size):
|
||||
num_chunks = math.ceil(file_size / CHUNK_SIZE)
|
||||
return [get_manifest_path(path)] + [get_chunk_name(path, i, num_chunks) for i in range(num_chunks)]
|
||||
|
||||
def chunk_file(path, targets):
|
||||
manifest_path, *chunk_paths = targets
|
||||
with open(path, 'rb') as f:
|
||||
data = f.read()
|
||||
actual_num_chunks = max(1, math.ceil(len(data) / CHUNK_SIZE))
|
||||
assert len(chunk_paths) >= actual_num_chunks, f"Allowed {len(chunk_paths)} chunks but needs at least {actual_num_chunks}, for path {path}"
|
||||
for i, chunk_path in enumerate(chunk_paths):
|
||||
with open(chunk_path, 'wb') as f:
|
||||
f.write(data[i * CHUNK_SIZE:(i + 1) * CHUNK_SIZE])
|
||||
Path(manifest_path).write_text(str(len(chunk_paths)))
|
||||
os.remove(path)
|
||||
|
||||
|
||||
def read_file_chunked(path):
|
||||
manifest_path = get_manifest_path(path)
|
||||
if os.path.isfile(manifest_path):
|
||||
num_chunks = int(Path(manifest_path).read_text().strip())
|
||||
return b''.join(Path(get_chunk_name(path, i, num_chunks)).read_bytes() for i in range(num_chunks))
|
||||
if os.path.isfile(path):
|
||||
return Path(path).read_bytes()
|
||||
raise FileNotFoundError(path)
|
||||
85
common/mat.h
85
common/mat.h
@@ -1,85 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct vec3 {
|
||||
float v[3];
|
||||
} vec3;
|
||||
|
||||
typedef struct vec4 {
|
||||
float v[4];
|
||||
} vec4;
|
||||
|
||||
typedef struct mat3 {
|
||||
float v[3*3];
|
||||
} mat3;
|
||||
|
||||
typedef struct mat4 {
|
||||
float v[4*4];
|
||||
} mat4;
|
||||
|
||||
static inline mat3 matmul3(const mat3 &a, const mat3 &b) {
|
||||
mat3 ret = {{0.0}};
|
||||
for (int r=0; r<3; r++) {
|
||||
for (int c=0; c<3; c++) {
|
||||
float v = 0.0;
|
||||
for (int k=0; k<3; k++) {
|
||||
v += a.v[r*3+k] * b.v[k*3+c];
|
||||
}
|
||||
ret.v[r*3+c] = v;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline vec3 matvecmul3(const mat3 &a, const vec3 &b) {
|
||||
vec3 ret = {{0.0}};
|
||||
for (int r=0; r<3; r++) {
|
||||
for (int c=0; c<3; c++) {
|
||||
ret.v[r] += a.v[r*3+c] * b.v[c];
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline mat4 matmul(const mat4 &a, const mat4 &b) {
|
||||
mat4 ret = {{0.0}};
|
||||
for (int r=0; r<4; r++) {
|
||||
for (int c=0; c<4; c++) {
|
||||
float v = 0.0;
|
||||
for (int k=0; k<4; k++) {
|
||||
v += a.v[r*4+k] * b.v[k*4+c];
|
||||
}
|
||||
ret.v[r*4+c] = v;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline vec4 matvecmul(const mat4 &a, const vec4 &b) {
|
||||
vec4 ret = {{0.0}};
|
||||
for (int r=0; r<4; r++) {
|
||||
for (int c=0; c<4; c++) {
|
||||
ret.v[r] += a.v[r*4+c] * b.v[c];
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// scales the input and output space of a transformation matrix
|
||||
// that assumes pixel-center origin.
|
||||
static inline mat3 transform_scale_buffer(const mat3 &in, float s) {
|
||||
// in_pt = ( transform(out_pt/s + 0.5) - 0.5) * s
|
||||
|
||||
mat3 transform_out = {{
|
||||
1.0f/s, 0.0f, 0.5f,
|
||||
0.0f, 1.0f/s, 0.5f,
|
||||
0.0f, 0.0f, 1.0f,
|
||||
}};
|
||||
|
||||
mat3 transform_in = {{
|
||||
s, 0.0f, -0.5f*s,
|
||||
0.0f, s, -0.5f*s,
|
||||
0.0f, 0.0f, 1.0f,
|
||||
}};
|
||||
|
||||
return matmul3(transform_in, matmul3(in, transform_out));
|
||||
}
|
||||
47
common/parameterized.py
Normal file
47
common/parameterized.py
Normal file
@@ -0,0 +1,47 @@
|
||||
import sys
|
||||
import pytest
|
||||
import inspect
|
||||
|
||||
|
||||
class parameterized:
|
||||
@staticmethod
|
||||
def expand(cases):
|
||||
cases = list(cases)
|
||||
|
||||
if not cases:
|
||||
return lambda func: pytest.mark.skip("no parameterized cases")(func)
|
||||
|
||||
def decorator(func):
|
||||
params = [p for p in inspect.signature(func).parameters if p != 'self']
|
||||
normalized = [c if isinstance(c, tuple) else (c,) for c in cases]
|
||||
# Infer arg count from first case so extra params (e.g. from @given) are left untouched
|
||||
expand_params = params[: len(normalized[0])]
|
||||
if len(expand_params) == 1:
|
||||
return pytest.mark.parametrize(expand_params[0], [c[0] for c in normalized])(func)
|
||||
return pytest.mark.parametrize(', '.join(expand_params), normalized)(func)
|
||||
|
||||
return decorator
|
||||
|
||||
|
||||
def parameterized_class(attrs, input_list=None):
|
||||
if isinstance(attrs, list) and (not attrs or isinstance(attrs[0], dict)):
|
||||
params_list = attrs
|
||||
else:
|
||||
assert input_list is not None
|
||||
attr_names = (attrs,) if isinstance(attrs, str) else tuple(attrs)
|
||||
params_list = [dict(zip(attr_names, v if isinstance(v, (tuple, list)) else (v,), strict=False)) for v in input_list]
|
||||
|
||||
def decorator(cls):
|
||||
globs = sys._getframe(1).f_globals
|
||||
for i, params in enumerate(params_list):
|
||||
name = f"{cls.__name__}_{i}"
|
||||
new_cls = type(name, (cls,), dict(params))
|
||||
new_cls.__module__ = cls.__module__
|
||||
new_cls.__test__ = True # override inherited False so pytest collects this subclass
|
||||
globs[name] = new_cls
|
||||
# Don't collect the un-parametrised base, but return it so outer decorators
|
||||
# (e.g. @pytest.mark.skip) land on it and propagate to subclasses via MRO.
|
||||
cls.__test__ = False
|
||||
return cls
|
||||
|
||||
return decorator
|
||||
@@ -170,7 +170,9 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
|
||||
{"OffroadMode", {CLEAR_ON_MANAGER_START, BOOL}},
|
||||
{"Offroad_TiciSupport", {CLEAR_ON_MANAGER_START, JSON}},
|
||||
{"OnroadScreenOffBrightness", {PERSISTENT | BACKUP, INT, "0"}},
|
||||
{"OnroadScreenOffBrightnessMigrated", {PERSISTENT | BACKUP, STRING, "0.0"}},
|
||||
{"OnroadScreenOffTimer", {PERSISTENT | BACKUP, INT, "15"}},
|
||||
{"OnroadScreenOffTimerMigrated", {PERSISTENT | BACKUP, STRING, "0.0"}},
|
||||
{"OnroadUploads", {PERSISTENT | BACKUP, BOOL, "1"}},
|
||||
{"QuickBootToggle", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"QuietMode", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
@@ -190,7 +192,7 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
|
||||
// Model Manager params
|
||||
{"ModelManager_ActiveBundle", {PERSISTENT, JSON}},
|
||||
{"ModelManager_ClearCache", {CLEAR_ON_MANAGER_START, BOOL}},
|
||||
{"ModelManager_DownloadIndex", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, INT, "0"}},
|
||||
{"ModelManager_DownloadIndex", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, INT}},
|
||||
{"ModelManager_Favs", {PERSISTENT | BACKUP, STRING}},
|
||||
{"ModelManager_LastSyncTime", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, INT, "0"}},
|
||||
{"ModelManager_ModelsCache", {PERSISTENT | BACKUP, JSON}},
|
||||
@@ -218,6 +220,7 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
|
||||
{"SubaruStopAndGoManualParkingBrake", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"TeslaCoopSteering", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"ToyotaEnforceStockLongitudinal", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"ToyotaStopAndGoHack", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
|
||||
{"DynamicExperimentalControl", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"BlindSpot", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
@@ -268,6 +271,7 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
|
||||
{"EnforceTorqueControl", {PERSISTENT | BACKUP, BOOL}},
|
||||
{"LiveTorqueParamsToggle", {PERSISTENT | BACKUP , BOOL}},
|
||||
{"LiveTorqueParamsRelaxedToggle", {PERSISTENT | BACKUP , BOOL}},
|
||||
{"TorqueControlTune", {PERSISTENT | BACKUP, FLOAT}},
|
||||
{"TorqueParamsOverrideEnabled", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"TorqueParamsOverrideFriction", {PERSISTENT | BACKUP, FLOAT, "0.1"}},
|
||||
{"TorqueParamsOverrideLatAccelFactor", {PERSISTENT | BACKUP, FLOAT, "2.5"}},
|
||||
|
||||
@@ -27,14 +27,14 @@ public:
|
||||
auto param_path = Params().getParamPath();
|
||||
if (util::file_exists(param_path)) {
|
||||
std::string real_path = util::readlink(param_path);
|
||||
system(util::string_format("rm %s -rf", real_path.c_str()).c_str());
|
||||
util::check_system(util::string_format("rm %s -rf", real_path.c_str()));
|
||||
unlink(param_path.c_str());
|
||||
}
|
||||
if (getenv("COMMA_CACHE") == nullptr) {
|
||||
system(util::string_format("rm %s -rf", Path::download_cache_root().c_str()).c_str());
|
||||
util::check_system(util::string_format("rm %s -rf", Path::download_cache_root().c_str()));
|
||||
}
|
||||
system(util::string_format("rm %s -rf", Path::comma_home().c_str()).c_str());
|
||||
system(util::string_format("rm %s -rf", msgq_path.c_str()).c_str());
|
||||
util::check_system(util::string_format("rm %s -rf", Path::comma_home().c_str()));
|
||||
util::check_system(util::string_format("rm %s -rf", msgq_path.c_str()));
|
||||
unsetenv("OPENPILOT_PREFIX");
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
#include "common/timing.h"
|
||||
#include "common/util.h"
|
||||
|
||||
RateKeeper::RateKeeper(const std::string &name, float rate, float print_delay_threshold)
|
||||
: name(name),
|
||||
print_delay_threshold(std::max(0.f, print_delay_threshold)) {
|
||||
RateKeeper::RateKeeper(const std::string &name_, float rate, float print_delay_threshold_)
|
||||
: name(name_),
|
||||
print_delay_threshold(std::max(0.f, print_delay_threshold_)) {
|
||||
interval = 1 / rate;
|
||||
last_monitor_time = seconds_since_boot();
|
||||
next_frame_time = last_monitor_time + interval;
|
||||
|
||||
@@ -36,7 +36,7 @@ TEST_CASE("util::read_file") {
|
||||
REQUIRE(util::read_file(filename).empty());
|
||||
|
||||
std::string content = random_bytes(64 * 1024);
|
||||
write(fd, content.c_str(), content.size());
|
||||
REQUIRE(write(fd, content.c_str(), content.size()) == (ssize_t)content.size());
|
||||
std::string ret = util::read_file(filename);
|
||||
bool equal = (ret == content);
|
||||
REQUIRE(equal);
|
||||
@@ -114,12 +114,12 @@ TEST_CASE("util::safe_fwrite") {
|
||||
}
|
||||
|
||||
TEST_CASE("util::create_directories") {
|
||||
system("rm /tmp/test_create_directories -rf");
|
||||
REQUIRE(system("rm /tmp/test_create_directories -rf") == 0);
|
||||
std::string dir = "/tmp/test_create_directories/a/b/c/d/e/f";
|
||||
|
||||
auto check_dir_permissions = [](const std::string &dir, mode_t mode) -> bool {
|
||||
auto check_dir_permissions = [](const std::string &path, mode_t mode) -> bool {
|
||||
struct stat st = {};
|
||||
return stat(dir.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR && (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) == mode;
|
||||
return stat(path.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR && (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) == mode;
|
||||
};
|
||||
|
||||
SECTION("create_directories") {
|
||||
@@ -132,7 +132,7 @@ TEST_CASE("util::create_directories") {
|
||||
}
|
||||
SECTION("a file exists with the same name") {
|
||||
REQUIRE(util::create_directories(dir, 0755));
|
||||
int f = open((dir + "/file").c_str(), O_RDWR | O_CREAT);
|
||||
int f = open((dir + "/file").c_str(), O_RDWR | O_CREAT, 0644);
|
||||
REQUIRE(f != -1);
|
||||
close(f);
|
||||
REQUIRE(util::create_directories(dir + "/file", 0755) == false);
|
||||
|
||||
@@ -181,9 +181,9 @@ bool file_exists(const std::string& fn) {
|
||||
}
|
||||
|
||||
static bool createDirectory(std::string dir, mode_t mode) {
|
||||
auto verify_dir = [](const std::string& dir) -> bool {
|
||||
auto verify_dir = [](const std::string& path) -> bool {
|
||||
struct stat st = {};
|
||||
return (stat(dir.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR);
|
||||
return (stat(path.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR);
|
||||
};
|
||||
// remove trailing /'s
|
||||
while (dir.size() > 1 && dir.back() == '/') {
|
||||
@@ -288,7 +288,7 @@ std::string strip(const std::string &str) {
|
||||
std::string check_output(const std::string& command) {
|
||||
char buffer[128];
|
||||
std::string result;
|
||||
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(command.c_str(), "r"), pclose);
|
||||
std::unique_ptr<FILE, int(*)(FILE*)> pipe(popen(command.c_str(), "r"), pclose);
|
||||
|
||||
if (!pipe) {
|
||||
return "";
|
||||
@@ -303,7 +303,7 @@ std::string check_output(const std::string& command) {
|
||||
|
||||
bool system_time_valid() {
|
||||
// Default to August 26, 2024
|
||||
tm min_tm = {.tm_year = 2024 - 1900, .tm_mon = 7, .tm_mday = 26};
|
||||
tm min_tm = {.tm_mday = 26, .tm_mon = 7, .tm_year = 2024 - 1900};
|
||||
time_t min_date = mktime(&min_tm);
|
||||
|
||||
struct stat st;
|
||||
|
||||
@@ -97,6 +97,13 @@ bool create_directories(const std::string &dir, mode_t mode);
|
||||
|
||||
std::string check_output(const std::string& command);
|
||||
|
||||
inline void check_system(const std::string& cmd) {
|
||||
int ret = std::system(cmd.c_str());
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "system command failed (%d): %s\n", ret, cmd.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
bool system_time_valid();
|
||||
|
||||
inline void sleep_for(const int milliseconds) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
A supported vehicle is one that just works when you install a comma device. All supported cars provide a better experience than any stock system. Supported vehicles reference the US market unless otherwise specified.
|
||||
|
||||
# 335 Supported Cars
|
||||
# 336 Supported Cars
|
||||
|
||||
|Make|Model|Supported Package|ACC|No ACC accel below|No ALC below|Steering Torque|Resume from stop|<a href="##"><img width=2000></a>Hardware Needed<br> |Video|Setup Video|
|
||||
|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
@@ -166,6 +166,7 @@ A supported vehicle is one that just works when you install a comma device. All
|
||||
|Kia|Forte 2022-23|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai E connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Kia Forte 2022-23">Buy Here</a></sub></details>|||
|
||||
|Kia|K5 2021-24|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai A connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Kia K5 2021-24">Buy Here</a></sub></details>|||
|
||||
|Kia|K5 Hybrid 2020-22|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai A connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Kia K5 Hybrid 2020-22">Buy Here</a></sub></details>|||
|
||||
|Kia|K7 2017|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai C connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Kia K7 2017">Buy Here</a></sub></details>|||
|
||||
|Kia|K8 Hybrid (with HDA II) 2023|Highway Driving Assist II|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai Q connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Kia K8 Hybrid (with HDA II) 2023">Buy Here</a></sub></details>|||
|
||||
|Kia|Niro EV 2019|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai H connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Kia Niro EV 2019">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=lT7zcG6ZpGo" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>||
|
||||
|Kia|Niro EV 2020|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai F connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Kia Niro EV 2020">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=lT7zcG6ZpGo" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>||
|
||||
@@ -345,7 +346,7 @@ A supported vehicle is one that just works when you install a comma device. All
|
||||
|Volkswagen|Touran 2016-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,14</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 VW J533 connector<br>- 1 comma four<br>- 1 harness box<br>- 1 long OBD-C cable (9.5 ft)<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Volkswagen Touran 2016-23">Buy Here</a></sub></details>|||
|
||||
|
||||
### Footnotes
|
||||
<sup>1</sup>openpilot Longitudinal Control (Alpha) is available behind a toggle; the toggle is only available in non-release branches such as `devel` or `nightly-dev`. <br />
|
||||
<sup>1</sup>openpilot Longitudinal Control (Alpha) is available behind a toggle; the toggle is only available in non-release branches such as `nightly-dev`. <br />
|
||||
<sup>2</sup>Refers only to the Focus Mk4 (C519) available in Europe/China/Taiwan/Australasia, not the Focus Mk3 (C346) in North and South America/Southeast Asia. <br />
|
||||
<sup>3</sup>See more setup details for <a href="https://github.com/commaai/openpilot/wiki/gm" target="_blank">GM</a>. <br />
|
||||
<sup>4</sup>2019 Honda Civic 1.6L Diesel Sedan does not have ALC below 12mph. <br />
|
||||
|
||||
@@ -13,13 +13,13 @@ Development is coordinated through [Discord](https://discord.comma.ai) and GitHu
|
||||
## What contributions are we looking for?
|
||||
|
||||
**openpilot's priorities are [safety](SAFETY.md), stability, quality, and features, in that order.**
|
||||
openpilot is part of comma's mission to *solve self-driving cars while delivering shippable intermediaries*, and all development is towards that goal.
|
||||
openpilot is part of comma's mission to *solve self-driving cars while delivering shippable intermediaries*, and all development is towards that goal.
|
||||
|
||||
### What gets merged?
|
||||
|
||||
The probability of a pull request being merged is a function of its value to the project and the effort it will take us to get it merged.
|
||||
If a PR offers *some* value but will take lots of time to get merged, it will be closed.
|
||||
Simple, well-tested bug fixes are the easiest to merge, and new features are the hardest to get merged.
|
||||
Simple, well-tested bug fixes are the easiest to merge, and new features are the hardest to get merged.
|
||||
|
||||
All of these are examples of good PRs:
|
||||
* typo fix: https://github.com/commaai/openpilot/pull/30678
|
||||
@@ -29,17 +29,17 @@ All of these are examples of good PRs:
|
||||
|
||||
### What doesn't get merged?
|
||||
|
||||
* **style changes**: code is art, and it's up to the author to make it beautiful
|
||||
* **style changes**: code is art, and it's up to the author to make it beautiful
|
||||
* **500+ line PRs**: clean it up, break it up into smaller PRs, or both
|
||||
* **PRs without a clear goal**: every PR must have a singular and clear goal
|
||||
* **UI design**: we do not have a good review process for this yet
|
||||
* **New features**: We believe openpilot is mostly feature-complete, and the rest is a matter of refinement and fixing bugs. As a result of this, most feature PRs will be immediately closed, however the beauty of open source is that forks can and do offer features that upstream openpilot doesn't.
|
||||
* **Negative expected value**: This a class of PRs that makes an improvement, but the risk or validation costs more than the improvement. The risk can be mitigated by first getting a failing test merged.
|
||||
* **Negative expected value**: This is a class of PRs that makes an improvement, but the risk or validation costs more than the improvement. The risk can be mitigated by first getting a failing test merged.
|
||||
|
||||
### First contribution
|
||||
|
||||
[Projects / openpilot bounties](https://github.com/orgs/commaai/projects/26/views/1?pane=info) is the best place to get started and goes in-depth on what's expected when working on a bounty.
|
||||
There's lot of bounties that don't require a comma 3X or a car.
|
||||
There are a lot of bounties that don't require a comma 3X or a car.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ NOTE: Those commands must be run in the root directory of openpilot, **not /docs
|
||||
|
||||
**1. Install the docs dependencies**
|
||||
``` bash
|
||||
pip install .[docs]
|
||||
uv pip install .[docs]
|
||||
```
|
||||
|
||||
**2. Build the new site**
|
||||
|
||||
@@ -21,10 +21,10 @@ Each car brand is supported by a standard interface structure in `opendbc/car/[b
|
||||
* `values.py`: Limits for actuation, general constants for cars, and supported car documentation
|
||||
* `radar_interface.py`: Interface for parsing radar points from the car, if applicable
|
||||
|
||||
## panda
|
||||
## safety
|
||||
|
||||
* `board/safety/safety_[brand].h`: Brand-specific safety logic
|
||||
* `tests/safety/test_[brand].py`: Brand-specific safety CI tests
|
||||
* `opendbc_repo/opendbc/safety/modes/[brand].h`: Brand-specific safety logic
|
||||
* `opendbc_repo/opendbc/safety/tests/test_[brand].py`: Brand-specific safety CI tests
|
||||
|
||||
## openpilot
|
||||
|
||||
|
||||
3
docs_sp/assets/favicon.png
Normal file
3
docs_sp/assets/favicon.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f64cd24ccac9a73100f206909639424421db1fce74dc77c386cdeefa9d16df9c
|
||||
size 1959
|
||||
BIN
docs_sp/assets/logo.png
LFS
Normal file
BIN
docs_sp/assets/logo.png
LFS
Normal file
Binary file not shown.
27
docs_sp/community/contributing.md
Normal file
27
docs_sp/community/contributing.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Contributing
|
||||
---
|
||||
|
||||
# Contributing to sunnypilot
|
||||
|
||||
We welcome contributions from the community! Here's how you can help.
|
||||
|
||||
## Ways to Contribute
|
||||
|
||||
- **Report bugs** — See [Reporting a Bug](reporting-a-bug.md)
|
||||
- **Submit code** — Follow the [Workflow](workflow.md) guide
|
||||
- **Improve documentation** — Submit PRs to the `docs` branch
|
||||
- **Help others** — Join the [sunnypilot community forum](https://community.sunnypilot.ai)
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
Be respectful, constructive, and helpful. We're all here to make driving safer and more enjoyable.
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Fork the [sunnypilot repository](https://github.com/sunnypilot/sunnypilot)
|
||||
2. Create a feature branch
|
||||
3. Make your changes
|
||||
4. Submit a pull request
|
||||
|
||||
See [Workflow](workflow.md) for detailed steps.
|
||||
12
docs_sp/community/index.md
Normal file
12
docs_sp/community/index.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Community
|
||||
---
|
||||
|
||||
# Community
|
||||
|
||||
Get involved with sunnypilot development and connect with other users.
|
||||
|
||||
- **[Contributing](contributing.md)** - How to contribute code, documentation, and translations
|
||||
- **[Workflow](workflow.md)** - Development workflow and branch strategy
|
||||
- **[Reporting a Bug](reporting-a-bug.md)** - How to file an effective bug report
|
||||
- **[Community Forum](https://community.sunnypilot.ai)** - Join the discussion
|
||||
69
docs_sp/community/reporting-a-bug.md
Normal file
69
docs_sp/community/reporting-a-bug.md
Normal file
@@ -0,0 +1,69 @@
|
||||
---
|
||||
title: Reporting a Bug
|
||||
---
|
||||
|
||||
# Reporting a Bug
|
||||
|
||||
Help us improve sunnypilot by reporting issues you encounter.
|
||||
|
||||
## Before Reporting
|
||||
|
||||
!!! warning "Remove Customizations First"
|
||||
If you have any custom modifications (forks, patches, config tweaks), **remove them and reproduce the issue on an official sunnypilot branch** before reporting. This rules out your modifications as the cause and helps maintainers focus on real bugs.
|
||||
|
||||
1. **Upgrade** to the latest version — the bug may already be fixed
|
||||
2. **Remove customizations** — reproduce on a stock official branch
|
||||
3. **Search** [GitHub Issues](https://github.com/sunnypilot/sunnypilot/issues) and the [sunnypilot community forum](https://community.sunnypilot.ai) for known reports
|
||||
4. **Preserve the route** — upload raw logs via [Comma Connect](https://connect.comma.ai) and keep the route available
|
||||
|
||||
## What to Include
|
||||
|
||||
### Required Information
|
||||
|
||||
- **Dongle ID** — Your comma Dongle ID (found in **Settings** → **Device** or in Comma Connect)
|
||||
- **Route ID** — The route ID from Comma Connect for the drive where the issue occurred
|
||||
- **Device info** — Hardware model (C3, C3X, C4), software version, branch
|
||||
- **Vehicle info** — Make, model, year
|
||||
|
||||
### Bug Report Template
|
||||
|
||||
Use the following structure when filing your report:
|
||||
|
||||
!!! example "Bug Report Format"
|
||||
|
||||
**Title:** One-sentence summary of the issue
|
||||
|
||||
**Description:** 1-2 sentences providing additional context about the problem.
|
||||
|
||||
**Steps to Reproduce:**
|
||||
|
||||
1. Step one
|
||||
2. Step two
|
||||
3. Step three
|
||||
|
||||
**Expected behavior:** What should have happened
|
||||
|
||||
**Actual behavior:** What actually happened
|
||||
|
||||
**Related Links:** Route link, log files, screenshots, or references to related issues
|
||||
|
||||
## Pre-Submission Checklist
|
||||
|
||||
Before submitting, confirm the following:
|
||||
|
||||
- [ ] I am running the latest version of sunnypilot
|
||||
- [ ] I have removed all custom modifications and reproduced the issue on an official branch
|
||||
- [ ] I have searched existing issues and community channels for duplicates
|
||||
- [ ] I have preserved the route and uploaded raw logs via Comma Connect
|
||||
- [ ] I have included my comma Dongle ID
|
||||
- [ ] I have included the Route ID for the affected drive
|
||||
|
||||
## How to Report
|
||||
|
||||
1. Go to [GitHub Issues](https://github.com/sunnypilot/sunnypilot/issues/new)
|
||||
2. Use the bug report template
|
||||
3. Fill in all requested information using the format above
|
||||
4. Submit the issue
|
||||
|
||||
!!! tip
|
||||
The more detail you provide, the faster we can diagnose and fix the issue. Incomplete reports without Dongle IDs or route information may be closed.
|
||||
37
docs_sp/community/workflow.md
Normal file
37
docs_sp/community/workflow.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
title: Workflow
|
||||
---
|
||||
|
||||
# Development Workflow
|
||||
|
||||
How to contribute code to sunnypilot.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Git installed
|
||||
- Python 3.12+
|
||||
- A GitHub account
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Fork** the repository on GitHub
|
||||
2. **Clone** your fork locally
|
||||
3. **Create a branch** from the appropriate base branch
|
||||
4. **Make changes** and test locally
|
||||
5. **Push** your branch to your fork
|
||||
6. **Open a pull request** against the main repository
|
||||
|
||||
## Branch Naming
|
||||
|
||||
Use descriptive branch names:
|
||||
|
||||
- `feat/feature-name` — New features
|
||||
- `fix/bug-description` — Bug fixes
|
||||
- `docs/topic` — Documentation changes
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
- Keep PRs focused on a single change
|
||||
- Include a clear description of what and why
|
||||
- Reference any related issues
|
||||
- Ensure tests pass
|
||||
10
docs_sp/features/connected/index.md
Normal file
10
docs_sp/features/connected/index.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: Connected Services
|
||||
---
|
||||
|
||||
# Connected Services
|
||||
|
||||
Cloud and map integrations that extend sunnypilot beyond the vehicle.
|
||||
|
||||
- [sunnylink](sunnylink.md) - settings backup/restore, sponsor tiers, GitHub account pairing, and remote device management
|
||||
- [OSM Maps](osm-maps.md) - OpenStreetMap data for speed limits, road names, and map-based driving features
|
||||
45
docs_sp/features/connected/osm-maps.md
Normal file
45
docs_sp/features/connected/osm-maps.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: OSM Maps
|
||||
---
|
||||
|
||||
# OSM Maps
|
||||
|
||||
## What It Does
|
||||
|
||||
Integrates OpenStreetMap (OSM) data to provide speed limit information, road geometry, and other map attributes. This data powers features like Speed Limit Assist and Smart Cruise Control — Map.
|
||||
|
||||
## How It Works
|
||||
|
||||
1. Select your country (and state, if in the US)
|
||||
2. Download the map data to your device
|
||||
3. The map daemon processes the data and makes it available to driving features
|
||||
4. Periodically check for updates to keep your map data current
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Internet connection for initial download and updates
|
||||
- Storage space on the device for map data
|
||||
|
||||
## How to Set Up
|
||||
|
||||
**Settings** → **OSM**
|
||||
|
||||
1. Select your **Country**
|
||||
2. If in the US, select your **State**
|
||||
3. Tap **Database Update** to download
|
||||
4. Wait for the download to complete
|
||||
|
||||
## Features That Use OSM Data
|
||||
|
||||
- **[Speed Limit Assist](../cruise/speed-limit.md)** — Reads speed limits from map data
|
||||
- **[Smart Cruise Control — Map](../cruise/scc-m.md)** — Uses road geometry for proactive speed adjustment
|
||||
|
||||
## Managing Map Data
|
||||
|
||||
- **Update:** Tap "Database Update" to check for newer map data
|
||||
- **Delete:** Tap "Delete Maps" to remove downloaded data and free storage
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [OSM Settings](../../settings/osm.md) for all options and status information.
|
||||
67
docs_sp/features/connected/sunnylink.md
Normal file
67
docs_sp/features/connected/sunnylink.md
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
title: sunnylink
|
||||
---
|
||||
|
||||
# sunnylink
|
||||
|
||||
## What It Does
|
||||
|
||||
sunnylink is sunnypilot's cloud backend integration system. It connects your device to the sunnypilot cloud infrastructure, enabling settings backup and restore, sponsor benefits, remote device management, and optional driving data uploads.
|
||||
|
||||
## Key Features
|
||||
|
||||
### Settings Backup & Restore
|
||||
|
||||
Securely back up your device configuration to the cloud and restore it on the same or a different device.
|
||||
|
||||
- **Backup** compresses and encrypts all your sunnypilot settings using AES-256-CBC encryption derived from your device's unique RSA key
|
||||
- **Restore** downloads and decrypts your backup, applying only recognized sunnypilot parameters
|
||||
- Progress is displayed in real-time (0-100%) during both operations
|
||||
- Backups include all sunnypilot-specific parameters (toggles, tuning values, preferences)
|
||||
|
||||
!!! note
|
||||
Backups are device-key encrypted. A backup created on one device can only be restored to the same device or by using the same device keys.
|
||||
|
||||
### Sponsor Tiers
|
||||
|
||||
sunnylink has a sponsorship system with multiple tiers:
|
||||
|
||||
| Tier | Color |
|
||||
|------|-------|
|
||||
| Guardian | Gold |
|
||||
| Benefactor | Green |
|
||||
| Contributor | Steel Blue |
|
||||
| Supporter | Purple |
|
||||
| Free / Novice | Default |
|
||||
|
||||
Sponsor status is displayed in the sunnylink settings panel. Higher tiers may unlock additional features (such as the infrastructure uploader).
|
||||
|
||||
### GitHub Account Pairing
|
||||
|
||||
Link your GitHub account to your device for sponsor verification and identity management. The pairing status is displayed in the sunnylink settings panel as "Paired" or "Not Paired".
|
||||
|
||||
### Data Upload (Infrastructure Test)
|
||||
|
||||
When enabled, sunnylink can upload driving logs and camera data to sunnypilot's cloud infrastructure. This feature prioritizes crash and boot logs, respects metered connections (skips video on cellular), and uses signed S3 URLs for secure uploads.
|
||||
|
||||
!!! warning
|
||||
The uploader is currently an infrastructure test feature available to high-tier sponsors only. It provides no direct user benefit at this time.
|
||||
|
||||
### Remote Device Management
|
||||
|
||||
sunnylink maintains a persistent WebSocket connection to the backend, enabling:
|
||||
|
||||
- Remote parameter viewing and modification
|
||||
- Log upload control
|
||||
- Local port proxying for SSH-like access
|
||||
- Queued message processing
|
||||
|
||||
## How to Configure
|
||||
|
||||
**Settings** → **sunnylink**
|
||||
|
||||
sunnylink requires explicit user consent before activation. On first enable, a consent dialog explains what data is collected and how it is used.
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [sunnylink Settings](../../settings/sunnylink.md) for all configuration options.
|
||||
53
docs_sp/features/cruise/alpha-longitudinal.md
Normal file
53
docs_sp/features/cruise/alpha-longitudinal.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: Alpha Longitudinal
|
||||
---
|
||||
|
||||
# Alpha Longitudinal
|
||||
|
||||
## What It Does
|
||||
|
||||
Alpha Longitudinal provides experimental longitudinal (speed and acceleration) control for vehicles that are openpilot-compatible but do not have official sunnypilot longitudinal support. This enables throttle and brake control on cars that would otherwise be limited to lateral (steering) assistance only.
|
||||
|
||||
For officially supported vehicles, sunnypilot provides refined longitudinal tuning tailored to each platform. Alpha Longitudinal extends this capability to additional vehicles using a more generalized approach, allowing drivers of these cars to experience full ACC-like functionality through sunnypilot.
|
||||
|
||||
## How It Works
|
||||
|
||||
Alpha Longitudinal uses the vehicle's existing communication interfaces to send throttle and brake commands, bypassing the need for the vehicle's stock cruise control system. The system:
|
||||
|
||||
- Reads vehicle speed, pedal position, and other sensor data through the car's CAN bus
|
||||
- Calculates desired acceleration based on the driving model's output
|
||||
- Sends throttle and brake commands directly to the vehicle's powertrain controllers
|
||||
- Sets `pcmCruise=False`, meaning sunnypilot takes full control of longitudinal behavior instead of relying on the vehicle's built-in cruise control module
|
||||
|
||||
Because this operates outside the vehicle manufacturer's intended cruise control pathway, the tuning is less refined than on officially supported platforms.
|
||||
|
||||
!!! danger "AEB Is Disabled"
|
||||
Enabling Alpha Longitudinal **disables your vehicle's Automatic Emergency Braking (AEB)**. This is a significant safety trade-off. Without AEB, the vehicle will not automatically apply emergency braking in imminent collision scenarios. Drive with extra caution and maintain safe following distances at all times.
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Vehicle must be openpilot-compatible (listed on the [comma.ai vehicle compatibility list](https://comma.ai/vehicles))
|
||||
- Vehicle does not have official sunnypilot longitudinal support
|
||||
- Vehicle must report `CP.alphaLongitudinalAvailable = True` — availability is determined per vehicle in the car interface code
|
||||
- Feature is experimental and under active development
|
||||
|
||||
!!! warning "Development Branches Only"
|
||||
Alpha Longitudinal is flagged as `DEVELOPMENT_ONLY`. It is **only available on development and staging branches**, not on release branches. This is intentional — the feature is not considered stable enough for general release.
|
||||
|
||||
!!! warning "Mutually Exclusive with ICBM"
|
||||
Alpha Longitudinal and [ICBM](icbm.md) cannot be active at the same time. Enabling Alpha Longitudinal disables ICBM, and vice versa. Alpha Longitudinal provides direct throttle/brake control, while ICBM works through the stock cruise control system — these two approaches are fundamentally incompatible.
|
||||
|
||||
!!! warning "Alpha Quality Software"
|
||||
This feature is **alpha quality**. Expect rough edges, less smooth acceleration and braking behavior, and less refined stop-and-go performance compared to officially supported vehicles. Longitudinal behavior may vary significantly between vehicle models and driving conditions.
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Developer** → **sunnypilot Longitudinal Control (Alpha)**
|
||||
|
||||
!!! note
|
||||
This toggle only appears on development branches and only for vehicles where `alphaLongitudinalAvailable` is `True`.
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Cruise Control Settings](../../settings/cruise/index.md) for configuration details.
|
||||
28
docs_sp/features/cruise/custom-acc-increments.md
Normal file
28
docs_sp/features/cruise/custom-acc-increments.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: Custom ACC Increments
|
||||
---
|
||||
|
||||
# Custom ACC Increments
|
||||
|
||||
## What It Does
|
||||
|
||||
Customize the speed increments when you press the cruise control buttons. Instead of the default step sizes, set your own preferred values for both short and long button presses.
|
||||
|
||||
## How It Works
|
||||
|
||||
- **Short press:** Changes speed by your configured short press increment (1–10 km/h or mph)
|
||||
- **Long press:** Changes speed by your configured long press increment (1, 5, or 10 km/h or mph)
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Longitudinal control must be available, **or** [ICBM](icbm.md) must be enabled
|
||||
- PCM Cruise must not be active (factory cruise control must not override)
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Cruise** → **Custom ACC Increments**
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Cruise Control Settings](../../settings/cruise/index.md) for all increment options.
|
||||
61
docs_sp/features/cruise/dynamic-experimental-control.md
Normal file
61
docs_sp/features/cruise/dynamic-experimental-control.md
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
title: Dynamic Experimental Control
|
||||
---
|
||||
|
||||
# Dynamic Experimental Control (DEC)
|
||||
|
||||
## What It Does
|
||||
|
||||
DEC automatically switches between openpilot's two longitudinal modes based on real-time road conditions. Instead of manually toggling between modes, the system dynamically selects the most appropriate mode for the current situation.
|
||||
|
||||
To understand DEC, it helps to know the two driving modes it switches between:
|
||||
|
||||
| Mode | Internal Name | Description |
|
||||
|------|---------------|-------------|
|
||||
| **Chill / Standard** | `acc` | The default openpilot driving mode. Follows the lead car and stays in lane at a steady speed. Best suited for highway and open-road driving where stops and complex maneuvers are rare. |
|
||||
| **Experimental** | `blended` | An enhanced mode that uses the end-to-end (E2E) driving model. Can handle stops at traffic lights and stop signs, navigate turns, and respond to more complex urban scenarios. Designed for city driving. |
|
||||
|
||||
!!! note "DEC is a switcher, not a mode"
|
||||
DEC is not a third driving mode — it is a dynamic switcher that automatically selects between `acc` (Chill/Standard) and `blended` (Experimental) in real time based on road conditions.
|
||||
|
||||
## How It Works
|
||||
|
||||
DEC uses a confidence-based switching system with specific probability thresholds and hysteresis to prevent rapid mode toggling:
|
||||
|
||||
### Detection Signals
|
||||
|
||||
| Signal | Threshold | Effect |
|
||||
|--------|-----------|--------|
|
||||
| **Lead vehicle probability** | ≥ 0.45 | Favors `acc` mode (standard following) |
|
||||
| **Slow-down probability** | ≥ 0.3 | Favors `blended` mode (E2E for stops/turns) |
|
||||
| **Stop sign / traffic light** | Detected by vision model | Triggers switch to `blended` mode |
|
||||
| **Turn detection** | Upcoming turns | Triggers switch to `blended` mode |
|
||||
| **Current speed** | Speed-dependent | Lower speeds favor `blended` mode |
|
||||
|
||||
### Switching Logic
|
||||
|
||||
- DEC uses **Kalman filters** to smooth probability signals and reduce noise
|
||||
- A **minimum hold time of 10 frames** prevents rapid oscillation between modes
|
||||
- A **confidence threshold of 0.6** must be met before switching to a new mode
|
||||
- The system continuously evaluates conditions and transitions seamlessly without driver input
|
||||
|
||||
Based on these signals, DEC switches between:
|
||||
|
||||
| Mode | When DEC Activates It |
|
||||
|------|----------|
|
||||
| **Chill / Standard** (`acc`) | Highway driving with steady speeds, lead vehicle following, clear lanes, and no upcoming stops or complex intersections |
|
||||
| **Experimental** (`blended`) | City driving with stops, turns, traffic lights, and complex intersections where the vehicle needs to slow down or stop |
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Longitudinal control must be available
|
||||
- Device must be offroad to enable/disable
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Cruise** → **Dynamic Experimental Control**
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Cruise Control Settings](../../settings/cruise/index.md) for configuration details.
|
||||
77
docs_sp/features/cruise/icbm.md
Normal file
77
docs_sp/features/cruise/icbm.md
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
title: Intelligent Cruise Button Management
|
||||
---
|
||||
|
||||
# Intelligent Cruise Button Management (ICBM)
|
||||
|
||||
## What It Does
|
||||
|
||||
ICBM allows sunnypilot to intercept and dynamically manage your vehicle's cruise control button presses. Instead of directly changing the set speed, button presses are routed through sunnypilot's logic, enabling features like Speed Limit Assist and Smart Cruise Control on vehicles that don't natively support sunnypilot longitudinal control.
|
||||
|
||||
This is particularly useful for vehicles where sunnypilot cannot directly control the gas and brakes — ICBM gives you many of the same benefits by intelligently managing the cruise buttons.
|
||||
|
||||
## When to Use
|
||||
|
||||
ICBM is designed specifically for vehicles where sunnypilot cannot directly control the throttle and brakes (i.e., no native longitudinal control). On these vehicles, the stock cruise control system still handles all actual acceleration and deceleration. ICBM bridges the gap by intelligently managing cruise button commands so you can still benefit from sunnypilot's speed planning features.
|
||||
|
||||
## How It Works
|
||||
|
||||
1. You press the cruise speed button on your steering wheel
|
||||
2. ICBM intercepts the button press
|
||||
3. sunnypilot applies its logic (speed limits, map curves, etc.) to determine the appropriate speed change
|
||||
4. ICBM simulates the corresponding cruise button presses over the CAN bus, sending the adjusted command to the vehicle's stock cruise control system
|
||||
|
||||
This happens transparently — from your perspective, the buttons work normally but with smarter behavior. Under the hood, ICBM is communicating with the vehicle's cruise control module by simulating physical button presses on the CAN bus, which is why it works even on vehicles without direct throttle/brake control.
|
||||
|
||||
### State Machine
|
||||
|
||||
ICBM operates through a 5-state machine:
|
||||
|
||||
| State | Description |
|
||||
|-------|-------------|
|
||||
| **Inactive** | ICBM is idle — no button simulation is in progress |
|
||||
| **Pre-Active** | A speed change has been requested; ICBM is preparing to simulate button presses |
|
||||
| **Increasing** | ICBM is sending "speed up" button presses to reach the target speed |
|
||||
| **Decreasing** | ICBM is sending "speed down" button presses to reach the target speed |
|
||||
| **Holding** | Target speed has been reached; ICBM is holding the current setting |
|
||||
|
||||
!!! tip "Safety"
|
||||
ICBM preserves all of your vehicle's stock safety systems. Forward Collision Avoidance (FCA), Automatic Emergency Braking (AEB), and other factory safety features remain fully active and unaffected, since the vehicle's own cruise control system is still performing the actual speed control. ICBM operates purely at the CAN bus button simulation level and does not interact with FCA or AEB message pathways.
|
||||
|
||||
## Supported Vehicles
|
||||
|
||||
ICBM support varies by vehicle brand. The feature toggle only appears in settings if your vehicle is supported.
|
||||
|
||||
| Brand | Notes |
|
||||
|-------|-------|
|
||||
| **Hyundai / Kia / Genesis** | Supported on most models with stock cruise control |
|
||||
| **Honda / Acura** | Supported on compatible models |
|
||||
| **Chrysler / Dodge / Jeep / RAM** | Supported on compatible models |
|
||||
| **Mazda** | Supported on compatible models |
|
||||
|
||||
!!! info "Not Listed?"
|
||||
If your brand or model is not listed above and the ICBM toggle does not appear in your settings, your vehicle is not currently supported. Support depends on the vehicle's CAN bus protocol and button command structure.
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Your vehicle must support ICBM — not all vehicles are compatible
|
||||
- If the ICBM toggle does not appear in settings, your vehicle is not supported
|
||||
- **Mutually exclusive with [Alpha Longitudinal](alpha-longitudinal.md)** — only one can be active at a time
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Cruise** → **Intelligent Cruise Button Management**
|
||||
|
||||
## Features Unlocked by ICBM
|
||||
|
||||
When ICBM is enabled, the following features become available even on vehicles without native longitudinal control:
|
||||
|
||||
- **[Smart Cruise Control — Vision](scc-v.md)** — Vision-based adaptive speed adjustments
|
||||
- **[Smart Cruise Control — Map](scc-m.md)** — Map-aware speed adjustments
|
||||
- **[Custom ACC Increments](custom-acc-increments.md)** — Custom button press speed steps
|
||||
- **[Speed Limit Assist](speed-limit.md)** — Automatic speed limit matching
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Cruise Control Settings](../../settings/cruise/index.md) for all available options.
|
||||
15
docs_sp/features/cruise/index.md
Normal file
15
docs_sp/features/cruise/index.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Cruise Control
|
||||
---
|
||||
|
||||
# Cruise Control
|
||||
|
||||
Enhancements to adaptive cruise control that give you finer control over speed management, turn handling, and speed limit compliance.
|
||||
|
||||
- [Intelligent Cruise Button Management](icbm.md) - intercepts steering wheel button presses for smarter speed adjustments
|
||||
- [Smart Cruise Control - Vision](scc-v.md) - uses vision predictions to slow for curves
|
||||
- [Smart Cruise Control - Map](scc-m.md) - uses map data to anticipate speed changes
|
||||
- [Custom ACC Increments](custom-acc-increments.md) - set custom speed change amounts for short and long button presses
|
||||
- [Dynamic Experimental Control](dynamic-experimental-control.md) - automatically switches between driving modes based on conditions
|
||||
- [Speed Limit Assist](speed-limit.md) - adjusts cruise speed to match posted limits
|
||||
- [Alpha Longitudinal](alpha-longitudinal.md) - experimental longitudinal control for select vehicles
|
||||
30
docs_sp/features/cruise/scc-m.md
Normal file
30
docs_sp/features/cruise/scc-m.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: Smart Cruise Control - Map
|
||||
---
|
||||
|
||||
# Smart Cruise Control — Map (SCC-M)
|
||||
|
||||
## What It Does
|
||||
|
||||
SCC-M uses downloaded OpenStreetMap data to anticipate road changes — curves, speed limits, and intersections — and adjusts cruise speed proactively through [ICBM](icbm.md).
|
||||
|
||||
## How It Works
|
||||
|
||||
1. OSM map data provides information about upcoming road geometry
|
||||
2. SCC-M calculates appropriate speeds for curves, speed zones, and intersections
|
||||
3. Speed commands are sent through ICBM to adjust cruise before reaching these road features
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- [ICBM](icbm.md) must be enabled
|
||||
- Vehicle must support ICBM
|
||||
- [OSM Maps](../connected/osm-maps.md) must be configured and downloaded
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Cruise** → **Smart Cruise Control — Map**
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Cruise Control Settings](../../settings/cruise/index.md) for configuration details.
|
||||
28
docs_sp/features/cruise/scc-v.md
Normal file
28
docs_sp/features/cruise/scc-v.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: Smart Cruise Control - Vision
|
||||
---
|
||||
|
||||
# Smart Cruise Control — Vision (SCC-V)
|
||||
|
||||
## What It Does
|
||||
|
||||
SCC-V uses the device's camera to detect lead vehicles and make smarter cruise control decisions. It provides vision-based adaptive speed adjustments for vehicles that rely on ICBM for cruise management.
|
||||
|
||||
## How It Works
|
||||
|
||||
The camera continuously monitors the road ahead. When a lead vehicle is detected, SCC-V adjusts cruise speed commands through [ICBM](icbm.md) to maintain safe following distances and react to speed changes of the vehicle ahead.
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- [ICBM](icbm.md) must be enabled
|
||||
- Vehicle must support ICBM
|
||||
- Camera must have a clear view of the road ahead
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Cruise** → **Smart Cruise Control — Vision**
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Cruise Control Settings](../../settings/cruise/index.md) for configuration details.
|
||||
90
docs_sp/features/cruise/speed-limit.md
Normal file
90
docs_sp/features/cruise/speed-limit.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
title: Speed Limit Assist
|
||||
---
|
||||
|
||||
# Speed Limit Assist
|
||||
|
||||
## What It Does
|
||||
|
||||
Speed Limit Assist detects the current speed limit and can automatically adjust your cruise speed to match. It offers four operating modes ranging from passive information display to active speed management.
|
||||
|
||||
## How It Works
|
||||
|
||||
1. sunnypilot reads speed limit data from two sources (see below)
|
||||
2. A configurable **Speed Limit Policy** determines how the sources are combined when both are available
|
||||
3. Based on your chosen mode, the system displays, warns, or actively adjusts your set speed
|
||||
4. An optional offset (fixed or percentage) lets you cruise slightly above or below the limit
|
||||
|
||||
## Speed Limit Sources
|
||||
|
||||
Speed Limit Assist pulls speed limit data from **two sources**:
|
||||
|
||||
| Source | Description |
|
||||
|--------|-------------|
|
||||
| **Car State** | Speed limit information provided by the vehicle's built-in sensors (e.g., Traffic Sign Recognition cameras). Availability depends on the vehicle. |
|
||||
| **Map Data** | Speed limits from downloaded OpenStreetMap data. Requires [OSM Maps](../connected/osm-maps.md) to be configured and downloaded. |
|
||||
|
||||
### Speed Limit Policy
|
||||
|
||||
When both sources are available and report different values, the **Speed Limit Policy** setting determines which source is used:
|
||||
|
||||
| Policy | Behavior |
|
||||
|--------|----------|
|
||||
| **Car State Only** | Uses only the vehicle's built-in speed limit data; ignores map data |
|
||||
| **Map Data Only** | Uses only OSM map speed limit data; ignores car state |
|
||||
| **Car State Priority** | Uses car state data when available; falls back to map data |
|
||||
| **Map Data Priority** | Uses map data when available; falls back to car state |
|
||||
| **Combined** | Uses the highest-confidence value from either source |
|
||||
|
||||
## Operating Modes
|
||||
|
||||
| Mode | Behavior |
|
||||
|------|----------|
|
||||
| **Off** | Speed limit data is not used |
|
||||
| **Information** | Shows the current speed limit on the driving display |
|
||||
| **Warning** | Shows the speed limit and alerts you when you're exceeding it |
|
||||
| **Assist** | Automatically adjusts cruise speed to match the speed limit |
|
||||
|
||||
## Speed Offset
|
||||
|
||||
You can set an offset so your cruise speed differs from the exact limit:
|
||||
|
||||
- **Fixed offset:** Add or subtract a set number of km/h or mph (range: -30 to +30)
|
||||
- **Percentage offset:** Apply a percentage above or below the limit
|
||||
|
||||
## Confirmation Modes
|
||||
|
||||
When the detected speed limit changes, you can choose how the system responds:
|
||||
|
||||
| Mode | Behavior |
|
||||
|------|----------|
|
||||
| **Auto** | The cruise set speed adjusts automatically when a new speed limit is detected — no driver input required |
|
||||
| **User Confirm** | The system displays the new speed limit and waits for the driver to confirm before adjusting the set speed |
|
||||
|
||||
## Driver Notifications
|
||||
|
||||
Speed Limit Assist provides visual indicators on the driving HUD:
|
||||
|
||||
- The currently detected speed limit is shown on the display
|
||||
- When a speed limit change is detected, a notification appears showing the new limit
|
||||
- In Warning and Assist modes, alerts notify you when you are exceeding the posted limit
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Longitudinal control must be available, **or** [ICBM](icbm.md) must be enabled
|
||||
- For map-based limits: [OSM Maps](../connected/osm-maps.md) must be configured and downloaded
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Cruise** → **Speed Limit Assist**
|
||||
|
||||
## Vehicle Restrictions
|
||||
|
||||
!!! warning "Vehicle Restrictions"
|
||||
- **Tesla:** Assist mode is disabled on release branches (Information and Warning still work)
|
||||
- **Rivian:** Assist mode is always disabled
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Speed Limit Settings](../../settings/cruise/speed-limit/index.md) for all configuration options.
|
||||
34
docs_sp/features/display/hud-visuals.md
Normal file
34
docs_sp/features/display/hud-visuals.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: HUD & Visuals
|
||||
---
|
||||
|
||||
# HUD & Visuals
|
||||
|
||||
## What It Does
|
||||
|
||||
Customize the heads-up display (HUD) elements and visual overlays shown on the driving screen. Toggle individual elements on or off to create your preferred driving view.
|
||||
|
||||
## Available HUD Elements
|
||||
|
||||
| Element | Description |
|
||||
|---------|-------------|
|
||||
| **Blind Spot Indicator** | Visual warning when a vehicle is in your blind spot |
|
||||
| **Torque Bar** | Shows current steering torque |
|
||||
| **Standstill Timer** | Shows how long you've been stopped |
|
||||
| **Road Name** | Displays the current road name |
|
||||
| **Green Light Alert** | Alerts when a traffic light turns green |
|
||||
| **Lead Depart Alert** | Alerts when the car ahead starts moving |
|
||||
| **True Vehicle Speed** | CAN bus speed (may differ from GPS) |
|
||||
| **Turn Signals** | Shows turn signal status on the HUD |
|
||||
| **Rocket Fuel** | Real-time acceleration/deceleration bar on the left side of the screen |
|
||||
| **Rainbow Mode** | Animated rainbow-gradient overlay on the model driving path |
|
||||
| **Chevron Info** | Distance, speed, or time gap to lead vehicle |
|
||||
| **Developer UI** | Debug information for diagnostics |
|
||||
|
||||
## How to Configure
|
||||
|
||||
**Settings** → **Visuals**
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Visuals Settings](../../settings/visuals.md) for all toggle options and multi-button selectors.
|
||||
10
docs_sp/features/display/index.md
Normal file
10
docs_sp/features/display/index.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: Display & Visuals
|
||||
---
|
||||
|
||||
# Display & Visuals
|
||||
|
||||
Customizations for the onroad driving screen, HUD overlays, and visual indicators.
|
||||
|
||||
- [Onroad Display](onroad-display.md) - screen brightness, timeout, and layout controls
|
||||
- [HUD & Visuals](hud-visuals.md) - toggles for visual indicators like blind spot warnings, road names, and traffic light alerts
|
||||
23
docs_sp/features/display/onroad-display.md
Normal file
23
docs_sp/features/display/onroad-display.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: Onroad Display
|
||||
---
|
||||
|
||||
# Onroad Display
|
||||
|
||||
## What It Does
|
||||
|
||||
Control the screen brightness, timeout behavior, and touch interactivity while driving. These settings help reduce distraction and manage power consumption.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Screen brightness control** — Choose from Auto, Auto Dark, Screen Off, or a fixed percentage (5%–100%)
|
||||
- **Brightness delay** — Set how long the screen stays bright before dimming
|
||||
- **Interactivity timeout** — Make the screen non-interactive after a set period to prevent accidental touches
|
||||
|
||||
## How to Configure
|
||||
|
||||
**Settings** → **Display**
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Display Settings](../../settings/display.md) for all configuration options.
|
||||
27
docs_sp/features/index.md
Normal file
27
docs_sp/features/index.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Features
|
||||
---
|
||||
|
||||
# Features
|
||||
|
||||
sunnypilot extends openpilot with a comprehensive set of driving assist features organized into the following categories.
|
||||
|
||||
## Cruise Control
|
||||
|
||||
Adaptive cruise control enhancements including intelligent button management, vision and map-based smart cruise, custom ACC increments, dynamic experimental control, speed limit assist, and alpha longitudinal control.
|
||||
|
||||
## Steering
|
||||
|
||||
Lateral control features including the Modular Assistive Driving System (MADS), neural network lateral control (NNLC), automatic lane changes, torque-based steering control, and blinker pause lateral for temporarily pausing steering during turn signal activation.
|
||||
|
||||
## Display & Visuals
|
||||
|
||||
Onroad display customizations and HUD visual enhancements for real-time driving information.
|
||||
|
||||
## Models & AI
|
||||
|
||||
Driving model selection and AI-related configuration options.
|
||||
|
||||
## Connected Services
|
||||
|
||||
Cloud and map integrations including sunnylink (settings backup/restore, sponsor tiers, GitHub account pairing, remote device management) and OpenStreetMap (speed limit data and map-based features).
|
||||
30
docs_sp/features/models.md
Normal file
30
docs_sp/features/models.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: Models & AI
|
||||
---
|
||||
|
||||
# Models & AI
|
||||
|
||||
## What It Does
|
||||
|
||||
Select and configure the driving model used by sunnypilot. Different models offer different driving characteristics — some may be smoother, others more responsive. Advanced parameters let you fine-tune model behavior.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Model Selection** — Choose from available driving models (offroad only)
|
||||
- **Lane Turn Desire** — Enhance lane positioning during turns
|
||||
- **LAGD (Live Lateral Delay Compensation)** — Dynamically measures and compensates for steering actuator delay using real-time signal correlation
|
||||
|
||||
## Advanced Parameters
|
||||
|
||||
Advanced parameters are only visible when **Show Advanced Controls** is enabled in [Developer Settings](../settings/developer.md):
|
||||
|
||||
- **Lane Turn Value** — Intensity of lane turn desire (500–2000)
|
||||
- **LAGD Delay** — Fixed steering delay offset in milliseconds when LAGD is disabled (5–50)
|
||||
|
||||
## How to Configure
|
||||
|
||||
**Settings** → **Models**
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Models Settings](../settings/models.md) for all configuration options.
|
||||
59
docs_sp/features/steering/auto-lane-change.md
Normal file
59
docs_sp/features/steering/auto-lane-change.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
title: Auto Lane Change
|
||||
---
|
||||
|
||||
# Auto Lane Change
|
||||
|
||||
## What It Does
|
||||
|
||||
Automatically executes lane changes when you activate the turn signal. You can choose between nudge-based confirmation, nudgeless (immediate), or timed delays before the lane change begins.
|
||||
|
||||
## How It Works
|
||||
|
||||
1. Activate your turn signal in the desired direction
|
||||
2. The system verifies that clear lane markings are detected by the vision system in the target lane — a lane change will not execute without visible lane lines
|
||||
3. The driver monitoring system checks that the driver is attentive before proceeding
|
||||
4. Depending on your setting:
|
||||
- **Nudge:** Give a light steering nudge to confirm the lane change
|
||||
- **Nudgeless:** The lane change begins immediately
|
||||
- **Timed (0.5s–3s):** The lane change begins after the configured delay
|
||||
5. If BSM Delay is enabled and a vehicle is detected in your blind spot, the lane change is delayed by an additional 1 second beyond the configured timer
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Lateral control must be active (sunnypilot must be engaged)
|
||||
- Vehicle must be traveling above a minimum speed threshold
|
||||
- Clear lane markings must be visible to the vision system
|
||||
- Driver must be attentive (monitored by the driver monitoring system)
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Steering** → **Customize Lane Change**
|
||||
|
||||
## Modes
|
||||
|
||||
| Mode | Value | Behavior |
|
||||
|------|-------|----------|
|
||||
| **Off** | -1 | Auto lane change is disabled |
|
||||
| **Nudge** | 0 | Requires a light steering nudge to confirm the lane change |
|
||||
| **Nudgeless** | 1 | Lane change begins as soon as you signal |
|
||||
| **0.5 second** | 2 | Lane change begins after 0.5s delay |
|
||||
| **1 second** | 3 | Lane change begins after 1s delay |
|
||||
| **2 seconds** | 4 | Lane change begins after 2s delay |
|
||||
| **3 seconds** | 5 | Lane change begins after 3s delay |
|
||||
|
||||
## Blind Spot Monitoring Integration
|
||||
|
||||
If your vehicle supports BSM and the BSM Delay option is enabled, the system checks for vehicles in your blind spot before executing the lane change. When a vehicle is detected in the blind spot, the lane change is delayed by an additional **1 second** on top of the configured timer until the adjacent lane is clear.
|
||||
|
||||
!!! info "BSM Requirements"
|
||||
- Vehicle must support Blind Spot Monitoring
|
||||
- Auto Lane Change Timer must be set beyond Nudge mode
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Lane Change Settings](../../settings/steering/lane-change.md) for all options.
|
||||
|
||||
!!! warning "Safety"
|
||||
Always check your mirrors and blind spots before initiating a lane change. The system assists but does not replace driver awareness.
|
||||
36
docs_sp/features/steering/blinker-pause.md
Normal file
36
docs_sp/features/steering/blinker-pause.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: Blinker Pause Lateral Control
|
||||
---
|
||||
|
||||
# Blinker Pause Lateral Control
|
||||
|
||||
## What It Does
|
||||
|
||||
Temporarily pauses lateral (steering) control when you activate a turn signal. This gives you full manual steering control during the blinker activation, useful for situations where you want to make a manual lane adjustment or turn without the system fighting your steering input.
|
||||
|
||||
## How It Works
|
||||
|
||||
1. You activate a turn signal (left or right blinker)
|
||||
2. If your speed is **below** the configured speed threshold, sunnypilot pauses lateral control
|
||||
3. Lateral control stays paused while the blinker is active
|
||||
4. After the blinker is deactivated, lateral control re-engages after the configured delay
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### Speed Threshold
|
||||
|
||||
The maximum speed at which Blinker Pause activates. Above this speed, lateral control remains active even with the blinker on (this allows Auto Lane Change to work at highway speeds).
|
||||
|
||||
### Re-Engage Delay
|
||||
|
||||
How long after the blinker is deactivated before lateral control re-engages. A short delay prevents abrupt steering corrections immediately after turning off the signal.
|
||||
|
||||
## How to Configure
|
||||
|
||||
**Settings** → **Steering**
|
||||
|
||||
Look for the Blinker Pause Lateral Control toggle and its sub-settings.
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Steering Settings](../../settings/steering/index.md) for all configuration options.
|
||||
13
docs_sp/features/steering/index.md
Normal file
13
docs_sp/features/steering/index.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: Steering
|
||||
---
|
||||
|
||||
# Steering
|
||||
|
||||
Lateral control features that govern how sunnypilot handles steering assistance, lane changes, and manual override behavior.
|
||||
|
||||
- [Modular Assistive Driving System (MADS)](mads.md) - decouples steering from cruise control for independent lateral assist
|
||||
- [Neural Network Lateral Control (NNLC)](nnlc.md) - uses a neural network for smoother steering
|
||||
- [Auto Lane Change](auto-lane-change.md) - automated lane changes triggered by the turn signal
|
||||
- [Torque Control](torque-control.md) - torque-based steering with tunable parameters
|
||||
- [Blinker Pause Lateral](blinker-pause.md) - temporarily pauses steering assist when the turn signal is active
|
||||
86
docs_sp/features/steering/mads.md
Normal file
86
docs_sp/features/steering/mads.md
Normal file
@@ -0,0 +1,86 @@
|
||||
---
|
||||
title: Modular Assistive Driving System
|
||||
---
|
||||
|
||||
# Modular Assistive Driving System (MADS)
|
||||
|
||||
## What It Does
|
||||
|
||||
MADS decouples lateral (steering) and longitudinal (speed) controls. In standard openpilot, engaging cruise control activates both steering and speed control together, and disengaging turns both off. With MADS, steering assistance can remain active independently — even when cruise control is off.
|
||||
|
||||
This means you can have lane-keeping assistance while controlling the gas and brakes yourself.
|
||||
|
||||
## How It Works
|
||||
|
||||
With MADS enabled, Automatic Lane Centering (ALC) and Adaptive Cruise Control (ACC) can be engaged and disengaged independently. This is the core difference from standard openpilot, where both are always linked together.
|
||||
|
||||
- **Steering stays active** even when you cancel cruise control — ALC continues to provide lane centering while you control speed manually
|
||||
- **Independent engagement** — you can activate ALC without ACC, or both together, giving you flexible control over which assists are active
|
||||
- You choose what happens to steering when cruise disengages (remain active, pause, or fully disengage)
|
||||
- You can configure whether the main cruise button also activates steering
|
||||
|
||||
### Engagement States
|
||||
|
||||
MADS has five internal states:
|
||||
|
||||
| State | Description |
|
||||
|-------|-------------|
|
||||
| **Disabled** | MADS is off — no steering assistance is provided |
|
||||
| **Enabled** | Steering assistance is fully engaged and actively providing lane centering |
|
||||
| **Paused** | Steering assistance is temporarily paused (e.g., due to braking, depending on your Steering Mode on Brake setting) but can resume without re-engaging |
|
||||
| **Soft Disabling** | The system is transitioning from enabled to disabled due to a safety condition (e.g., driver inattention alert escalation) |
|
||||
| **Overriding** | The driver is actively steering, temporarily overriding the system's lateral input. Steering assistance resumes when the driver releases the wheel |
|
||||
|
||||
### Steering Mode on Brake
|
||||
|
||||
This setting controls what happens to steering assistance when the brake pedal is pressed:
|
||||
|
||||
| Option | Value | Behavior |
|
||||
|--------|-------|----------|
|
||||
| **Remain Active** | 0 | Steering stays fully active while braking |
|
||||
| **Pause** | 1 | Steering pauses while braking, resumes on release |
|
||||
| **Disengage** | 2 | Steering fully disengages on brake — must re-engage manually |
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Supported on most vehicles with sunnypilot lateral control
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Steering** → enable **MADS**
|
||||
|
||||
Then configure the sub-settings in **MADS Settings**.
|
||||
|
||||
## Key Settings
|
||||
|
||||
| Setting | What It Controls |
|
||||
|---------|-----------------|
|
||||
| **Main Cruise Allowed** | Whether the cruise on/off button can activate MADS |
|
||||
| **Unified Engagement Mode** | Whether engaging cruise also engages MADS automatically |
|
||||
| **Steering Mode on Brake** | What happens to steering when the brake is pressed (Remain Active / Pause / Disengage) |
|
||||
| **Steering Mode on Disengage** | What happens to steering when cruise disengages |
|
||||
|
||||
## Vehicle-Specific Behavior
|
||||
|
||||
Some vehicles operate in **limited MADS mode** where certain settings are locked due to platform constraints (e.g., no vehicle bus access):
|
||||
|
||||
=== "Tesla (without vehicle bus)"
|
||||
- Main Cruise Allowed: forced OFF
|
||||
- Unified Engagement Mode: forced ON
|
||||
- Steering Mode on Brake: forced to **Disengage**
|
||||
|
||||
=== "Rivian"
|
||||
- Main Cruise Allowed: forced OFF
|
||||
- Unified Engagement Mode: forced ON
|
||||
- Steering Mode on Brake: forced to **Disengage**
|
||||
|
||||
!!! note "Why these restrictions?"
|
||||
Vehicles without a full vehicle bus connection (like Tesla without the vehicle bus harness and Rivian) cannot reliably detect certain driver inputs. To maintain safety, MADS defaults to the most conservative behavior on these platforms.
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [MADS Settings](../../settings/steering/mads.md) for all configuration options.
|
||||
|
||||
!!! warning "Safety"
|
||||
Always be ready to take full manual control. MADS allows more flexible use of driver assistance, but you remain responsible for safe driving at all times.
|
||||
58
docs_sp/features/steering/nnlc.md
Normal file
58
docs_sp/features/steering/nnlc.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: Neural Network Lateral Control
|
||||
---
|
||||
|
||||
# Neural Network Lateral Control (NNLC)
|
||||
|
||||
## What It Does
|
||||
|
||||
NNLC replaces the traditional PID or torque-based steering controller with a neural network trained on real driving data. This can provide smoother, more natural-feeling lane keeping that adapts to your vehicle's steering characteristics.
|
||||
|
||||
## How It Works
|
||||
|
||||
Instead of using fixed mathematical formulas (PID controller), NNLC uses a machine learning model to calculate steering commands. The neural network has been trained on real-world driving data and can handle a wider variety of driving scenarios with smoother output.
|
||||
|
||||
!!! note "Evolution from NNFF"
|
||||
NNLC evolved from **Neural Network FeedForward (NNFF)**, an earlier approach that used a neural network as a feedforward component alongside traditional controllers. NNLC builds on this foundation by giving the neural network full lateral control authority, resulting in improved steering smoothness and adaptability.
|
||||
|
||||
!!! info "Vehicle-Specific Training Data"
|
||||
The neural network models are trained on real driving data collected from specific vehicles. Because each vehicle has unique steering characteristics, a dedicated model must be trained for each supported make/model. Over **70 vehicle models** currently have trained NNLC models available. If no model exists for your vehicle, the NNLC toggle will not appear in settings.
|
||||
|
||||
### Model Matching
|
||||
|
||||
When NNLC is enabled, the system matches your vehicle to the best available model using a 3-tier fallback:
|
||||
|
||||
| Tier | Match Criteria | Confidence | Description |
|
||||
|------|---------------|------------|-------------|
|
||||
| **1. Exact** | Fingerprint + firmware version | ≥ 0.99 | Best match — a model trained on your exact vehicle and firmware combination |
|
||||
| **2. Valid** | Fingerprint only | ≥ 0.9 | Good match — a model trained on your vehicle platform, regardless of firmware version |
|
||||
| **3. Substitute** | Substitute table lookup | Fallback | A model from a similar vehicle platform is used as a substitute (configured in `substitute.toml`) |
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Vehicle must not use angle-based steering (`steerControlType` must not be `angle`)
|
||||
- A trained NNLC model must be available for your specific vehicle
|
||||
- Mutually exclusive with [Torque Control](torque-control.md) — only one can be active at a time
|
||||
- Device must be offroad to enable/disable
|
||||
|
||||
## How to Enable
|
||||
|
||||
**Settings** → **Steering** → **Neural Network Lateral Control**
|
||||
|
||||
!!! tip
|
||||
Not all vehicles have NNLC models available. If the toggle does not appear, your vehicle may use angle-based steering which is not compatible with NNLC, or a trained model may not yet exist for your vehicle.
|
||||
|
||||
## NNLC vs. Torque Control
|
||||
|
||||
| Feature | NNLC | Torque Control |
|
||||
|---------|------|---------------|
|
||||
| **Approach** | Neural network (learned) | Mathematical formula (tuned) |
|
||||
| **Customization** | Automatic | Manual tuning available |
|
||||
| **Best for** | Smooth, adaptive steering | Precise, configurable steering |
|
||||
|
||||
These two features are mutually exclusive — enabling one automatically disables the other.
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Steering Settings](../../settings/steering/index.md) for configuration details.
|
||||
48
docs_sp/features/steering/torque-control.md
Normal file
48
docs_sp/features/steering/torque-control.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Torque Control
|
||||
---
|
||||
|
||||
# Torque Control
|
||||
|
||||
## What It Does
|
||||
|
||||
Torque Control lets you fine-tune how aggressively or gently sunnypilot steers your vehicle. It provides advanced parameters for lateral acceleration, friction compensation, and self-tuning options.
|
||||
|
||||
## How It Works
|
||||
|
||||
Torque-based lateral control applies steering commands as torque (rotational force) to the steering motor. The key parameters are:
|
||||
|
||||
- **Lateral Acceleration Factor** — How strongly the system turns the wheel (higher = more aggressive)
|
||||
- **Friction** — How much the system compensates for steering resistance
|
||||
- **Self-Tune** — Automatically adjusts these values based on your driving
|
||||
|
||||
## Requirements
|
||||
|
||||
!!! info "Requirements"
|
||||
- Vehicle must not use angle-based steering
|
||||
- **Enforce Torque Control** must be enabled in [Steering Settings](../../settings/steering/index.md)
|
||||
- Mutually exclusive with [NNLC](nnlc.md) — only one can be active at a time
|
||||
- Device must be offroad to change settings
|
||||
|
||||
## How to Enable
|
||||
|
||||
1. Go to **Settings** → **Steering**
|
||||
2. Enable **Enforce Torque Control**
|
||||
3. Open the **Torque Settings** sub-panel to fine-tune
|
||||
|
||||
## Tuning Options
|
||||
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
| **Self-Tune** | Automatic real-time parameter adjustment |
|
||||
| **Relaxed Self-Tune** | Less aggressive auto-tuning for smoother feel |
|
||||
| **Custom Tune** | Manual parameter override |
|
||||
| **Lat Accel Factor** | 0.01–5.00 (steering aggressiveness) |
|
||||
| **Friction** | 0.01–1.00 (friction compensation) |
|
||||
|
||||
!!! tip
|
||||
Start with Self-Tune enabled. Only switch to Custom Tune if you want precise control over steering feel and are willing to experiment.
|
||||
|
||||
## Settings Reference
|
||||
|
||||
See [Torque Settings](../../settings/steering/torque.md) for all tuning parameters.
|
||||
10
docs_sp/getting-started/index.md
Normal file
10
docs_sp/getting-started/index.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: Getting Started
|
||||
---
|
||||
|
||||
# Getting Started
|
||||
|
||||
New to sunnypilot? Start here to understand what sunnypilot is and whether it works with your vehicle.
|
||||
|
||||
- **[What is sunnypilot?](what-is-sunnypilot.md)** - Overview of the system, supported vehicles, and key capabilities
|
||||
- **[Use sunnypilot in a car](use-sunnypilot-in-a-car.md)** - Requirements and what to expect on your first drive
|
||||
42
docs_sp/getting-started/use-sunnypilot-in-a-car.md
Normal file
42
docs_sp/getting-started/use-sunnypilot-in-a-car.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Use sunnypilot in a car
|
||||
---
|
||||
|
||||
# Use sunnypilot in a car
|
||||
|
||||
## What You Need
|
||||
|
||||
1. **A supported vehicle** — Check the compatibility list for your car's make, model, and year
|
||||
2. **A comma device** — comma 3X or compatible hardware
|
||||
3. **A vehicle harness** — Connects the device to your car's systems
|
||||
4. **An internet connection** — For initial setup and software updates
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Mount the device on your windshield
|
||||
2. Connect the harness to your car
|
||||
3. Install sunnypilot using one of the setup methods:
|
||||
- [URL Method](../setup/url-method.md) — Easiest, recommended for most users
|
||||
- [SSH Method](../setup/ssh-method.md) — For advanced users
|
||||
|
||||
## First Drive
|
||||
|
||||
After installation:
|
||||
|
||||
1. Power on the device
|
||||
2. Wait for the system to calibrate (drive straight for a few minutes)
|
||||
3. Enable cruise control as you normally would
|
||||
4. The system will begin assisting with steering and speed control
|
||||
|
||||
!!! tip
|
||||
Give the system time to calibrate. Steering assistance improves after the first few minutes of straight driving.
|
||||
|
||||
## Configuring Settings
|
||||
|
||||
sunnypilot offers many configurable options. Access settings through the on-device interface:
|
||||
|
||||
- **Cruise Control** — Speed management, gap settings, and cruise behavior
|
||||
- **Steering** — Lane keeping, MADS, and steering tuning
|
||||
- **Display & Visuals** — Customize the on-screen display
|
||||
|
||||
See the [Settings Reference](../settings/cruise/index.md) for a complete guide to all options.
|
||||
31
docs_sp/getting-started/what-is-sunnypilot.md
Normal file
31
docs_sp/getting-started/what-is-sunnypilot.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: What is sunnypilot?
|
||||
---
|
||||
|
||||
# What is sunnypilot?
|
||||
|
||||
sunnypilot is an open-source driver assistance system that enhances your car's existing features. It provides adaptive cruise control, lane centering, and many additional driving assists — all configurable to your preferences.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Adaptive Cruise Control** — Automatically adjusts speed to maintain distance from the car ahead
|
||||
- **Lane Centering** — Keeps your car centered in the lane on highways and well-marked roads
|
||||
- **Modular Assistive Driving System (MADS)** — Decouple lateral and longitudinal controls for flexible driving
|
||||
- **Speed Limit Assist** — Automatically adjust speed based on map and sign data
|
||||
- **Neural Network Lateral Control** — AI-based steering for smoother lane keeping
|
||||
|
||||
## How It Works
|
||||
|
||||
sunnypilot runs on a compatible device mounted in your car. It connects to your vehicle through a supported harness and uses cameras, radar, and other sensors to assist with driving.
|
||||
|
||||
!!! warning "Safety First"
|
||||
sunnypilot is a **driver assistance** system, not a self-driving system. You must keep your hands on the wheel and eyes on the road at all times. See [Safety Information](../safety/safety.md) for details.
|
||||
|
||||
## Supported Vehicles
|
||||
|
||||
sunnypilot supports a wide range of vehicles. Check the [openpilot vehicle compatibility list](https://github.com/commaai/openpilot/blob/master/docs/CARS.md) for base compatibility, plus additional sunnypilot-specific enhancements for select brands.
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [Use sunnypilot in a car](use-sunnypilot-in-a-car.md) — Overview of what you need
|
||||
- [Read before installing](../setup/read-before-installing.md) — Important pre-installation info
|
||||
10
docs_sp/how-to/index.md
Normal file
10
docs_sp/how-to/index.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: How-To Guides
|
||||
---
|
||||
|
||||
# How-To Guides
|
||||
|
||||
Step-by-step guides for common tasks.
|
||||
|
||||
- **[Share a Route](share-a-route.md)** - How to share driving routes with others for debugging or review
|
||||
- **[Preserve Local File Changes](preserve-local-changes.md)** - Keep your local modifications across software updates
|
||||
49
docs_sp/how-to/preserve-local-changes.md
Normal file
49
docs_sp/how-to/preserve-local-changes.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: Preserve Local Changes
|
||||
---
|
||||
|
||||
# Preserve Local File Changes on Your comma Device
|
||||
|
||||
## Overview
|
||||
|
||||
By default, the comma device automatically updates sunnypilot, which overwrites any local file modifications you have made. To keep your local changes across reboots, you must disable automatic updates **before** making modifications.
|
||||
|
||||
!!! warning "Complete These Steps First"
|
||||
Local modifications applied **before** completing the steps below will **not** be retained. The automatic update process will overwrite them on the next reboot. Complete all steps first, then make your changes.
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Enable Advanced Controls
|
||||
|
||||
Navigate to **Settings** → **Developer** → **Show Advanced Controls** and toggle it **ON**.
|
||||
|
||||
This reveals additional settings options that are hidden by default, including the update toggle.
|
||||
|
||||
### 2. Disable Updates
|
||||
|
||||
Navigate to **Settings** → **Software** → **Disable Updates** and toggle it **ON**.
|
||||
|
||||
This prevents the device from automatically pulling and applying updates from the remote branch.
|
||||
|
||||
!!! note "Offroad Only"
|
||||
The Disable Updates toggle can only be changed while the device is **offroad** (not actively driving). If you are in a drive, complete the drive first and return to the home screen before changing this setting.
|
||||
|
||||
### 3. Reboot the Device
|
||||
|
||||
Navigate to **Settings** → **Device** → **Reboot** to restart the device.
|
||||
|
||||
The reboot applies the settings change and ensures the update service is fully stopped. A confirmation dialog will appear before the reboot proceeds.
|
||||
|
||||
### 4. Verify
|
||||
|
||||
After the device restarts:
|
||||
|
||||
1. Confirm that your settings from steps 1 and 2 are still active
|
||||
2. Make your desired local file changes (via SSH or other methods)
|
||||
3. Reboot again to confirm your changes persist
|
||||
|
||||
!!! info "Automatic Updates Are Paused"
|
||||
With updates disabled, your device will **not** receive new sunnypilot releases automatically. You will need to re-enable updates manually when you want to update to a newer version. To re-enable, reverse step 2: **Settings** → **Software** → **Disable Updates** → **OFF**.
|
||||
|
||||
!!! tip "When to Use This"
|
||||
This is useful for testing custom parameter values, experimental configurations, or developer modifications that you want to persist across device reboots without being overwritten by the update system.
|
||||
58
docs_sp/how-to/share-a-route.md
Normal file
58
docs_sp/how-to/share-a-route.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: How to Share a Route
|
||||
---
|
||||
|
||||
# How to Share a Route
|
||||
|
||||
## Overview
|
||||
|
||||
Sharing driving routes is essential for debugging issues, getting support, and helping developers improve sunnypilot. Routes are shared through [comma Connect](https://connect.comma.ai), comma's web-based route management tool.
|
||||
|
||||
## Step 1: Prepare the Route
|
||||
|
||||
Before sharing, ensure the route data is fully uploaded and preserved.
|
||||
|
||||
### Upload Raw Logs
|
||||
|
||||
1. Go to [connect.comma.ai](https://connect.comma.ai)
|
||||
2. Select the route you want to share
|
||||
3. Open the **Files** tab
|
||||
4. Upload the raw logs for the route
|
||||
|
||||
!!! warning "Upload Before Sharing"
|
||||
Raw logs must be **fully uploaded** before they can be reviewed by others. If the logs are not uploaded, reviewers will not have access to the detailed data needed for debugging.
|
||||
|
||||
### Preserve the Route
|
||||
|
||||
Routes are automatically deleted after a retention period. To prevent this:
|
||||
|
||||
1. Select the route in comma Connect
|
||||
2. Click **More info**
|
||||
3. Toggle **Preserved** to **ON**
|
||||
|
||||
This ensures the route remains available for as long as you need it.
|
||||
|
||||
## Step 2: Choose Sharing Method
|
||||
|
||||
### Option A: Public Route (Recommended)
|
||||
|
||||
The simplest way to share a single route for support or debugging.
|
||||
|
||||
1. Select the route in comma Connect
|
||||
2. Toggle **Public access** to **ON**
|
||||
3. Copy the **Route ID** from the route details
|
||||
4. Share the Route ID in the support channel or forum thread
|
||||
|
||||
!!! info "Privacy"
|
||||
Making a route public means **anyone with the Route ID can access it**. Route data includes GPS coordinates and video footage. For privacy, start and end your recorded drives at public places such as parking lots or gas stations. Avoid starting or ending at your home, workplace, or other private locations.
|
||||
|
||||
### Option B: Device Sharing
|
||||
|
||||
Grants another user access to **all routes** on your device. Use this when ongoing collaboration is needed.
|
||||
|
||||
1. Rename your device with your vehicle's **Year/Make/Model** and your **username** (e.g., "2023 Hyundai Ioniq 6 - jasonwen")
|
||||
2. Go to device settings in comma Connect
|
||||
3. Share the device via the other user's email address
|
||||
|
||||
!!! tip "When to Use Device Sharing"
|
||||
Device sharing is best for long-term collaboration with a developer or when multiple routes need to be reviewed. For one-off support requests, prefer Option A (Public Route) to limit access to only the relevant route.
|
||||
37
docs_sp/index.md
Normal file
37
docs_sp/index.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
title: Home
|
||||
---
|
||||
|
||||
# sunnypilot Documentation
|
||||
|
||||
Welcome to the official sunnypilot documentation. Find everything you need to get started, configure your system, and get the most out of your driving experience.
|
||||
|
||||
## Quick Links
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-rocket-launch: **[Getting Started](getting-started/index.md)**
|
||||
|
||||
Learn what sunnypilot is and how to get set up
|
||||
|
||||
- :material-download: **[Installation](setup/index.md)**
|
||||
|
||||
Install sunnypilot on your comma device
|
||||
|
||||
- :material-car: **[Features](features/index.md)**
|
||||
|
||||
Explore all features and how they work
|
||||
|
||||
- :material-cog: **[Settings](settings/index.md)**
|
||||
|
||||
Complete guide to every configurable option
|
||||
|
||||
- :material-shield: **[Safety](safety/index.md)**
|
||||
|
||||
Important safety information for all users
|
||||
|
||||
- :material-account-group: **[Community](community/index.md)**
|
||||
|
||||
Get involved and connect with other users
|
||||
|
||||
</div>
|
||||
76
docs_sp/references/branch-definitions.md
Normal file
76
docs_sp/references/branch-definitions.md
Normal file
@@ -0,0 +1,76 @@
|
||||
---
|
||||
title: Branch Definitions
|
||||
---
|
||||
|
||||
# Branch Definitions
|
||||
|
||||
Understanding sunnypilot's branching strategy and device compatibility.
|
||||
|
||||
!!! tip "Calling All Testers"
|
||||
Testers, even without software development experience, are encouraged to run **staging** or **dev** branches and report issues. Your feedback is invaluable for improving sunnypilot before each release.
|
||||
|
||||
---
|
||||
|
||||
## Release Branches
|
||||
|
||||
### release-tizi (C3X)
|
||||
|
||||
- **Stability:** :material-check-circle: Highly stable
|
||||
- **Target devices:** Comma 3X (TIZI)
|
||||
- **Description:** The recommended branch for most Comma 3X users. This branch contains thoroughly tested features and fixes that have passed through staging and dev. Use this for daily driving.
|
||||
|
||||
### release-tici (C3)
|
||||
|
||||
- **Stability:** Not yet available
|
||||
- **Target devices:** Comma Three (TICI)
|
||||
- **Description:** A dedicated release branch for Comma Three is not yet available. C3 users should use `staging-tici` in the meantime.
|
||||
|
||||
---
|
||||
|
||||
## Pre-Release Branches
|
||||
|
||||
### staging (C4 / C3X)
|
||||
|
||||
- **Stability:** :material-alert-circle: Generally stable
|
||||
- **Target devices:** Comma Four (MICI), Comma 3X (TIZI)
|
||||
- **Description:** Pre-release testing branch. Features here are being validated before promotion to a release branch. Suitable for users who want early access to upcoming features and are willing to report issues.
|
||||
|
||||
### staging-tici (C3)
|
||||
|
||||
- **Stability:** :material-alert-circle: Generally stable
|
||||
- **Target devices:** Comma Three (TICI)
|
||||
- **Description:** Pre-release testing branch for Comma Three. Provides the most stable experience currently available for C3 devices.
|
||||
|
||||
---
|
||||
|
||||
## Development Branches
|
||||
|
||||
### dev (C4 / C3X)
|
||||
|
||||
- **Stability:** :material-close-circle: Least stable
|
||||
- **Target devices:** Comma Four (MICI), Comma 3X (TIZI)
|
||||
- **Description:** Active development branch with the latest features and fixes. Intended for testers and developers who want to try the newest changes and provide feedback. Expect occasional issues.
|
||||
|
||||
### master (C4 / C3X)
|
||||
|
||||
- **Stability:** :material-close-circle: Unstable
|
||||
- **Target devices:** Comma Four (MICI), Comma 3X (TIZI)
|
||||
- **Description:** The primary development branch where pull requests are merged. Not recommended for daily driving. Use this branch if you are contributing code to sunnypilot.
|
||||
|
||||
### master-dev (C4 / C3X)
|
||||
|
||||
- **Stability:** :material-close-circle: Unstable
|
||||
- **Target devices:** Comma Four (MICI), Comma 3X (TIZI)
|
||||
- **Description:** CI branch used to build prebuilt artifacts for the `dev` branch. Not intended for direct installation.
|
||||
|
||||
---
|
||||
|
||||
## Which Branch Should I Use?
|
||||
|
||||
| Use Case | Recommended Branch |
|
||||
|----------|--------------------|
|
||||
| Daily driving (C3X) | `release-tizi` |
|
||||
| Daily driving (C3) | `staging-tici` |
|
||||
| Early access to features (C4/C3X) | `staging` |
|
||||
| Testing and feedback (C4/C3X) | `dev` |
|
||||
| Contributing code | `master` |
|
||||
46
docs_sp/references/recommended-branches.md
Normal file
46
docs_sp/references/recommended-branches.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Recommended Branches
|
||||
---
|
||||
|
||||
# Recommended Branches
|
||||
|
||||
!!! warning
|
||||
Please only install the branches listed below. All other branches are experimental development branches and are not intended for general use.
|
||||
|
||||
See [Branch Definitions](branch-definitions.md) for detailed descriptions of each branch type.
|
||||
|
||||
---
|
||||
|
||||
## Comma Four (C4 / MICI)
|
||||
|
||||
| Branch | Install URL | Stability |
|
||||
|--------|------------|-----------|
|
||||
| staging | `staging.sunnypilot.ai` | Generally stable, pre-release testing |
|
||||
| dev | `dev.sunnypilot.ai` | Least stable, for testers and developers |
|
||||
|
||||
---
|
||||
|
||||
## Comma 3X (C3X / TIZI)
|
||||
|
||||
| Branch | Install URL | Stability |
|
||||
|--------|------------|-----------|
|
||||
| release-tizi | `release.sunnypilot.ai` | Highly stable, recommended for most users |
|
||||
| staging | `staging.sunnypilot.ai` | Generally stable, pre-release testing |
|
||||
| dev | `dev.sunnypilot.ai` | Least stable, for testers and developers |
|
||||
|
||||
---
|
||||
|
||||
## Comma Three (C3 / TICI)
|
||||
|
||||
| Branch | Install URL | Stability |
|
||||
|--------|------------|-----------|
|
||||
| staging-tici | `staging.sunnypilot.ai` | Pre-release testing for C3 |
|
||||
|
||||
!!! note
|
||||
A dedicated release branch for Comma Three (`release-tici`) is not yet available. Use `staging-tici` for the most stable C3 experience.
|
||||
|
||||
---
|
||||
|
||||
## Changelogs
|
||||
|
||||
For detailed changelogs of each release, see the [sunnypilot GitHub Releases](https://github.com/sunnypilot/sunnypilot/releases) page.
|
||||
56
docs_sp/safety/driver-responsibility.md
Normal file
56
docs_sp/safety/driver-responsibility.md
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
title: Driver Responsibility & Level 2 ADAS
|
||||
---
|
||||
|
||||
# Driver Responsibility & Level 2 ADAS
|
||||
|
||||
!!! danger "You Are Always Responsible"
|
||||
sunnypilot is **NOT** a self-driving system. You are legally and morally responsible for the vehicle at all times. No feature in sunnypilot removes or reduces your obligation to drive safely.
|
||||
|
||||
## What is Level 2 ADAS
|
||||
|
||||
sunnypilot is classified as a **Level 2 Advanced Driver Assistance System (ADAS)** per the SAE J3016 standard for driving automation. The SAE levels define increasing degrees of automation:
|
||||
|
||||
| SAE Level | Name | Driver Role |
|
||||
|-----------|------|-------------|
|
||||
| 0 | No Automation | Driver performs all tasks |
|
||||
| 1 | Driver Assistance | System controls steering OR speed, not both |
|
||||
| **2** | **Partial Automation** | **System controls steering AND speed; driver must supervise** |
|
||||
| 3 | Conditional Automation | System handles driving in limited scenarios; driver must be ready |
|
||||
| 4–5 | High/Full Automation | System handles all driving tasks in defined conditions |
|
||||
|
||||
sunnypilot operates at **Level 2** only. It can control steering and speed simultaneously, but the human driver must remain fully engaged at all times.
|
||||
|
||||
## What This Means
|
||||
|
||||
At Level 2, the system provides assistance — not autonomy. Specifically:
|
||||
|
||||
- The system **can** control steering, acceleration, and braking simultaneously
|
||||
- The system **cannot** handle unexpected situations, edge cases, or complex scenarios reliably
|
||||
- The **driver** is the fallback for every situation the system cannot handle
|
||||
- The **driver** bears full legal responsibility for the vehicle's operation
|
||||
|
||||
## Driver Obligations
|
||||
|
||||
As the operator of a Level 2 ADAS vehicle, you must:
|
||||
|
||||
- **Keep your hands on the steering wheel** at all times
|
||||
- **Keep your eyes on the road** and maintain situational awareness
|
||||
- **Be ready to intervene immediately** — the system can disengage or behave unexpectedly without warning
|
||||
- **Follow all traffic laws** — the system does not replace your judgment or legal obligations
|
||||
- **Never rely on the system** as a substitute for attentive driving
|
||||
|
||||
## NHTSA Guidance
|
||||
|
||||
The National Highway Traffic Safety Administration (NHTSA) classifies Level 2 systems as requiring **full driver engagement**. NHTSA's position is clear:
|
||||
|
||||
- Level 2 systems are **driver support features**, not automated driving systems
|
||||
- The driver must be able to perform the complete driving task at all times
|
||||
- Manufacturers and operators share responsibility for safe use of these systems
|
||||
|
||||
For more information, see [NHTSA's guidance on automated vehicles](https://www.nhtsa.gov/technology-innovation/automated-vehicles-safety).
|
||||
|
||||
## Related Pages
|
||||
|
||||
- [Safety Information](safety.md) — General safety guidelines and system limitations
|
||||
- [Prohibited Modifications](prohibited-modifications.md) — Modifications and uses that are not allowed
|
||||
11
docs_sp/safety/index.md
Normal file
11
docs_sp/safety/index.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: Safety
|
||||
---
|
||||
|
||||
# Safety
|
||||
|
||||
Read these pages before using sunnypilot. Understanding the safety model and your responsibilities as a driver is essential.
|
||||
|
||||
- **[Safety Information](safety.md)** - Core safety principles and system limitations
|
||||
- **[Driver Responsibility & L2 ADAS](driver-responsibility.md)** - What Level 2 driving assistance means for you
|
||||
- **[Prohibited Modifications](prohibited-modifications.md)** - Modifications that compromise safety and are not supported
|
||||
61
docs_sp/safety/prohibited-modifications.md
Normal file
61
docs_sp/safety/prohibited-modifications.md
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
title: Prohibited Modifications
|
||||
---
|
||||
|
||||
# Prohibited Modifications
|
||||
|
||||
Certain modifications to sunnypilot are prohibited for safety reasons.
|
||||
|
||||
!!! danger "Zero Tolerance Policy"
|
||||
All official sunnypilot branches strictly adhere to [comma.ai's safety policy](https://github.com/commaai/openpilot/blob/master/docs/SAFETY.md). Any changes against this policy will result in your fork and your device being **banned from both comma.ai and sunnypilot channels**.
|
||||
|
||||
## Panda Safety Violations
|
||||
|
||||
The following modifications to panda safety logic are strictly prohibited:
|
||||
|
||||
- **Preventing longitudinal disengagement on brake** — The system must disengage longitudinal control when the brake pedal is pressed. Overriding this behavior is prohibited.
|
||||
- **Automatic re-engagement after braking** — Automatically re-engaging longitudinal control upon brake release without explicit driver input is prohibited.
|
||||
- **Operating with cruise main off** — The system must disengage when cruise control main is in the off state. Bypassing this check is prohibited.
|
||||
- **Removing steering torque limits** — Modifying or removing the safety-enforced steering torque limits is prohibited.
|
||||
- **Bypassing vehicle safety interlocks** — Disabling or circumventing any vehicle-level safety interlock is prohibited.
|
||||
|
||||
### Panda Safety Limits (Example: Hyundai/Kia/Genesis)
|
||||
|
||||
The panda enforces hard acceleration limits that cannot be overridden by software:
|
||||
|
||||
| Parameter | Limit |
|
||||
|-----------|-------|
|
||||
| **Maximum acceleration** | +2.0 m/s² |
|
||||
| **Maximum deceleration** | -3.5 m/s² |
|
||||
|
||||
These limits are enforced at the hardware level by the panda safety firmware. Any attempt to exceed these limits is blocked regardless of what the software commands.
|
||||
|
||||
## Driver Monitoring Violations
|
||||
|
||||
- **Reducing or weakening driver monitoring parameters** — Any modification that lowers the sensitivity, delays the response, or otherwise weakens the driver monitoring system is prohibited. This includes increasing allowed distraction time, reducing alert thresholds, or disabling monitoring entirely.
|
||||
|
||||
### Driver Monitoring Escalation Timeline
|
||||
|
||||
The driver monitoring system follows a strict escalation timeline:
|
||||
|
||||
| Phase | Timeout | Description |
|
||||
|-------|---------|-------------|
|
||||
| **Active monitoring** | 11 seconds | Time before the first distraction alert when the driver is not looking at the road |
|
||||
| **Passive monitoring** | 30 seconds | Time before an alert when the driver's face is not detected (e.g., face covered or camera obstructed) |
|
||||
| **Terminal alerts** | 3 strikes | After 3 terminal-level alerts (driver unresponsive), the system locks out and requires a full restart |
|
||||
|
||||
Modifying any of these thresholds to be more permissive is strictly prohibited.
|
||||
|
||||
## General Prohibitions
|
||||
|
||||
- Disabling or bypassing driver monitoring
|
||||
- Modifying braking safety thresholds
|
||||
- Any modification that reduces the driver's ability to take manual control
|
||||
|
||||
## Why These Restrictions Exist
|
||||
|
||||
These restrictions protect you, your passengers, and other road users. Safety-critical systems have been carefully tuned and tested. Unauthorized modifications can have unpredictable and dangerous consequences.
|
||||
|
||||
!!! info "References"
|
||||
- [comma.ai Safety Policy](https://github.com/commaai/openpilot/blob/master/docs/SAFETY.md)
|
||||
- [Official sunnypilot Branches](../references/recommended-branches.md)
|
||||
38
docs_sp/safety/safety.md
Normal file
38
docs_sp/safety/safety.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: Safety Information
|
||||
---
|
||||
|
||||
# Safety Information
|
||||
|
||||
!!! danger "Important"
|
||||
sunnypilot is a **driver assistance** system. It is **NOT** a self-driving system. The driver must maintain attention at all times.
|
||||
|
||||
## Driver Responsibilities
|
||||
|
||||
- **Keep your hands on the wheel** at all times
|
||||
- **Keep your eyes on the road** — do not rely on the system to detect all hazards
|
||||
- **Be ready to take over** immediately at any time
|
||||
- **Follow all traffic laws** — the system does not replace your judgment
|
||||
|
||||
## System Limitations
|
||||
|
||||
sunnypilot may not perform well in:
|
||||
|
||||
- Heavy rain, snow, or fog
|
||||
- Construction zones
|
||||
- Unmarked or poorly marked roads
|
||||
- Unusual traffic situations
|
||||
- Night driving with poor lighting
|
||||
|
||||
## When to Disengage
|
||||
|
||||
Immediately take manual control if:
|
||||
|
||||
- The system behaves unexpectedly
|
||||
- Road conditions change suddenly
|
||||
- You enter an unfamiliar or complex driving situation
|
||||
- Emergency vehicles are present
|
||||
|
||||
## Prohibited Use
|
||||
|
||||
See [Prohibited Modifications](prohibited-modifications.md) for modifications and uses that are not allowed.
|
||||
87
docs_sp/settings/cruise/index.md
Normal file
87
docs_sp/settings/cruise/index.md
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
title: Cruise Control Settings
|
||||
---
|
||||
|
||||
# Cruise Control Settings
|
||||
|
||||
Configure adaptive cruise control behavior, including intelligent button management, smart cruise features, and custom speed increments.
|
||||
|
||||
**Location**: `Settings -> Cruise`
|
||||
|
||||
!!! info "Toggle & Device Availability"
|
||||
Supported on all devices. comma four users must use sunnylink to change this setting.
|
||||
|
||||
---
|
||||
|
||||
## Intelligent Cruise Button Management (ICBM) (Alpha)
|
||||
|
||||
Allows sunnypilot to dynamically manage cruise speed by intercepting button presses on the steering wheel. When enabled, speed adjustments are handled intelligently to support features like Speed Limit Assist.
|
||||
|
||||
!!! note "Vehicle Compatibility"
|
||||
This toggle only appears if your vehicle supports ICBM. If you do not see it, your vehicle does not support this feature.
|
||||
|
||||
---
|
||||
|
||||
## Smart Cruise Control - Vision
|
||||
|
||||
Uses vision-based path predictions to estimate the appropriate speed to drive through turns ahead. The system monitors predicted lateral acceleration and smoothly decelerates when entering curves, then accelerates back to your set speed when exiting.
|
||||
|
||||
!!! note "Availability"
|
||||
Requires longitudinal control, or ICBM must be enabled.
|
||||
|
||||
---
|
||||
|
||||
## Smart Cruise Control - Map
|
||||
|
||||
Uses map data to estimate the appropriate speed to drive through turns ahead. The system calculates deceleration distance based on your current speed and upcoming waypoint target velocities.
|
||||
|
||||
!!! note "Availability"
|
||||
Requires longitudinal control, or ICBM must be enabled.
|
||||
|
||||
---
|
||||
|
||||
## Custom ACC Speed Increments
|
||||
|
||||
Enables customization of how much the set speed changes with short and long button presses on the steering wheel.
|
||||
|
||||
!!! note "Availability"
|
||||
Requires longitudinal control (or ICBM enabled), and PCM Cruise must not be active.
|
||||
|
||||
### Short Press Increment
|
||||
|
||||
Once the toggle is enabled, a selector appears below it. Use the **-** and **+** buttons to set the speed change (in km/h or mph) for a short press of the cruise speed button. The range is 1 to 10.
|
||||
|
||||
### Long Press Increment
|
||||
|
||||
A second selector lets you choose the speed change for a long press:
|
||||
|
||||
| Selection | Speed change |
|
||||
|-----------|-------------|
|
||||
| **1** | 1 km/h (or mph) |
|
||||
| **2** | 5 km/h (or mph) |
|
||||
| **3** | 10 km/h (or mph) |
|
||||
|
||||
---
|
||||
|
||||
## Enable Dynamic Experimental Control
|
||||
|
||||
Automatically switches between standard and experimental driving mode based on driving conditions. When enabled, the system uses real-time signals (speed, turn detection, stop signs, traffic lights) to determine the most appropriate mode.
|
||||
|
||||
!!! note "Availability"
|
||||
Requires longitudinal control. The device must be offroad (parked, ignition off) to change this setting.
|
||||
|
||||
---
|
||||
|
||||
## Speed Limit
|
||||
|
||||
A button that opens the [Speed Limit sub-panel](speed-limit/index.md) where you can configure speed limit mode, offset, and data source.
|
||||
|
||||
---
|
||||
|
||||
## Related Features
|
||||
|
||||
- [Intelligent Cruise Button Management](../../features/cruise/icbm.md)
|
||||
- [Smart Cruise Control - Vision](../../features/cruise/scc-v.md)
|
||||
- [Smart Cruise Control - Map](../../features/cruise/scc-m.md)
|
||||
- [Custom ACC Increments](../../features/cruise/custom-acc-increments.md)
|
||||
- [Dynamic Experimental Control](../../features/cruise/dynamic-experimental-control.md)
|
||||
66
docs_sp/settings/cruise/speed-limit/index.md
Normal file
66
docs_sp/settings/cruise/speed-limit/index.md
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
title: Speed Limit Settings
|
||||
---
|
||||
|
||||
# Speed Limit Settings
|
||||
|
||||
Configure how sunnypilot responds to detected speed limits from maps, signs, and navigation data.
|
||||
|
||||
**Location**: `Settings -> Cruise -> Speed Limit`
|
||||
|
||||
!!! info "Toggle & Device Availability"
|
||||
Supported on all devices. comma four users must use sunnylink to change this setting.
|
||||
|
||||
---
|
||||
|
||||
## Speed Limit
|
||||
|
||||
A row of four buttons that controls how sunnypilot uses speed limit information:
|
||||
|
||||
| Mode | What it does |
|
||||
|------|-------------|
|
||||
| **Off** | Speed limit data is not used |
|
||||
| **Info** | Displays the current speed limit on the HUD |
|
||||
| **Warning** | Displays speed limit and alerts you when exceeding it |
|
||||
| **Assist** | Automatically adjusts cruise speed to match the speed limit (with optional offset) |
|
||||
|
||||
!!! note "Availability"
|
||||
Requires longitudinal control, or ICBM must be enabled.
|
||||
|
||||
!!! warning "Vehicle Restrictions"
|
||||
- **Tesla**: Speed Limit Assist mode is disabled on release branches
|
||||
- **Rivian**: Speed Limit Assist mode is always disabled
|
||||
|
||||
---
|
||||
|
||||
## Customize Source
|
||||
|
||||
A button that opens the [Speed Limit Source sub-panel](source.md) where you choose which data source provides speed limit information (car, map, or a combination).
|
||||
|
||||
---
|
||||
|
||||
## Speed Limit Offset
|
||||
|
||||
A row of three buttons that controls how the speed offset is calculated:
|
||||
|
||||
| Type | What it does |
|
||||
|------|-------------|
|
||||
| **None** | No offset - cruise matches the exact speed limit |
|
||||
| **Fixed** | A fixed value (in km/h or mph) is added to or subtracted from the limit |
|
||||
| **%** | A percentage is applied to the speed limit |
|
||||
|
||||
---
|
||||
|
||||
## Speed Limit Value Offset
|
||||
|
||||
A slider that sets the offset value applied to the detected speed limit. Use the **-** and **+** buttons to adjust from -30 to +30. This slider only appears when Speed Limit Offset is set to Fixed or %.
|
||||
|
||||
- **Positive values**: Cruise faster than the limit (e.g., +5 means 5 over)
|
||||
- **Negative values**: Cruise slower than the limit (e.g., -5 means 5 under)
|
||||
|
||||
---
|
||||
|
||||
## Related Features
|
||||
|
||||
- [Speed Limit Assist](../../../features/cruise/speed-limit.md)
|
||||
- [OSM Maps](../../../features/connected/osm-maps.md)
|
||||
37
docs_sp/settings/cruise/speed-limit/source.md
Normal file
37
docs_sp/settings/cruise/speed-limit/source.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
title: Speed Limit Source
|
||||
---
|
||||
|
||||
# Speed Limit Source
|
||||
|
||||
**Location**: `Settings -> Cruise -> Speed Limit -> Customize Source`
|
||||
|
||||
!!! info "Toggle & Device Availability"
|
||||
Supported on all devices. comma four users must use sunnylink to change this setting.
|
||||
|
||||
Configure which data source sunnypilot uses to determine the current speed limit, and how multiple sources are prioritized.
|
||||
|
||||
---
|
||||
|
||||
## Speed Limit Source
|
||||
|
||||
A row of five buttons lets you choose the source policy:
|
||||
|
||||
| Option | What it does |
|
||||
|--------|-------------|
|
||||
| **Car Only** | Uses only the speed limit data provided by your vehicle's built-in systems (e.g., traffic sign recognition from the car's cameras) |
|
||||
| **Map Only** | Uses only OpenStreetMap data for speed limits. Requires a downloaded map database from the [OSM panel](../../osm.md) |
|
||||
| **Car First** | Checks the car's speed limit data first. Falls back to map data if the car does not report a limit |
|
||||
| **Map First** | Checks map data first. Falls back to the car's reported limit if no map data is available |
|
||||
| **Combined** | Uses the higher of the two available values from car and map sources |
|
||||
|
||||
!!! tip
|
||||
**Car First** is a good default for vehicles with traffic sign recognition. If your vehicle does not have sign recognition, use **Map Only** or **Map First** and make sure you have downloaded the map for your region in the [OSM panel](../../osm.md).
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
|
||||
- [Speed Limit Settings](index.md) - mode, offset type, and offset value
|
||||
- [OSM Panel](../../osm.md) - download map data for your region
|
||||
- [Speed Limit Assist (Feature)](../../../features/cruise/speed-limit.md) - how Speed Limit Assist works
|
||||
136
docs_sp/settings/developer.md
Normal file
136
docs_sp/settings/developer.md
Normal file
@@ -0,0 +1,136 @@
|
||||
---
|
||||
title: Developer Settings
|
||||
---
|
||||
|
||||
# Developer Settings
|
||||
|
||||
Advanced settings for developers and power users, including debug tools, connectivity options, and alpha features.
|
||||
|
||||
**Location**: `Settings -> Developer`
|
||||
|
||||
!!! info "Toggle & Device Availability"
|
||||
Available and configurable on all devices (comma 3X/3, comma four, sunnylink).
|
||||
|
||||
---
|
||||
|
||||
## Show Advanced Controls
|
||||
|
||||
Reveals additional advanced settings throughout the sunnypilot interface. Enabling this does not change any driving behavior - it only makes hidden controls visible.
|
||||
|
||||
Settings gated behind this toggle include:
|
||||
|
||||
- [Models](models.md): Adjust Lane Turn Speed, Adjust Software Delay
|
||||
- [Software](software.md): Disable Updates
|
||||
- Developer: GitHub Runner Service, copyparty Service, Quickboot Mode
|
||||
|
||||
---
|
||||
|
||||
## Enable ADB
|
||||
|
||||
Enables ADB (Android Debug Bridge) for connecting to the device over USB or network for debugging.
|
||||
|
||||
!!! note "Availability"
|
||||
Can only be changed while the device is offroad.
|
||||
|
||||
---
|
||||
|
||||
## Enable SSH
|
||||
|
||||
Enables SSH access to the device for remote terminal sessions.
|
||||
|
||||
---
|
||||
|
||||
## SSH Keys
|
||||
|
||||
A button that fetches SSH public keys from a GitHub username and installs them on the device. This allows SSH login using your GitHub-associated key pair.
|
||||
|
||||
!!! warning
|
||||
Only add SSH keys from users you trust. Anyone with an installed key has full access to the device.
|
||||
|
||||
---
|
||||
|
||||
## Joystick Debug Mode
|
||||
|
||||
Enables joystick-controlled driving for testing and development purposes.
|
||||
|
||||
!!! note "Availability"
|
||||
Hidden on release branches. Can only be changed while the device is offroad.
|
||||
|
||||
---
|
||||
|
||||
## Longitudinal Maneuver Mode
|
||||
|
||||
Enables a longitudinal debug mode for testing acceleration and braking maneuvers.
|
||||
|
||||
!!! note "Availability"
|
||||
Hidden on release branches. Requires longitudinal control and the device must be offroad.
|
||||
|
||||
---
|
||||
|
||||
## sunnypilot Longitudinal Control (Alpha)
|
||||
|
||||
Enables alpha-quality longitudinal control for vehicles that do not yet have full upstream support. This replaces the car's stock adaptive cruise control with sunnypilot's own gas and brake management.
|
||||
|
||||
!!! warning
|
||||
Enabling this disables AEB (Automatic Emergency Braking). A confirmation dialog appears before activation.
|
||||
|
||||
!!! note "Availability"
|
||||
Hidden on release branches. Only appears if your vehicle supports alpha longitudinal control.
|
||||
|
||||
---
|
||||
|
||||
## UI Debug Mode
|
||||
|
||||
Shows touch indicators, FPS counter, and mouse coordinates on screen. Useful for UI development and troubleshooting display issues.
|
||||
|
||||
---
|
||||
|
||||
## GitHub Runner Service
|
||||
|
||||
Enables the GitHub Actions self-hosted runner service on the device. This allows the device to execute CI/CD jobs from your repository.
|
||||
|
||||
!!! note "Availability"
|
||||
Only appears when **Show Advanced Controls** is enabled. Hidden on release branches.
|
||||
|
||||
---
|
||||
|
||||
## copyparty Service
|
||||
|
||||
Enables a file server on the device for downloading driving routes and logs from a web browser via the device's local IP address.
|
||||
|
||||
!!! note "Availability"
|
||||
Only appears when **Show Advanced Controls** is enabled.
|
||||
|
||||
---
|
||||
|
||||
## Quickboot Mode
|
||||
|
||||
Creates a prebuilt file for accelerated boot, reducing startup time. Requires software updates to be disabled first.
|
||||
|
||||
!!! note "Availability"
|
||||
Only appears when **Show Advanced Controls** is enabled, the device is not on a release or development branch, and **Disable Updates** is enabled in [Software Settings](software.md).
|
||||
|
||||
---
|
||||
|
||||
## Error Log
|
||||
|
||||
A **VIEW** button that opens the sunnypilot crash error log in a viewer. On close, you are offered the option to delete the log.
|
||||
|
||||
!!! note "Availability"
|
||||
Hidden on release branches.
|
||||
|
||||
---
|
||||
|
||||
## Platform Differences
|
||||
|
||||
On **comma four**, the Developer panel includes:
|
||||
|
||||
- ADB (circle icon toggle)
|
||||
- SSH (circle icon toggle)
|
||||
- SSH Keys
|
||||
- Joystick Debug Mode
|
||||
- Longitudinal Maneuver Mode
|
||||
- Alpha Longitudinal
|
||||
- UI Debug Mode
|
||||
|
||||
The comma four panel does not include: Show Advanced Controls, GitHub Runner Service, copyparty Service, Quickboot Mode, or Error Log.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user