mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-09 07:14:40 +08:00
Compare commits
241 Commits
archive/se
...
new-docs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28464418c2 | ||
|
|
3fbe92ac4d | ||
|
|
4814806dd6 | ||
|
|
1956af9cf0 | ||
|
|
0d9385823d | ||
|
|
3608ef5e67 | ||
|
|
cc58b81dd2 | ||
|
|
4437e3cc45 | ||
|
|
3af82984e0 | ||
|
|
c627b9ac46 | ||
|
|
0209fad94b | ||
|
|
6905635f83 | ||
|
|
7a88203bb8 | ||
|
|
e580767ec5 | ||
|
|
9fd4b33e0e | ||
|
|
01014a72df | ||
|
|
12f8cb64b4 | ||
|
|
26dac9b109 | ||
|
|
bbebd48d46 | ||
|
|
8ee461f1cc | ||
|
|
53868da000 | ||
|
|
cd8e38663a | ||
|
|
6a7d25e2ae | ||
|
|
36f1bf0adb | ||
|
|
188aa8374a | ||
|
|
c901eaa29c | ||
|
|
2c6b477e8a | ||
|
|
933bc55fd9 | ||
|
|
a363c86033 | ||
|
|
bf8725619e | ||
|
|
6c1fa7d101 | ||
|
|
a6582a9e31 | ||
|
|
fc8bf86599 | ||
|
|
980fd5393b | ||
|
|
19afa83ce1 | ||
|
|
c06a82f41b | ||
|
|
0b7d3805ff | ||
|
|
963d356173 | ||
|
|
03f76199f3 | ||
|
|
9ed9d001b0 | ||
|
|
f3933df2f5 | ||
|
|
d35cdb510d | ||
|
|
8f9b165de8 | ||
|
|
9474523add | ||
|
|
57daa151cb | ||
|
|
cafca4f891 | ||
|
|
2cd9975e4f | ||
|
|
c40d129f70 | ||
|
|
19dec54f65 | ||
|
|
8ab587d30b | ||
|
|
ea5ee29ebd | ||
|
|
2189164d45 | ||
|
|
8f3fc699d4 | ||
|
|
bdb733ddc9 | ||
|
|
b63ef7b0bf | ||
|
|
09d1604b84 | ||
|
|
61f7690265 | ||
|
|
4cb7263dd6 | ||
|
|
ef2331b5df | ||
|
|
13511e383c | ||
|
|
9be3925ee1 | ||
|
|
8d760272c7 | ||
|
|
22e0b4d597 | ||
|
|
4b11c9e914 | ||
|
|
5b4b7a08fc | ||
|
|
bfa8e0b2ec | ||
|
|
08afbd7cb5 | ||
|
|
d0671bda6d | ||
|
|
f311c8b1d7 | ||
|
|
fb7076a042 | ||
|
|
cd0ee08763 | ||
|
|
f7ab369d47 | ||
|
|
54d5281064 | ||
|
|
7ee9d2d1b9 | ||
|
|
7bf912f407 | ||
|
|
3e66827a85 | ||
|
|
16ea2ff270 | ||
|
|
3ccc63deec | ||
|
|
fa3a0ba747 | ||
|
|
7de618a5cf | ||
|
|
b3926faebb | ||
|
|
7c112341c3 | ||
|
|
ebff7cab1a | ||
|
|
1dd8bdc791 | ||
|
|
bf003f2972 | ||
|
|
9810b10c49 | ||
|
|
ac130001cc | ||
|
|
0dddc97dca | ||
|
|
1b6ac2d876 | ||
|
|
80f9278a73 | ||
|
|
7824074aae | ||
|
|
42f2601416 | ||
|
|
b6d124d268 | ||
|
|
661ef03a24 | ||
|
|
76fd5b00f1 | ||
|
|
0739d79a51 | ||
|
|
0fe143e4a7 | ||
|
|
086dcfe715 | ||
|
|
9536dd07c6 | ||
|
|
0b29db5c3e | ||
|
|
4e73b76a12 | ||
|
|
dfd387520e | ||
|
|
86d8d1d996 | ||
|
|
11cb2d3a0b | ||
|
|
84cff4fc03 | ||
|
|
6e185f4eea | ||
|
|
43dcddc68b | ||
|
|
ade13722cd | ||
|
|
7d6ff19dea | ||
|
|
2728c95b0d | ||
|
|
606890cba5 | ||
|
|
01c0756974 | ||
|
|
1ae3adbe13 | ||
|
|
5ebc65f254 | ||
|
|
691b948ad0 | ||
|
|
4fbac089f8 | ||
|
|
583e89d3a4 | ||
|
|
c51f37f63e | ||
|
|
1b3b5ab758 | ||
|
|
4caecf2143 | ||
|
|
7dec7c39be | ||
|
|
6f1ea5a1fd | ||
|
|
c8d5a3fe25 | ||
|
|
d7159cd3c7 | ||
|
|
db2a8e9506 | ||
|
|
eab9cd751c | ||
|
|
6b5f88a533 | ||
|
|
00d9748d9a | ||
|
|
a1d2e84212 | ||
|
|
d24b80fca4 | ||
|
|
a1dce6ef47 | ||
|
|
e68bb26e14 | ||
|
|
f39c5c22e8 | ||
|
|
d128dbe27f | ||
|
|
8827067eae | ||
|
|
02e30ac140 | ||
|
|
3c192cbf88 | ||
|
|
e5b803f28e | ||
|
|
fb1ad1d26a | ||
|
|
ccd369ee96 | ||
|
|
1989fbd4c4 | ||
|
|
173a633a75 | ||
|
|
c8622c9553 | ||
|
|
ed86910536 | ||
|
|
cd8a603ad0 | ||
|
|
313a2826c2 | ||
|
|
2da4aef268 | ||
|
|
75f49f84f3 | ||
|
|
edd8759f39 | ||
|
|
6cdf2a1499 | ||
|
|
4ac938a578 | ||
|
|
71ad5a8dee | ||
|
|
add958bb08 | ||
|
|
e38a1428aa | ||
|
|
31036771ee | ||
|
|
2221ffcf0e | ||
|
|
3446941107 | ||
|
|
d49c5193c3 | ||
|
|
0fa6745a67 | ||
|
|
bd8dd65ce0 | ||
|
|
18c310addf | ||
|
|
3382002cd0 | ||
|
|
f60dfd4dbb | ||
|
|
1e9738131d | ||
|
|
3bc1b173d2 | ||
|
|
fbbd4ee692 | ||
|
|
9b8c1693c9 | ||
|
|
29d0bfe1ab | ||
|
|
ef5d6a0466 | ||
|
|
e7ec1b8ff1 | ||
|
|
d828ac4344 | ||
|
|
93eb7ee0cc | ||
|
|
fb33366144 | ||
|
|
bd00a9d800 | ||
|
|
a654e5bd05 | ||
|
|
8d77cea3a5 | ||
|
|
5e0aff92ae | ||
|
|
1da71f5c3c | ||
|
|
dcdac84f0c | ||
|
|
27faa8f82b | ||
|
|
cefe00c964 | ||
|
|
dc886e195f | ||
|
|
1aa467cb00 | ||
|
|
0907b30d7b | ||
|
|
07fcc4825f | ||
|
|
917ea5699f | ||
|
|
c96dbd5a0b | ||
|
|
fd5549bba1 | ||
|
|
560e37cd83 | ||
|
|
f31ad97e92 | ||
|
|
3c48a6154b | ||
|
|
7f9cdf8e43 | ||
|
|
996bced674 | ||
|
|
4b794773b0 | ||
|
|
aa8484093e | ||
|
|
00af33c6ed | ||
|
|
c0739cd9ee | ||
|
|
d684d8f0f6 | ||
|
|
35a4a773f1 | ||
|
|
83d4623590 | ||
|
|
dd2787b7a1 | ||
|
|
c759fe9002 | ||
|
|
cbee4421da | ||
|
|
7ed3f62f0c | ||
|
|
e7388c3743 | ||
|
|
75b07c042f | ||
|
|
953e5667b1 | ||
|
|
50f55684a2 | ||
|
|
0f34e6e3b6 | ||
|
|
32a5cfd84c | ||
|
|
f1416f337c | ||
|
|
122a7f2f0f | ||
|
|
2156870df9 | ||
|
|
e3e54fb28b | ||
|
|
71dd1e2ff6 | ||
|
|
11db7b683b | ||
|
|
b247c3caaa | ||
|
|
e36ff90996 | ||
|
|
c17c34187b | ||
|
|
fbc53a24a3 | ||
|
|
5efdaf2026 | ||
|
|
0c58e35b6c | ||
|
|
133f25eecb | ||
|
|
35df0a4fda | ||
|
|
481e5b28bd | ||
|
|
6745c66352 | ||
|
|
8c6c6e435f | ||
|
|
f6189568ea | ||
|
|
15d3397ec6 | ||
|
|
4014109666 | ||
|
|
67038d5b59 | ||
|
|
36815cc6d5 | ||
|
|
31ff8eda9c | ||
|
|
fa2f7a4dd4 | ||
|
|
12d729a0a0 | ||
|
|
76686e1976 | ||
|
|
012eb07466 | ||
|
|
4a696984f1 | ||
|
|
3c74ad145e | ||
|
|
241fb902af | ||
|
|
4445fa31f5 |
1
.cache/plugin/git-committers/page-authors.json
Normal file
1
.cache/plugin/git-committers/page-authors.json
Normal file
@@ -0,0 +1 @@
|
||||
{"cache_date": "2024-08-08", "page_authors": {"docs/index.md": {"last_commit_date": "2024-07-28", "authors": [{"login": "adeebshihadeh", "name": "adeebshihadeh", "url": "https://github.com/adeebshihadeh", "avatar": "https://avatars.githubusercontent.com/u/8762862?v=4"}, {"login": "tecandrew", "name": "tecandrew", "url": "https://github.com/tecandrew", "avatar": "https://avatars.githubusercontent.com/u/21319730?v=4"}, {"login": "pd0wm", "name": "pd0wm", "url": "https://github.com/pd0wm", "avatar": "https://avatars.githubusercontent.com/u/1314752?v=4"}]}, "docs/SAFETY.md": {"last_commit_date": "2023-07-25", "authors": [{"login": "haraschax", "name": "haraschax", "url": "https://github.com/haraschax", "avatar": "https://avatars.githubusercontent.com/u/6804392?v=4"}, {"login": "sshane", "name": "sshane", "url": "https://github.com/sshane", "avatar": "https://avatars.githubusercontent.com/u/25857203?v=4"}, {"login": "pd0wm", "name": "pd0wm", "url": "https://github.com/pd0wm", "avatar": "https://avatars.githubusercontent.com/u/1314752?v=4"}, {"login": "geohot", "name": "geohot", "url": "https://github.com/geohot", "avatar": "https://avatars.githubusercontent.com/u/72895?v=4"}]}, "docs/how-to/turn-the-speed-blue.md": {"last_commit_date": "2024-07-28", "authors": [{"login": "adeebshihadeh", "name": "adeebshihadeh", "url": "https://github.com/adeebshihadeh", "avatar": "https://avatars.githubusercontent.com/u/8762862?v=4"}]}}}
|
||||
2
.github/labeler.yaml
vendored
2
.github/labeler.yaml
vendored
@@ -44,7 +44,7 @@ subaru:
|
||||
|
||||
tesla:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/telsa/*'
|
||||
- any-glob-to-all-files: 'selfdrive/car/tesla/*'
|
||||
|
||||
toyota:
|
||||
- changed-files:
|
||||
|
||||
2
.github/workflows/badges.yaml
vendored
2
.github/workflows/badges.yaml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
env:
|
||||
BASE_IMAGE: openpilot-base
|
||||
DOCKER_REGISTRY: ghcr.io/commaai
|
||||
RUN: docker run --shm-size 1G -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
|
||||
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
|
||||
|
||||
jobs:
|
||||
badges:
|
||||
|
||||
104
.github/workflows/ci_weekly_report.yaml
vendored
104
.github/workflows/ci_weekly_report.yaml
vendored
@@ -10,38 +10,30 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CI_RUNS: ${{ github.event.inputs.ci_runs || '50' }}
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
if: github.repository == 'commaai/openpilot'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
ci_runs: ${{ steps.ci_runs_setup.outputs.value }}
|
||||
ci_runs: ${{ steps.ci_runs_setup.outputs.matrix }}
|
||||
steps:
|
||||
- id: ci_runs_setup
|
||||
name: CI_RUNS=${{ env.CI_RUNS }}
|
||||
run: |
|
||||
CI_RUNS=${{ inputs.ci_runs || '50' }}
|
||||
mylist="value=["
|
||||
matrix=$(python3 -c "import json; print(json.dumps({ 'run_number' : list(range(${{ env.CI_RUNS }})) }))")
|
||||
echo "matrix=$matrix" >> $GITHUB_OUTPUT
|
||||
|
||||
for i in $(seq 1 $CI_RUNS);
|
||||
do
|
||||
if [ $i != $CI_RUNS ]; then
|
||||
mylist+="\"$i\", "
|
||||
else
|
||||
mylist+="\"$i\"]"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$mylist" >> $GITHUB_OUTPUT
|
||||
echo "Number of CI runs for report: $CI_RUNS"
|
||||
ci_matrix_run:
|
||||
needs: [ setup ]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
value: ${{fromJSON(needs.setup.outputs.ci_runs)}}
|
||||
matrix: ${{fromJSON(needs.setup.outputs.ci_runs)}}
|
||||
uses: commaai/openpilot/.github/workflows/ci_weekly_run.yaml@master
|
||||
with:
|
||||
run_number: ${{ matrix.value }}
|
||||
run_number: ${{ matrix.run_number }}
|
||||
|
||||
report:
|
||||
needs: [ci_matrix_run]
|
||||
@@ -62,62 +54,48 @@ jobs:
|
||||
})
|
||||
var report = {}
|
||||
jobs.slice(1, jobs.length-1).forEach(job => {
|
||||
const jobName = job.name.split('/')[2].trim();
|
||||
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: [], cancelled: [] };
|
||||
switch (job.conclusion) {
|
||||
case "success":
|
||||
report[jobName].successes.push(job.html_url); break;
|
||||
report[jobName].successes.push({ "run_number": run, "link": job.html_url}); break;
|
||||
case "failure":
|
||||
report[jobName].failures.push(job.html_url); break;
|
||||
report[jobName].failures.push({ "run_number": run, "link": job.html_url }); break;
|
||||
case "cancelled":
|
||||
report[jobName].cancelled.push(job.html_url); break;
|
||||
report[jobName].cancelled.push({ "run_number": run, "link": job.html_url }); break;
|
||||
}
|
||||
});
|
||||
return JSON.stringify(report);
|
||||
return JSON.stringify({"jobs": report});
|
||||
|
||||
- name: Add job results to summary
|
||||
env:
|
||||
JOB_RESULTS: ${{ fromJSON(steps.get-job-results.outputs.result) }}
|
||||
run: |
|
||||
echo $JOB_RESULTS > job_results.json
|
||||
generate_html_table() {
|
||||
echo "<table>"
|
||||
echo "<thead>"
|
||||
echo " <tr>"
|
||||
echo " <th>Job</th>"
|
||||
echo " <th>Succeeded ✅</th>"
|
||||
echo " <th>Failed ❌</th>"
|
||||
echo " <th>Cancelled (timed out) ⏰</th>"
|
||||
echo " </tr>"
|
||||
echo "</thead>"
|
||||
jq -r '
|
||||
"<tbody>",
|
||||
keys[] as $job |
|
||||
"<tr>",
|
||||
" <td>\($job)</td>",
|
||||
" <td>",
|
||||
" <details>",
|
||||
" <summary>(\(.[$job].successes | length))</summary>",
|
||||
" \(.[$job].successes[])<br>",
|
||||
" </details>",
|
||||
" </td>",
|
||||
" <td>",
|
||||
" <details>",
|
||||
" <summary>(\(.[$job].failures | length))</summary>",
|
||||
" \(.[$job].failures[])<br>",
|
||||
" </details>",
|
||||
" </td>",
|
||||
" <td>",
|
||||
" <details>",
|
||||
" <summary>(\(.[$job].cancelled | length))</summary>",
|
||||
" \(.[$job].cancelled[])<br>",
|
||||
" </details>",
|
||||
" </td>",
|
||||
"</tr>"
|
||||
' job_results.json
|
||||
echo "</tbody>"
|
||||
echo "</table>"
|
||||
}
|
||||
echo "# CI Job Summary" >> $GITHUB_STEP_SUMMARY
|
||||
generate_html_table >> $GITHUB_STEP_SUMMARY
|
||||
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
|
||||
|
||||
97
.github/workflows/codeql.yml
vendored
Normal file
97
.github/workflows/codeql.yml
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "*-c3", "master*" ]
|
||||
pull_request:
|
||||
branches: [ "master", "*-c3", "master*" ]
|
||||
schedule:
|
||||
- cron: '39 7 * * 2'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: c-cpp
|
||||
build-mode: autobuild
|
||||
- language: javascript-typescript
|
||||
build-mode: none
|
||||
- language: python
|
||||
build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
30
.github/workflows/docs.yaml
vendored
30
.github/workflows/docs.yaml
vendored
@@ -15,31 +15,24 @@ concurrency:
|
||||
group: docs-tests-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
BASE_IMAGE: openpilot-base
|
||||
|
||||
BUILD: selfdrive/test/docker_build.sh base
|
||||
|
||||
RUN: docker run --shm-size 1G -v $GITHUB_WORKSPACE:/tmp/openpilot -w /tmp/openpilot -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
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
name: build docs
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
if: false # TODO: replace this with the new docs
|
||||
timeout-minutes: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- name: Build openpilot
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc)"
|
||||
|
||||
# Build
|
||||
- name: Build docs
|
||||
run: |
|
||||
${{ env.RUN }} "apt update && apt install -y doxygen && cd docs && make -j$(nproc) html"
|
||||
# TODO: can we install just the "docs" dependency group without the normal deps?
|
||||
pip install mkdocs
|
||||
mkdocs build
|
||||
|
||||
# Push to docs.comma.ai
|
||||
- uses: actions/checkout@v4
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
|
||||
with:
|
||||
@@ -54,16 +47,17 @@ jobs:
|
||||
source release/identity.sh
|
||||
|
||||
cd openpilot-docs
|
||||
|
||||
git checkout --orphan tmp
|
||||
git rm -rf .
|
||||
|
||||
cp -r ../build/docs/html/ docs/
|
||||
cp -r ../docs/README.md .
|
||||
# copy over docs
|
||||
cp -r ../docs_site/ docs/
|
||||
|
||||
# GitHub pages config
|
||||
touch docs/.nojekyll
|
||||
echo -n docs.comma.ai > docs/CNAME
|
||||
git add -f .
|
||||
|
||||
git add -f .
|
||||
git commit -m "build docs"
|
||||
|
||||
# docs live in different repo to not bloat openpilot's full clone size
|
||||
|
||||
45
.github/workflows/jenkins-pr-trigger.yaml
vendored
Normal file
45
.github/workflows/jenkins-pr-trigger.yaml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: jenkins scan
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
# TODO: gc old branches in a separate job in this workflow
|
||||
scan-comments:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.issue.pull_request }}
|
||||
steps:
|
||||
- name: Check for trigger phrase
|
||||
id: check_comment
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const triggerPhrase = "trigger-jenkins";
|
||||
const comment = context.payload.comment.body;
|
||||
const commenter = context.payload.comment.user.login;
|
||||
|
||||
const { data: permissions } = await github.rest.repos.getCollaboratorPermissionLevel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
username: commenter
|
||||
});
|
||||
|
||||
const hasWriteAccess = permissions.permission === 'write' || permissions.permission === 'admin';
|
||||
|
||||
return (hasWriteAccess && comment.includes(triggerPhrase));
|
||||
result-encoding: json
|
||||
|
||||
- name: Checkout repository
|
||||
if: steps.check_comment.outputs.result == 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: refs/pull/${{ github.event.issue.number }}/head
|
||||
|
||||
- name: Push to tmp-jenkins branch
|
||||
if: steps.check_comment.outputs.result == 'true'
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git checkout -b tmp-jenkins-${{ github.event.issue.number }}
|
||||
GIT_LFS_SKIP_PUSH=1 git push -f origin tmp-jenkins-${{ github.event.issue.number }}
|
||||
46
.github/workflows/mirror_to_gitlab.yaml
vendored
Normal file
46
.github/workflows/mirror_to_gitlab.yaml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Mirror to GitLab
|
||||
|
||||
on:
|
||||
push:
|
||||
delete:
|
||||
workflow_dispatch: # This enables manual triggering
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Wait for other instances of this workflow to conclude
|
||||
uses: softprops/turnstyle@8db075d65b19bf94e6e8687b504db69938dc3c65
|
||||
with:
|
||||
same-branch-only: 'true'
|
||||
abort-after-seconds: 300
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
fetch-depth: 0 # Fetch full history
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.name 'GitHub Action'
|
||||
git config --global user.email 'action@github.com'
|
||||
|
||||
- name: Set up SSH
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Add GitLab public keys
|
||||
run: |
|
||||
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
||||
|
||||
# Note: If you have issues with "push rejected missing LFS" or something make sure you disabled LFS on the GITLAB repo if you intend to use a different LFS repo other than the target repo.
|
||||
- name: Sync and commit changes
|
||||
id: sync-and-commit
|
||||
run: |
|
||||
# Add GitLab remote
|
||||
git remote add gitlab git@gitlab.com:sunnypilot/sunnyhaibin/sunnypilot-github-mirror.git
|
||||
git push -u --force gitlab ${{ github.ref }}
|
||||
8
.github/workflows/repo-maintenance.yaml
vendored
8
.github/workflows/repo-maintenance.yaml
vendored
@@ -46,17 +46,13 @@ jobs:
|
||||
python3 -m ensurepip --upgrade
|
||||
pip3 install uv
|
||||
uv lock --upgrade
|
||||
- name: pre-commit autoupdate
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
pre-commit autoupdate
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83
|
||||
with:
|
||||
author: Vehicle Researcher <user@comma.ai>
|
||||
token: ${{ secrets.ACTIONS_CREATE_PR_PAT }}
|
||||
commit-message: Update Python packages and pre-commit hooks
|
||||
title: '[bot] Update Python packages and pre-commit hooks'
|
||||
commit-message: Update Python packages
|
||||
title: '[bot] Update Python packages'
|
||||
branch: auto-package-updates
|
||||
base: master
|
||||
delete-branch: true
|
||||
|
||||
115
.github/workflows/selfdrive_tests.yaml
vendored
115
.github/workflows/selfdrive_tests.yaml
vendored
@@ -25,7 +25,7 @@ env:
|
||||
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
BUILD: selfdrive/test/docker_build.sh base
|
||||
|
||||
RUN: docker run --shm-size 1G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PRE_COMMIT_HOME=/tmp/pre-commit -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/pre-commit:/tmp/pre-commit -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
|
||||
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
|
||||
|
||||
PYTEST: pytest --continue-on-collection-errors --cov --cov-report=xml --cov-append --durations=0 --durations-min=5 --hypothesis-seed 0 -n logical
|
||||
|
||||
@@ -45,7 +45,6 @@ jobs:
|
||||
- name: Build devel
|
||||
timeout-minutes: 1
|
||||
run: TARGET_DIR=$STRIPPED_DIR release/build_devel.sh
|
||||
- uses: ./.github/workflows/setup-pre-commit
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- name: Check submodules
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
|
||||
@@ -62,20 +61,22 @@ jobs:
|
||||
cd $STRIPPED_DIR
|
||||
${{ env.RUN }} "release/check-dirty.sh && \
|
||||
MAX_EXAMPLES=5 $PYTEST -m 'not slow' selfdrive/car"
|
||||
- name: pre-commit
|
||||
timeout-minutes: 3
|
||||
- name: static analysis
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
cp .pre-commit-config.yaml $STRIPPED_DIR
|
||||
cp pyproject.toml $STRIPPED_DIR
|
||||
cd $STRIPPED_DIR
|
||||
${{ env.RUN }} "unset PYTHONWARNINGS && SKIP=check-added-large-files,check-hooks-apply,check-useless-excludes pre-commit run --all && chmod -R 777 /tmp/pre-commit"
|
||||
${{ env.RUN }} "scripts/lint.sh"
|
||||
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
arch: ${{ fromJson('["x86_64"]') }} # TODO: Re-add build test for aarch64 once we switched to ubuntu-2404
|
||||
runs-on: ubuntu-latest
|
||||
arch: ${{ fromJson(
|
||||
((github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && '["x86_64", "aarch64"]' || '["x86_64"]' ) }}
|
||||
runs-on: ${{ (matrix.arch == 'aarch64') && 'namespace-profile-arm64-2x8' || 'ubuntu-latest' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -84,7 +85,7 @@ jobs:
|
||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
|
||||
run: |
|
||||
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
|
||||
: # (TODO: Re-add this once we test other archs) echo "TARGET_ARCHITECTURE=${{ matrix.arch }}" >> "$GITHUB_ENV"
|
||||
echo "TARGET_ARCHITECTURE=${{ matrix.arch }}" >> "$GITHUB_ENV"
|
||||
$DOCKER_LOGIN
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
with:
|
||||
@@ -93,7 +94,7 @@ jobs:
|
||||
timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 15 || 30) }} # allow more time when we missed the scons cache
|
||||
|
||||
build_mac:
|
||||
name: build macos
|
||||
name: build macOS
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -103,11 +104,36 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: ./tools/mac_setup.sh
|
||||
env:
|
||||
SKIP_PROMPT: 1
|
||||
# package install has DeprecationWarnings
|
||||
PYTHONWARNINGS: default
|
||||
- name: Test openpilot environment
|
||||
run: . .venv/bin/activate && scons -h
|
||||
- run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
|
||||
- name: Getting scons cache
|
||||
uses: 'actions/cache@v4'
|
||||
with:
|
||||
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: Building openpilot
|
||||
run: . .venv/bin/activate && scons -j$(nproc)
|
||||
|
||||
docker_push_multiarch:
|
||||
name: docker push multiarch tag
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
|
||||
needs: [build]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: false
|
||||
- name: Setup docker
|
||||
run: |
|
||||
$DOCKER_LOGIN
|
||||
- name: Merge x64 and arm64 tags
|
||||
run: |
|
||||
export PUSH_IMAGE=true
|
||||
scripts/retry.sh selfdrive/test/docker_tag_multiarch.sh base x86_64 aarch64
|
||||
|
||||
static_analysis:
|
||||
name: static analysis
|
||||
@@ -118,13 +144,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-pre-commit
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- name: Build openpilot
|
||||
run: ${{ env.RUN }} "scons -j$(nproc)"
|
||||
- name: pre-commit
|
||||
timeout-minutes: 4
|
||||
run: ${{ env.RUN }} "unset PYTHONWARNINGS && pre-commit run --all && chmod -R 777 /tmp/pre-commit"
|
||||
- name: static analysis
|
||||
timeout-minutes: 1
|
||||
run: ${{ env.RUN }} "scripts/lint.sh"
|
||||
|
||||
unit_tests:
|
||||
name: unit tests
|
||||
@@ -310,8 +335,10 @@ jobs:
|
||||
})
|
||||
|
||||
create_ui_report:
|
||||
# This job name needs to be the same as UI_JOB_NAME in ui_preview.yaml
|
||||
name: Create UI Report
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -328,55 +355,5 @@ jobs:
|
||||
- name: Upload Test Report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: report-${{ inputs.run_number }}
|
||||
path: selfdrive/ui/tests/test_ui/report_${{ inputs.run_number }}
|
||||
- name: Get changes to selfdrive/ui
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v44
|
||||
with:
|
||||
files: |
|
||||
selfdrive/ui/**
|
||||
- name: Checkout ci-artifacts
|
||||
if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: commaai/ci-artifacts
|
||||
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
|
||||
path: ${{ github.workspace }}/ci-artifacts
|
||||
ref: master
|
||||
- name: Push Screenshots
|
||||
if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }}
|
||||
working-directory: ${{ github.workspace }}/ci-artifacts
|
||||
run: |
|
||||
git checkout -b openpilot/pr-${{ github.event.pull_request.number }}
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
sudo mv ${{ github.workspace }}/selfdrive/ui/tests/test_ui/report/screenshots/* .
|
||||
git add .
|
||||
git commit -m "screenshots for PR #${{ github.event.pull_request.number }}"
|
||||
git push origin openpilot/pr-${{ github.event.pull_request.number }} --force
|
||||
- name: Comment Screenshots on PR
|
||||
if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }}
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
message: |
|
||||
<!-- _(run_id_screenshots **${{ github.run_id }}**)_ -->
|
||||
## UI Screenshots
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/homescreen.png"></td>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/onroad.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/onroad_map.png"></td>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/onroad_sidebar.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/settings_network.png"></td>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/settings_device.png"></td>
|
||||
</tr>
|
||||
</table>
|
||||
comment_tag: run_id_screenshots
|
||||
pr_number: ${{ github.event.pull_request.number }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: report-${{ github.event.number }}
|
||||
path: selfdrive/ui/tests/test_ui/report_1/screenshots
|
||||
|
||||
12
.github/workflows/setup-pre-commit/action.yaml
vendored
12
.github/workflows/setup-pre-commit/action.yaml
vendored
@@ -1,12 +0,0 @@
|
||||
name: 'set up pre-commit environment'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/workflows/auto-cache
|
||||
with:
|
||||
path: .ci_cache/pre-commit
|
||||
key: pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
|
||||
restore-keys: |
|
||||
pre-commit-
|
||||
save: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot' }}
|
||||
4
.github/workflows/stale.yaml
vendored
4
.github/workflows/stale.yaml
vendored
@@ -5,8 +5,8 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DAYS_BEFORE_PR_CLOSE: 3
|
||||
DAYS_BEFORE_PR_STALE: 14
|
||||
DAYS_BEFORE_PR_CLOSE: 2
|
||||
DAYS_BEFORE_PR_STALE: 9
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
8
.github/workflows/tools_tests.yaml
vendored
8
.github/workflows/tools_tests.yaml
vendored
@@ -21,7 +21,7 @@ env:
|
||||
|
||||
BUILD: selfdrive/test/docker_build.sh base
|
||||
|
||||
RUN: docker run --shm-size 1G -v $GITHUB_WORKSPACE:/tmp/openpilot -w /tmp/openpilot -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
|
||||
RUN: docker run --shm-size 2G -v $GITHUB_WORKSPACE:/tmp/openpilot -w /tmp/openpilot -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
|
||||
|
||||
|
||||
jobs:
|
||||
@@ -74,12 +74,6 @@ jobs:
|
||||
scons-${{ runner.arch }}-ubuntu2004
|
||||
- name: Building openpilot
|
||||
run: uv run scons -u -j$(nproc)
|
||||
- name: Saving scons cache
|
||||
uses: actions/cache/save@v4
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
path: /tmp/scons_cache
|
||||
key: scons-${{ runner.arch }}-ubuntu2004-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
|
||||
|
||||
devcontainer:
|
||||
name: devcontainer
|
||||
|
||||
91
.github/workflows/ui_preview.yaml
vendored
Normal file
91
.github/workflows/ui_preview.yaml
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
name: "ui preview"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [assigned, opened, synchronize, reopened, edited]
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- 'selfdrive/ui/**'
|
||||
|
||||
env:
|
||||
UI_JOB_NAME: "Create UI Report"
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
if: github.repository == 'commaai/openpilot'
|
||||
name: preview
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
actions: read
|
||||
steps:
|
||||
- name: Waiting for ui test to start
|
||||
run: sleep 30
|
||||
|
||||
- name: Wait for ui report
|
||||
uses: lewagon/wait-on-check-action@v1.3.4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
check-name: ${{ env.UI_JOB_NAME }}
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
allowed-conclusions: success
|
||||
wait-interval: 20
|
||||
|
||||
- name: Get workflow run ID
|
||||
id: get_run_id
|
||||
run: |
|
||||
echo "run_id=$(curl https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.pull_request.head.sha }}/check-runs | jq -r '.check_runs[] | select(.name == "${{ env.UI_JOB_NAME }}") | .html_url | capture("(?<number>[0-9]+)") | .number')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Checkout ci-artifacts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: commaai/ci-artifacts
|
||||
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
|
||||
path: ${{ github.workspace }}/ci-artifacts
|
||||
ref: master
|
||||
|
||||
- name: Download artifact
|
||||
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: report-${{ github.event.number }}
|
||||
path: ${{ github.workspace }}/ci-artifacts
|
||||
|
||||
- name: Push Screenshots
|
||||
working-directory: ${{ github.workspace }}/ci-artifacts
|
||||
run: |
|
||||
git checkout -b openpilot/pr-${{ github.event.number }}
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
git add ${{ github.workspace }}/ci-artifacts/*
|
||||
git commit -m "screenshots for PR #${{ github.event.number }}"
|
||||
git push origin openpilot/pr-${{ github.event.number }} --force
|
||||
|
||||
- name: Comment Screenshots on PR
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
message: |
|
||||
<!-- _(run_id_screenshots **${{ github.run_id }}**)_ -->
|
||||
## UI Screenshots
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/homescreen.png"></td>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad_map.png"></td>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad_sidebar.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/settings_network.png"></td>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/settings_device.png"></td>
|
||||
</tr>
|
||||
</table>
|
||||
comment_tag: run_id_screenshots
|
||||
pr_number: ${{ github.event.number }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -14,6 +14,9 @@ model2.png
|
||||
a.out
|
||||
.hypothesis
|
||||
|
||||
/docs_site/
|
||||
/docs_sp_site/
|
||||
|
||||
*.dylib
|
||||
*.DSYM
|
||||
*.d
|
||||
@@ -103,4 +106,4 @@ Pipfile
|
||||
### VisualStudioCode Patch ###
|
||||
# Ignore all local history of files
|
||||
.history
|
||||
.ionide
|
||||
.ionide
|
||||
|
||||
@@ -9,6 +9,10 @@ variables:
|
||||
GIT_CONFIG_USER_EMAIL: "gitlab@pipeline.com"
|
||||
GIT_CONFIG_USER_NAME: "Gitlab Pipeline"
|
||||
PUBLIC_REPO_URL: "https://github.com/sunnyhaibin/sunnypilot"
|
||||
BASE_BUILD_NUMER: 3000
|
||||
|
||||
EXTRA_VERSION_IDENTIFIER: "${CI_PIPELINE_IID}"
|
||||
NEW_BRANCH: ${CI_COMMIT_REF_NAME}-prebuilt
|
||||
|
||||
stages:
|
||||
- build
|
||||
@@ -23,7 +27,8 @@ default:
|
||||
- x86
|
||||
|
||||
.default_before_script: &default_before_script
|
||||
- 'export VERSION=$(eval $VERSION)${EXTRA_VERSION_IDENTIFIER}'
|
||||
- 'if [ "$EXTRA_VERSION_IDENTIFIER" = "$CI_PIPELINE_IID" ]; then export EXTRA_VERSION_IDENTIFIER=$((CI_PIPELINE_IID + BASE_BUILD_NUMER)); fi'
|
||||
- 'export VERSION=$(eval $VERSION)-${EXTRA_VERSION_IDENTIFIER}'
|
||||
- 'mkdir -p "${BUILD_DIR}/"'
|
||||
- 'git config --global user.email "${GIT_CONFIG_USER_EMAIL}"'
|
||||
- 'git config --global user.name "${GIT_CONFIG_USER_NAME}"'
|
||||
@@ -34,33 +39,31 @@ workflow: # If running on any branch other than main.
|
||||
# We are an MR, but it's a draft, we won't proceed with anything.
|
||||
- if: '$CI_MERGE_REQUEST_TITLE =~ /^wip:/i || $CI_MERGE_REQUEST_TITLE =~ /^draft:/i'
|
||||
when: never
|
||||
# We are a merge request
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
variables:
|
||||
EXTRA_VERSION_IDENTIFIER: "-${CI_PIPELINE_IID}"
|
||||
NEW_BRANCH: ${CI_COMMIT_REF_NAME}-prebuilt
|
||||
when: always
|
||||
|
||||
# Below are the rules when a commit is done (code has been added to the branch)
|
||||
# Commit to master-dev-c3
|
||||
- if: $CI_COMMIT_REF_NAME == $DEV_C3_SOURCE_BRANCH
|
||||
variables:
|
||||
EXTRA_VERSION_IDENTIFIER: "-${CI_PIPELINE_IID}"
|
||||
EXTRA_VERSION_IDENTIFIER: "${CI_PIPELINE_IID}"
|
||||
NEW_BRANCH: "dev-c3"
|
||||
AUTO_BUILD: true
|
||||
when: always
|
||||
#commit made to main (master)
|
||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||
variables:
|
||||
NEW_BRANCH: "staging-c3"
|
||||
VERSION: 'cat common/version.h | grep COMMA_VERSION | sed -e "s/[^0-9|.]//g"'
|
||||
EXTRA_VERSION_IDENTIFIER: "-staging"
|
||||
EXTRA_VERSION_IDENTIFIER: "staging"
|
||||
AUTO_PUBLISH: true
|
||||
AUTO_BUILD: true
|
||||
when: always
|
||||
# if tag
|
||||
- if: $CI_COMMIT_TAG
|
||||
variables:
|
||||
NEW_BRANCH: "release-c3"
|
||||
VERSION: 'cat common/version.h | grep COMMA_VERSION | sed -e "s/[^0-9|.]//g"'
|
||||
EXTRA_VERSION_IDENTIFIER: "-release"
|
||||
EXTRA_VERSION_IDENTIFIER: "release"
|
||||
AUTO_BUILD: true
|
||||
- when: always
|
||||
|
||||
|
||||
@@ -92,7 +95,7 @@ build:
|
||||
- sed -i '/from .board.jungle import PandaJungle, PandaJungleDFU/s/^/#/' panda/__init__.py # comment panda jungle when prebuilt
|
||||
- scons -j$(nproc) cache_dir=${CI_DIR}/scons_cache --minimal
|
||||
- touch ${BUILD_DIR}/prebuilt
|
||||
- sudo rm -rf ${OUTPUT_DIR}
|
||||
- sudo rm -rf ${OUTPUT_DIR}
|
||||
- mkdir -p ${OUTPUT_DIR}
|
||||
# We first include the paths we want to keep, even if we later will be excluding the other things on those paths
|
||||
- rsync -avm
|
||||
@@ -135,39 +138,16 @@ build:
|
||||
--chown=comma:comma
|
||||
${BUILD_DIR}/ ${OUTPUT_DIR}/
|
||||
after_script:
|
||||
# cleanup build dir after doing work
|
||||
# cleanup build dir after doing work
|
||||
- find $BUILD_DIR/ -mindepth 1 -delete
|
||||
artifacts:
|
||||
paths:
|
||||
- ${OUTPUT_DIR}/
|
||||
tags: [ 'sunnypilot', 'tici' ]
|
||||
rules:
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
when: manual
|
||||
- if: $NEW_BRANCH
|
||||
- if: $AUTO_BUILD
|
||||
when: always
|
||||
|
||||
check no source code sent:
|
||||
image: alpine
|
||||
stage: sanity
|
||||
variables:
|
||||
FORBIDDEN_FILE_EXTENSIONS: "*.a,*.o,*.os,*.pyc,moc_*,*.cc,Jenkinsfile,supercombo.onnx,.sconsign.dblite"
|
||||
FORBIDDEN_DIR_PATTERNS: "*panda/certs,*panda/crypto,*release,*.github,*selfdrive/ui/replay,*__pycache__"
|
||||
REQUIRED_FILE_EXTENSIONS: "*.py,*.json"
|
||||
REQUIRED_DIR_PATTERNS: "*selfdrive/ui,*openpilot"
|
||||
before_script:
|
||||
- apk update && apk upgrade
|
||||
- apk add bash findutils
|
||||
script:
|
||||
- cd ${OUTPUT_DIR}
|
||||
- echo "Checking that we have properly cleaned up"
|
||||
- ${CI_DIR}/sanity_check.sh "$FORBIDDEN_FILE_EXTENSIONS" "$FORBIDDEN_DIR_PATTERNS" true
|
||||
- echo "Checking that our sanity check works and also checking that some required files are indeed found"
|
||||
- ${CI_DIR}/sanity_check.sh "$REQUIRED_FILE_EXTENSIONS" "$REQUIRED_DIR_PATTERNS" false
|
||||
rules:
|
||||
- if: $NEW_BRANCH
|
||||
when: on_success
|
||||
- when: never
|
||||
- when: manual
|
||||
|
||||
.publish_base: &publish_base
|
||||
image: alpine
|
||||
@@ -177,9 +157,6 @@ check no source code sent:
|
||||
needs:
|
||||
- job: build
|
||||
artifacts: true
|
||||
- job: "check no source code sent"
|
||||
artifacts: false
|
||||
optional: false
|
||||
before_script:
|
||||
- 'apk update && apk upgrade'
|
||||
- 'apk add git bash openssh'
|
||||
@@ -196,17 +173,19 @@ check no source code sent:
|
||||
- echo "${GIT_ORIGIN}"
|
||||
- echo "Calling to publish [${CI_DIR}/publish.sh ${CI_PROJECT_DIR} ${OUTPUT_DIR} ${NEW_BRANCH} ${VERSION} ${GIT_ORIGIN}]"
|
||||
- git config --global --add safe.directory ${OUTPUT_DIR}
|
||||
- $CI_DIR/publish.sh "${CI_PROJECT_DIR}" "${OUTPUT_DIR}" "${NEW_BRANCH}" "${VERSION}" "${GIT_ORIGIN}" "${EXTRA_VERSION_IDENTIFIER}"
|
||||
- $CI_DIR/publish.sh "${CI_PROJECT_DIR}" "${OUTPUT_DIR}" "${NEW_BRANCH}" "${VERSION}" "${GIT_ORIGIN}" "-${EXTRA_VERSION_IDENTIFIER}"
|
||||
allow_failure: false
|
||||
|
||||
publish to private gitlab prebuilt:
|
||||
extends: ".publish_base"
|
||||
variables:
|
||||
GIT_ORIGIN: git@gitlab.com:sunnypilot/public/sunnypilot.git
|
||||
GIT_ORIGIN: git@gitlab.com:sunnypilot/public/sunnypilot-prebuilts.git
|
||||
rules:
|
||||
- if: $NEW_BRANCH
|
||||
- if: $AUTO_BUILD
|
||||
when: on_success
|
||||
- when: never
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
when: on_success
|
||||
- when: manual
|
||||
|
||||
publish to public github prebuilt:
|
||||
extends: ".publish_base"
|
||||
@@ -215,9 +194,9 @@ publish to public github prebuilt:
|
||||
GIT_CONFIG_USER_EMAIL: "jason.wen@sunnypilot.ai"
|
||||
GIT_CONFIG_USER_NAME: "Jason Wen"
|
||||
rules:
|
||||
- if: $NEW_BRANCH
|
||||
when: manual
|
||||
- when: never
|
||||
- if: $AUTO_PUBLISH
|
||||
when: on_success
|
||||
- when: manual
|
||||
|
||||
.notify_discord: ¬ify_discord
|
||||
image: alpine
|
||||
@@ -251,6 +230,9 @@ notify new dev build:
|
||||
needs: ["publish to public github prebuilt"] # This notify shall only happen after a publish to github public
|
||||
variables:
|
||||
TEMPLATE: "discord_template_notify_dev_public.json"
|
||||
before_script:
|
||||
- !reference [".notify_discord", "before_script"]
|
||||
- export EXTRA_VERSION_IDENTIFIER=$((CI_PIPELINE_IID + BASE_BUILD_NUMER))
|
||||
rules:
|
||||
- if: $NEW_BRANCH == "dev-c3"
|
||||
variables:
|
||||
|
||||
11
.gitmodules
vendored
11
.gitmodules
vendored
@@ -2,20 +2,17 @@
|
||||
path = panda
|
||||
url = https://github.com/sunnyhaibin/panda.git
|
||||
[submodule "opendbc"]
|
||||
path = opendbc
|
||||
url = https://github.com/sunnyhaibin/opendbc.git
|
||||
path = opendbc_repo
|
||||
url = https://github.com/sunnypilot/opendbc.git
|
||||
[submodule "msgq"]
|
||||
path = msgq_repo
|
||||
url = https://github.com/commaai/msgq.git
|
||||
url = https://github.com/sunnypilot/msgq.git
|
||||
[submodule "rednose_repo"]
|
||||
path = rednose_repo
|
||||
url = https://github.com/commaai/rednose.git
|
||||
[submodule "body"]
|
||||
path = body
|
||||
url = https://github.com/commaai/body.git
|
||||
[submodule "teleoprtc_repo"]
|
||||
path = teleoprtc_repo
|
||||
url = https://github.com/commaai/teleoprtc
|
||||
[submodule "tinygrad"]
|
||||
path = tinygrad_repo
|
||||
url = https://github.com/geohot/tinygrad.git
|
||||
url = https://github.com/tinygrad/tinygrad.git
|
||||
|
||||
41
.importlinter
Normal file
41
.importlinter
Normal file
@@ -0,0 +1,41 @@
|
||||
[importlinter]
|
||||
root_packages =
|
||||
openpilot
|
||||
|
||||
[importlinter:contract:1]
|
||||
name = Forbid imports from openpilot.selfdrive.car to openpilot.system
|
||||
type = forbidden
|
||||
source_modules =
|
||||
openpilot.selfdrive.car
|
||||
forbidden_modules =
|
||||
openpilot.system
|
||||
openpilot.body
|
||||
openpilot.docs
|
||||
openpilot.msgq
|
||||
openpilot.panda
|
||||
openpilot.rednose
|
||||
openpilot.release
|
||||
openpilot.teleoprtc
|
||||
openpilot.tinygrad
|
||||
ignore_imports =
|
||||
openpilot.selfdrive.car.card -> openpilot.common.realtime
|
||||
openpilot.selfdrive.car.card -> openpilot.selfdrive.controls.lib.events
|
||||
openpilot.selfdrive.car.interfaces -> openpilot.selfdrive.controls.lib.events
|
||||
openpilot.selfdrive.car.tests.test_models -> openpilot.tools.lib.logreader
|
||||
openpilot.selfdrive.car.tests.test_models -> openpilot.selfdrive.car.card
|
||||
openpilot.selfdrive.car.tests.test_models -> openpilot.tools.lib.route
|
||||
openpilot.selfdrive.car.tests.test_models -> openpilot.system.hardware.hw
|
||||
openpilot.selfdrive.car.tests.test_models -> openpilot.selfdrive.test.helpers
|
||||
openpilot.selfdrive.car.isotp_parallel_query -> openpilot.common.swaglog
|
||||
openpilot.selfdrive.car.fw_versions -> openpilot.common.swaglog
|
||||
openpilot.selfdrive.car.disable_ecu -> openpilot.common.swaglog
|
||||
openpilot.selfdrive.car.vin -> openpilot.common.swaglog
|
||||
openpilot.selfdrive.car.ecu_addrs -> openpilot.common.swaglog
|
||||
openpilot.selfdrive.car.car_helpers -> openpilot.common.swaglog
|
||||
openpilot.selfdrive.car.car_helpers -> openpilot.system.version
|
||||
openpilot.selfdrive.car.interfaces -> openpilot.selfdrive.controls.lib.drive_helpers
|
||||
openpilot.selfdrive.car.tests.test_car_interfaces -> openpilot.selfdrive.controls.lib.latcontrol_angle
|
||||
openpilot.selfdrive.car.tests.test_car_interfaces -> openpilot.selfdrive.controls.lib.longcontrol
|
||||
openpilot.selfdrive.car.tests.test_car_interfaces -> openpilot.selfdrive.controls.lib.latcontrol_torque
|
||||
openpilot.selfdrive.car.tests.test_car_interfaces -> openpilot.selfdrive.controls.lib.latcontrol_pid
|
||||
unmatched_ignore_imports_alerting = warn
|
||||
@@ -1,98 +0,0 @@
|
||||
exclude: '^(tinygrad_repo)'
|
||||
repos:
|
||||
- repo: meta
|
||||
hooks:
|
||||
- id: check-hooks-apply
|
||||
- id: check-useless-excludes
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.6.0
|
||||
hooks:
|
||||
- id: check-ast
|
||||
exclude: '^(third_party)/'
|
||||
- id: check-json
|
||||
exclude: '.devcontainer/devcontainer.json|.vscode/' # these support JSON with comments
|
||||
- id: check-toml
|
||||
- id: check-xml
|
||||
- id: check-yaml
|
||||
- id: check-merge-conflict
|
||||
- id: check-symlinks
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-shebang-scripts-are-executable
|
||||
- id: check-added-large-files
|
||||
exclude: '(docs/CARS.md)|(uv.lock)|(third_party/acados/include/blasfeo/include/blasfeo_d_kernel.h)'
|
||||
args:
|
||||
- --maxkb=120
|
||||
- --enforce-all
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: codespell
|
||||
exclude: '^(third_party/)|(body/)|(msgq/)|(panda/)|(opendbc/)|(rednose/)|(rednose_repo/)|(teleoprtc/)|(teleoprtc_repo/)|(selfdrive/ui/translations/.*.ts)|(uv.lock)'
|
||||
args:
|
||||
# if you've got a short variable name that's getting flagged, add it here
|
||||
- -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn
|
||||
- --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.5.0
|
||||
hooks:
|
||||
- id: ruff
|
||||
exclude: '^(third_party/)|(msgq/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(teleoprtc/)|(teleoprtc_repo/)'
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy
|
||||
entry: mypy
|
||||
language: system
|
||||
types: [python]
|
||||
args:
|
||||
- --local-partial-types
|
||||
- --explicit-package-bases
|
||||
exclude: '^(third_party/)|(body/)|(msgq/)|(opendbc/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(teleoprtc/)|(teleoprtc_repo/)'
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: cppcheck
|
||||
name: cppcheck
|
||||
entry: cppcheck
|
||||
language: system
|
||||
types: [c++]
|
||||
exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(tools/)|(selfdrive/modeld/thneed/debug/)|(selfdrive/modeld/test/)|(selfdrive/camerad/test/)|(installer/)'
|
||||
args:
|
||||
- --error-exitcode=1
|
||||
- --language=c++
|
||||
- --quiet
|
||||
- --force
|
||||
- -j8
|
||||
- --library=qt
|
||||
- --include=third_party/kaitai/kaitaistream.h
|
||||
- repo: https://github.com/cpplint/cpplint
|
||||
rev: 1.6.1
|
||||
hooks:
|
||||
- id: cpplint
|
||||
exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(generated/)'
|
||||
args:
|
||||
- --quiet
|
||||
- --counting=total
|
||||
- --linelength=240
|
||||
# https://google.github.io/styleguide/cppguide.html
|
||||
# relevant rules are whitelisted, see all options with: cpplint --filter=
|
||||
- --filter=-build,-legal,-readability,-runtime,-whitespace,+build/include_subdir,+build/forward_decl,+build/include_what_you_use,+build/deprecated,+whitespace/comma,+whitespace/line_length,+whitespace/empty_if_body,+whitespace/empty_loop_body,+whitespace/empty_conditional_body,+whitespace/forcolon,+whitespace/parens,+whitespace/semicolon,+whitespace/tab,+readability/braces
|
||||
- repo: https://github.com/MarcoGorelli/cython-lint
|
||||
rev: v0.16.2
|
||||
hooks:
|
||||
- id: cython-lint
|
||||
exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(generated/)'
|
||||
args:
|
||||
- --max-line-length=240
|
||||
- --ignore=E111, E302, E305
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: test_translations
|
||||
name: test translations
|
||||
entry: pytest selfdrive/ui/tests/test_translations.py
|
||||
language: system
|
||||
pass_filenames: false
|
||||
files: '^selfdrive/ui/translations/'
|
||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||
rev: 0.28.6
|
||||
hooks:
|
||||
- id: check-github-workflows
|
||||
77
HOW-TOS.md
Normal file
77
HOW-TOS.md
Normal file
@@ -0,0 +1,77 @@
|
||||
# How Tos
|
||||
This page is a repository of useful how-tos as a supplement for additional information.
|
||||
|
||||
Table of Contents
|
||||
=======================
|
||||
|
||||
* [Radar Tracks](#Radar-Tracks)
|
||||
* [Enable Radar Tracks](#-Enable-Radar-Tracks)
|
||||
* [Enable Mapbox Navigation](#-Enable-Mapbox-Navigation)
|
||||
|
||||
---
|
||||
|
||||
<details><summary><h3>📡 Radar Tracks</h3></summary>
|
||||
|
||||
Radar tracks can now be enabled manually on applicable cars through SSH thanks to [@greghogan](https://github.com/greghogan) and [@pd0wm](https://github.com/pd0wm).
|
||||
|
||||
Some Hyundai radars can be reconfigured to output (debug) radar points on bus 1.
|
||||
Reconfiguration is done over UDS by reading/writing to 0x0142 using the Read/Write Data By Identifier
|
||||
endpoints (0x22 & 0x2E). This script checks your radar firmware version against a list of known
|
||||
firmware versions. If you want to try on a new radar, make sure to note the default config value
|
||||
in case it is different from the other radars and you need to revert the changes.
|
||||
After changing the config the car should not show any faults when openpilot is not running.
|
||||
These config changes are persistent across car reboots. You need to run this script again
|
||||
to go back to the default values.
|
||||
|
||||
**USE AT YOUR OWN RISK!** Stock system safety features, like AEB and FCW, might be affected by these changes.
|
||||
|
||||
**How radar points can be used along with vision:**
|
||||
* Current OP long policy is identify with vision first, if vision sees a vehicle match it to a radar point. If vision sees nothing you get a false negative and no lead car detection. (Source: [Hubblesphere#7894 from comma.ai community Discord](https://discord.com/channels/469524606043160576/872899198738104330/872913890793635872))
|
||||
|
||||
### 🚨 Enable Radar Tracks
|
||||
|
||||
***(EXPERIMENTAL, as of January 1st, 2022)***
|
||||
|
||||
***(Only applicable to some Hyundai, Kia, and Genesis cars, as of January 1st, 2022)***
|
||||
|
||||
*(Base on version 0.8.12 [`devel`](https://github.com/commaai/openpilot/tree/devel))*
|
||||
|
||||
**USE AT YOUR OWN RISK!** Stock system safety features, like AEB and FCW, might be affected by these changes.
|
||||
|
||||
1. Ensure the car is at the `OFF` ignition position.
|
||||
2. Connect your compatible comma device (EON, C2, C3) to the car. comma device power should be ON.
|
||||
3. Use a laptop or applicable device to connect to your comma device via SSH. (Tips: Instructions to SSH in [HERE](https://github.com/commaai/openpilot/wiki/SSH))
|
||||
4. In the SSH terminal after successfully connected to your comma device, execute the following commands:
|
||||
1. `pkill -f openpilot`
|
||||
2. `python /data/openpilot/selfdrive/debug/hyundai_enable_radar_points.py`
|
||||
3. Follow the instructions in the script:
|
||||
* `Power on the vehicle keeping the engine off (press start button twice) then type OK to continue`.
|
||||
* If successful, the following message should appear: `[DONE]. Restart your vehicle and ensure there are no faults`.
|
||||
* If the script did not run successfully, reach out to the community in [Sunnyhaibin's Openpilot Discord Server](https://discord.gg/wRW3meAgtx) or `#hyundai-kia-genesis channel` on [commaai community Discord Server](https://discord.comma.ai) for assistance.
|
||||
4. Reboot your comma device:
|
||||
1. C3: `sudo reboot`
|
||||
2. C2 or EON: `reboot`
|
||||
5. Once your comma device is rebooted, start your car with engine on (with or without comma device connected). Ensure that there are no faults from the car. If there are faults, reach out to the community in [Sunnyhaibin's Openpilot Discord Server](https://discord.gg/wRW3meAgtx) or `#hyundai-kia-genesis channel` on [commaai community Discord Server](https://discord.comma.ai) for assistance.
|
||||
6. Go for a quick drive and drive behind a lead car with varied follow distance. Then, come back and allow the drive to upload its `rlogs` in [comma Connect](https://connect.comma.ai).
|
||||
7. With all `rlogs` uploaded, open the drive in Cabana from [comma Connect](https://connect.comma.ai). Load DBC -> `hyundai_kia_mando_front_radar.dbc`, then search `RADAR_TRACK_50x` (`x` could be anything), open any of them, and look at `LONG_DIST`.
|
||||
8. If the radar tracks data is relevant with the lead car you drove behind, you are done! Your car now have radar tracks enabled.
|
||||
</details>
|
||||
|
||||
<details><summary><h3>🗺 Enable Mapbox Navigation</h3></summary>
|
||||
|
||||
1) Create a free mapbox account. Account will ask for a credit card for verification. You will not be charged for the free tier.
|
||||
2) On the Dashboard, you will see a section called Access Tokens. Click `Create a Token`. Name it whatever you like. Set the scopes to allow everything for both Public and Secret. Copy both of these keys. **YOU WON'T BE ABLE TO ACCESS THE SECRET KEY AFTER THIS WINDOW.**
|
||||
3) Once rebooted, connect your C3 to a network with internet access and find the C3’s IP address.
|
||||
4) In a browser, navigate to that IP with **port 8082** (i.e 192.168.1.69:8082). You should be greeted with the Comma logo and a public key input field.
|
||||
5) Paste your Public token (pk.xx), click enter, paste your Secret key (sk.xx), click enter. You can now search for places. This page will be available at your devices’s IP address/port 8082 to search for destinations.
|
||||
6) To set Home and Work addresses, search for a place, select Home/Work from the dropdown and click Navigate. For non-Home/Work destinations, select Recent Places.<br>*At this time, it is not possible to search directly on the C3.*
|
||||
|
||||
**TIPS:**
|
||||
- If your C3 is showing a black screen that says “Map Loading”, performing a reboot via the UI should fix it.
|
||||
- If your phone can create a Hotspot, you are able to connect the C3 to your phone hotspot and use your phone browser to search for places.
|
||||
- In the Navigation panel on the C3, you can select Home, Work, and from a list of Recent Places you have navigated to without needing a browser (assuming the C3 is connected to the internet.)
|
||||
|
||||
**IMPORTANT NOTE:** Your C3 will require an active internet connection to download map data, generate driving directions, and ETA. Once map data and directions are downloaded, it *is* possible to use it offline, however nothing will update (such as new driving direction after a missed turn, updated ETA, map data further into your drive etc.)
|
||||
|
||||
***NAVIGATION NOTE:** At this time, mapbox does not support alphanumeric addresses (i.e W123N1234 Main St). There is currently no known workaround for this.*
|
||||
</details>
|
||||
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -83,7 +83,7 @@ def deviceStage(String stageName, String deviceType, List extra_env, def steps)
|
||||
|
||||
lock(resource: "", label: deviceType, inversePrecedence: true, variable: 'device_ip', quantity: 1, resourceSelectStrategy: 'random') {
|
||||
docker.image('ghcr.io/commaai/alpine-ssh').inside('--user=root') {
|
||||
timeout(time: 20, unit: 'MINUTES') {
|
||||
timeout(time: 35, unit: 'MINUTES') {
|
||||
retry (3) {
|
||||
device(device_ip, "git checkout", extra + "\n" + readFile("selfdrive/test/setup_device_ci.sh"))
|
||||
}
|
||||
|
||||
53
README.md
53
README.md
@@ -48,7 +48,6 @@ Join the official sunnypilot Discord server to stay up to date with all the late
|
||||
To use sunnypilot in a car, you need the following:
|
||||
* A supported device to run this software
|
||||
* a [comma three](https://comma.ai/shop/products/three), or
|
||||
* a comma two (only with older versions below 0.8.13)
|
||||
* This software
|
||||
* One of [the 250+ supported cars](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). We support Honda, Toyota, Hyundai, Nissan, Kia, Chrysler, Lexus, Acura, Audi, VW, Ford and more. If your car is not supported but has adaptive cruise control and lane-keeping assist, it's likely able to run sunnypilot.
|
||||
* A [car harness](https://comma.ai/shop/products/car-harness) to connect to your car
|
||||
@@ -115,40 +114,12 @@ Please refer to [Recommended Branches](#-recommended-branches) to find your pref
|
||||
|
||||
Requires further assistance with software installation? Join the [sunnypilot Discord server](https://discord.sunnypilot.com) and message us in the `#installation-help` channel.
|
||||
|
||||
comma two
|
||||
------
|
||||
|
||||
1. [Factory reset/uninstall](https://github.com/commaai/openpilot/wiki/FAQ#how-can-i-reset-the-device) the previous software if you have another software/fork installed.
|
||||
2. After factory reset/uninstall and upon reboot, select `Custom Software` when given the option.
|
||||
3. Input the installation URL per [Recommended Branches](#-recommended-branches). Example: ```https://smiskol.com/fork/sunnyhaibin/0.8.12-4-prod```
|
||||
4. Complete the rest of the installation following the onscreen instructions.
|
||||
|
||||
Requires further assistance with software installation? Join the [sunnypilot Discord server](https://discord.sunnypilot.com) and message us in the `#installation-help` channel.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>SSH (More Versatile)</summary>
|
||||
<br>
|
||||
|
||||
Prerequisites: [How to SSH](https://github.com/commaai/openpilot/wiki/SSH)
|
||||
|
||||
If you are looking to install sunnypilot via SSH, run the following command in an SSH terminal after connecting to your device:
|
||||
|
||||
comma three:
|
||||
------
|
||||
* [`release-c3`](https://github.com/sunnyhaibin/openpilot/tree/release-c3):
|
||||
|
||||
```
|
||||
cd /data; rm -rf ./openpilot; git clone -b release-c3 --recurse-submodules https://github.com/sunnyhaibin/sunnypilot.git openpilot; cd openpilot; sudo reboot
|
||||
```
|
||||
|
||||
comma two:
|
||||
------
|
||||
* [`0.8.12-prod-personal-hkg`](https://github.com/sunnyhaibin/openpilot/tree/0.8.12-prod-personal-hkg):
|
||||
|
||||
```
|
||||
cd /data; rm -rf ./openpilot; git clone -b 0.8.12-prod-personal-hkg --recurse-submodules https://github.com/sunnyhaibin/sunnypilot.git openpilot; cd openpilot; sudo reboot
|
||||
cd /data && rm -rf ./openpilot && git clone -b release-c3 --recurse-submodules https://github.com/sunnyhaibin/sunnypilot.git openpilot && cd openpilot && sudo reboot
|
||||
```
|
||||
|
||||
After running the command to install the desired branch, your comma device should reboot.
|
||||
@@ -170,16 +141,16 @@ After running the command to install the desired branch, your comma device shoul
|
||||
* Speed Limit Control (SLC) - Set speed limit based on map data or car interface (if applicable)
|
||||
* HKG only: Highway Driving Assist (HDA) status integration - Use cars native speed sign detection to set desired speed (on applicable HKG cars only)
|
||||
- [**Gap Adjust Cruise (GAC)**](#gap-adjust-cruise) - Allow `GAP`/`INTERVAL`/`DISTANCE` button on the steering wheel or on-screen button to adjust the follow distance from the lead car. See table below for options
|
||||
- [**Quiet Drive 🤫**](#-quiet-drive) - Toggle to mute all notification sounds (excluding driver safety warnings)
|
||||
- [**Auto Lane Change Timer**](#Auto-Lane-Change-Timer) - Set a timer to delay the auto lane change operation when the blinker is used. No nudge on the steering wheel is required to auto lane change if a timer is set
|
||||
- [**Force Car Recognition (FCR)**](#Force-Car-Recognition-) - Use a selector to force your car to be recognized by sunnypilot
|
||||
- [**Fix sunnypilot No Offroad**](#Fix-sunnypilot-No-Offroad) - Enforce sunnypilot to go offroad and turns off after shutting down the car. This feature fixes non-official devices running sunnypilot without comma power
|
||||
- [**Enable ACC+MADS with RES+/SET-**](#Enable-ACC+MADS-with-RES+/SET-) - Engage both ACC and MADS with a single press of RES+ or SET- button
|
||||
- [**Offline OSM Maps**](#Offline-OSM-Maps) - OSM database can now be downloaded locally for offline use[^2]. This enables offline SLC, V-TSC and M-TSC. Currently available for US South, US West, US Northeast, Florida, Taiwan, South Africa and New Zealand
|
||||
- [**Various Live Tuning**](#Various-Live-Tuning) - Ability to tailor your driving experience on the fly:
|
||||
* Enforce Torque Lateral Control - Use the newest [torque controller](https://blog.comma.ai/0815release/#torque-controller) for all vehicles.
|
||||
* Torque Lateral Control Live Tune - Ability to adjust the torque controller’s `FRICTION` and `LAT_ACCEL_FACTOR` values to suit your vehicle.
|
||||
* Torque Lateral Controller Self-Tune - Enable automatic turning for the Torque controller.
|
||||
- [**Quiet Drive 🤫**](#-quiet-drive) - Toggle to mute all notification sounds (excluding driver safety warnings)
|
||||
- [**Auto Lane Change Timer**](#Auto-Lane-Change-Timer) - Set a timer to delay the auto lane change operation when the blinker is used. No nudge on the steering wheel is required to auto lane change if a timer is set
|
||||
- [**Force Car Recognition (FCR)**](#Force-Car-Recognition-) - Use a selector to force your car to be recognized by sunnypilot
|
||||
- [**Fix sunnypilot No Offroad**](#Fix-sunnypilot-No-Offroad) - Enforce sunnypilot to go offroad and turns off after shutting down the car. This feature fixes non-official devices running sunnypilot without comma power
|
||||
- [**Enable ACC+MADS with RES+/SET-**](#Enable-ACC+MADS-with-RES+/SET-) - Engage both ACC and MADS with a single press of RES+ or SET- button
|
||||
- [**Offline OSM Maps**](#Offline-OSM-Maps) - OSM database can now be downloaded locally for offline use[^2]. This enables offline SLC, V-TSC and M-TSC. Currently available for US South, US West, US Northeast, Florida, Taiwan, South Africa and New Zealand
|
||||
- [**Various Live Tuning**](#Various-Live-Tuning) - Ability to tailor your driving experience on the fly:
|
||||
* Enforce Torque Lateral Control - Use the newest [torque controller](https://blog.comma.ai/0815release/#torque-controller) for all vehicles.
|
||||
* Torque Lateral Control Live Tune - Ability to adjust the torque controller’s `FRICTION` and `LAT_ACCEL_FACTOR` values to suit your vehicle.
|
||||
* Torque Lateral Controller Self-Tune - Enable automatic turning for the Torque controller.
|
||||
|
||||
### Visual Enhancements
|
||||
* **M.A.D.S Status Icon** - Dedicated icon to display M.A.D.S. engagement status
|
||||
@@ -355,7 +326,7 @@ Example:
|
||||
|
||||
---
|
||||
|
||||
How-To instructions can be found in [HOW-TOS.md](https://github.com/sunnyhaibin/openpilot/blob/(!)README/HOW-TOS.md).
|
||||
How-To instructions can be found in [HOW-TOS.md](HOW-TOS.md).
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
11
SConstruct
11
SConstruct
@@ -110,7 +110,6 @@ if arch == "larch64":
|
||||
|
||||
libpath = [
|
||||
"/usr/local/lib",
|
||||
"/usr/lib",
|
||||
"/system/vendor/lib64",
|
||||
f"#third_party/acados/{arch}/lib",
|
||||
]
|
||||
@@ -178,7 +177,6 @@ if arch != "Darwin":
|
||||
ldflags += ["-Wl,--as-needed", "-Wl,--no-undefined"]
|
||||
|
||||
# Enable swaglog include in submodules
|
||||
cflags += ['-DSWAGLOG="\\"common/swaglog.h\\""']
|
||||
cxxflags += ['-DSWAGLOG="\\"common/swaglog.h\\""']
|
||||
|
||||
if not GetOption('stock_ui'):
|
||||
@@ -218,7 +216,6 @@ env = Environment(
|
||||
"#third_party/json11",
|
||||
"#third_party/linux/include",
|
||||
"#third_party/snpe/include",
|
||||
"#third_party/qrcode",
|
||||
"#third_party",
|
||||
"#cereal",
|
||||
"#msgq",
|
||||
@@ -246,7 +243,7 @@ env = Environment(
|
||||
COMPILATIONDB_USE_ABSPATH=True,
|
||||
REDNOSE_ROOT="#",
|
||||
tools=["default", "cython", "compilation_db", "rednose_filter"],
|
||||
toolpath=["#rednose_repo/site_scons/site_tools"],
|
||||
toolpath=["#site_scons/site_tools", "#rednose_repo/site_scons/site_tools"],
|
||||
)
|
||||
|
||||
if arch == "Darwin":
|
||||
@@ -286,7 +283,8 @@ if arch == "Darwin":
|
||||
else:
|
||||
envCython["LINKFLAGS"] = ["-pthread", "-shared"]
|
||||
|
||||
Export('envCython')
|
||||
np_version = SCons.Script.Value(np.__version__)
|
||||
Export('envCython', 'np_version')
|
||||
|
||||
# Qt build environment
|
||||
qt_env = env.Clone()
|
||||
@@ -330,7 +328,7 @@ try:
|
||||
except SCons.Errors.UserError:
|
||||
qt_env.Tool('qt')
|
||||
|
||||
qt_env['CPPPATH'] += qt_dirs# + ["#selfdrive/ui/qt/"]
|
||||
qt_env['CPPPATH'] += qt_dirs + ["#third_party/qrcode"]
|
||||
qt_flags = [
|
||||
"-D_REENTRANT",
|
||||
"-DQT_NO_DEBUG",
|
||||
@@ -379,7 +377,6 @@ Export('messaging')
|
||||
|
||||
# Build other submodules
|
||||
SConscript([
|
||||
'body/board/SConscript',
|
||||
'opendbc/can/SConscript',
|
||||
'panda/SConscript',
|
||||
])
|
||||
|
||||
1
body
1
body
Submodule body deleted from 0e74db67ae
@@ -137,8 +137,6 @@ struct FrameData {
|
||||
requestId @28 :UInt32;
|
||||
encodeId @1 :UInt32;
|
||||
|
||||
frameType @7 :FrameType;
|
||||
|
||||
# Timestamps
|
||||
timestampEof @2 :UInt64;
|
||||
timestampSof @8 :UInt64;
|
||||
@@ -158,7 +156,7 @@ struct FrameData {
|
||||
|
||||
temperaturesC @24 :List(Float32);
|
||||
|
||||
enum FrameType {
|
||||
enum FrameTypeDEPRECATED {
|
||||
unknown @0;
|
||||
neo @1;
|
||||
chffrAndroid @2;
|
||||
@@ -175,6 +173,7 @@ struct FrameData {
|
||||
|
||||
frameLengthDEPRECATED @3 :Int32;
|
||||
globalGainDEPRECATED @5 :Int32;
|
||||
frameTypeDEPRECATED @7 :FrameTypeDEPRECATED;
|
||||
androidCaptureResultDEPRECATED @9 :AndroidCaptureResult;
|
||||
lensPosDEPRECATED @11 :Int32;
|
||||
lensSagDEPRECATED @12 :Float32;
|
||||
@@ -337,9 +336,9 @@ enum LaneChangeDirection {
|
||||
|
||||
struct CanData {
|
||||
address @0 :UInt32;
|
||||
busTime @1 :UInt16;
|
||||
dat @2 :Data;
|
||||
src @3 :UInt8;
|
||||
busTimeDEPRECATED @1 :UInt16;
|
||||
}
|
||||
|
||||
struct DeviceState @0xa4d8b5af2aa492eb {
|
||||
@@ -1252,6 +1251,38 @@ struct LiveLocationKalman {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct LivePose {
|
||||
# More info on reference frames:
|
||||
# https://github.com/commaai/openpilot/tree/master/common/transformations
|
||||
orientationNED @0 :XYZMeasurement;
|
||||
velocityDevice @1 :XYZMeasurement;
|
||||
accelerationDevice @2 :XYZMeasurement;
|
||||
angularVelocityDevice @3 :XYZMeasurement;
|
||||
|
||||
inputsOK @4 :Bool = false;
|
||||
posenetOK @5 :Bool = false;
|
||||
sensorsOK @6 :Bool = false;
|
||||
|
||||
filterState @7 :FilterState;
|
||||
|
||||
struct XYZMeasurement {
|
||||
x @0 :Float32;
|
||||
y @1 :Float32;
|
||||
z @2 :Float32;
|
||||
xStd @3 :Float32;
|
||||
yStd @4 :Float32;
|
||||
zStd @5 :Float32;
|
||||
valid @6 :Bool;
|
||||
}
|
||||
|
||||
struct FilterState {
|
||||
value @0 : List(Float64);
|
||||
std @1 : List(Float64);
|
||||
valid @2 : Bool;
|
||||
}
|
||||
}
|
||||
|
||||
struct ProcLog {
|
||||
cpuTimes @0 :List(CPUTimes);
|
||||
mem @1 :Mem;
|
||||
@@ -2293,6 +2324,7 @@ struct Event {
|
||||
carParams @69: Car.CarParams;
|
||||
driverMonitoringState @71: DriverMonitoringState;
|
||||
liveLocationKalman @72 :LiveLocationKalman;
|
||||
livePose @129 :LivePose;
|
||||
modelV2 @75 :ModelDataV2;
|
||||
drivingModelData @128 :DrivingModelData;
|
||||
driverStateV2 @92 :DriverStateV2;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
from msgq.ipc_pyx import Context, Poller, SubSocket, PubSocket, SocketEventHandle, toggle_fake_events, \
|
||||
set_fake_prefix, get_fake_prefix, delete_fake_prefix, wait_for_one_event
|
||||
from msgq.ipc_pyx import MultiplePublishersError, IpcError
|
||||
from msgq import fake_event_handle, pub_sock, sub_sock, drain_sock_raw, context
|
||||
from msgq import fake_event_handle, pub_sock, sub_sock, drain_sock_raw
|
||||
import msgq
|
||||
|
||||
import os
|
||||
import capnp
|
||||
@@ -17,8 +18,12 @@ from cereal.services import SERVICE_LIST
|
||||
NO_TRAVERSAL_LIMIT = 2**64-1
|
||||
|
||||
|
||||
def log_from_bytes(dat: bytes) -> capnp.lib.capnp._DynamicStructReader:
|
||||
with log.Event.from_bytes(dat, traversal_limit_in_words=NO_TRAVERSAL_LIMIT) as msg:
|
||||
def reset_context():
|
||||
msgq.context = Context()
|
||||
|
||||
|
||||
def log_from_bytes(dat: bytes, struct: capnp.lib.capnp._StructModule = log.Event) -> capnp.lib.capnp._DynamicStructReader:
|
||||
with struct.from_bytes(dat, traversal_limit_in_words=NO_TRAVERSAL_LIMIT) as msg:
|
||||
return msg
|
||||
|
||||
|
||||
|
||||
52
cereal/messaging/tests/test_messaging.py
Executable file → Normal file
52
cereal/messaging/tests/test_messaging.py
Executable file → Normal file
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import capnp
|
||||
import multiprocessing
|
||||
@@ -6,8 +5,8 @@ import numbers
|
||||
import random
|
||||
import threading
|
||||
import time
|
||||
import unittest
|
||||
from parameterized import parameterized
|
||||
import pytest
|
||||
|
||||
from cereal import log, car
|
||||
import cereal.messaging as messaging
|
||||
@@ -28,12 +27,6 @@ def zmq_sleep(t=1):
|
||||
if "ZMQ" in os.environ:
|
||||
time.sleep(t)
|
||||
|
||||
def zmq_expected_failure(func):
|
||||
if "ZMQ" in os.environ:
|
||||
return unittest.expectedFailure(func)
|
||||
else:
|
||||
return func
|
||||
|
||||
|
||||
# TODO: this should take any capnp struct and returrn a msg with random populated data
|
||||
def random_carstate():
|
||||
@@ -58,12 +51,12 @@ def delayed_send(delay, sock, dat):
|
||||
threading.Timer(delay, send_func).start()
|
||||
|
||||
|
||||
class TestMessaging(unittest.TestCase):
|
||||
class TestMessaging:
|
||||
def setUp(self):
|
||||
# TODO: ZMQ tests are too slow; all sleeps will need to be
|
||||
# replaced with logic to block on the necessary condition
|
||||
if "ZMQ" in os.environ:
|
||||
raise unittest.SkipTest
|
||||
pytest.skip()
|
||||
|
||||
# ZMQ pub socket takes too long to die
|
||||
# sleep to prevent multiple publishers error between tests
|
||||
@@ -75,9 +68,9 @@ class TestMessaging(unittest.TestCase):
|
||||
msg = messaging.new_message(evt)
|
||||
except capnp.lib.capnp.KjException:
|
||||
msg = messaging.new_message(evt, random.randrange(200))
|
||||
self.assertLess(time.monotonic() - msg.logMonoTime, 0.1)
|
||||
self.assertFalse(msg.valid)
|
||||
self.assertEqual(evt, msg.which())
|
||||
assert (time.monotonic() - msg.logMonoTime) < 0.1
|
||||
assert not msg.valid
|
||||
assert evt == msg.which()
|
||||
|
||||
@parameterized.expand(events)
|
||||
def test_pub_sock(self, evt):
|
||||
@@ -99,8 +92,8 @@ class TestMessaging(unittest.TestCase):
|
||||
|
||||
# no wait and no msgs in queue
|
||||
msgs = func(sub_sock)
|
||||
self.assertIsInstance(msgs, list)
|
||||
self.assertEqual(len(msgs), 0)
|
||||
assert isinstance(msgs, list)
|
||||
assert len(msgs) == 0
|
||||
|
||||
# no wait but msgs are queued up
|
||||
num_msgs = random.randrange(3, 10)
|
||||
@@ -108,9 +101,9 @@ class TestMessaging(unittest.TestCase):
|
||||
pub_sock.send(messaging.new_message(sock).to_bytes())
|
||||
time.sleep(0.1)
|
||||
msgs = func(sub_sock)
|
||||
self.assertIsInstance(msgs, list)
|
||||
self.assertTrue(all(isinstance(msg, expected_type) for msg in msgs))
|
||||
self.assertEqual(len(msgs), num_msgs)
|
||||
assert isinstance(msgs, list)
|
||||
assert all(isinstance(msg, expected_type) for msg in msgs)
|
||||
assert len(msgs) == num_msgs
|
||||
|
||||
def test_recv_sock(self):
|
||||
sock = "carState"
|
||||
@@ -120,14 +113,14 @@ class TestMessaging(unittest.TestCase):
|
||||
|
||||
# no wait and no msg in queue, socket should timeout
|
||||
recvd = messaging.recv_sock(sub_sock)
|
||||
self.assertTrue(recvd is None)
|
||||
assert recvd is None
|
||||
|
||||
# no wait and one msg in queue
|
||||
msg = random_carstate()
|
||||
pub_sock.send(msg.to_bytes())
|
||||
time.sleep(0.01)
|
||||
recvd = messaging.recv_sock(sub_sock)
|
||||
self.assertIsInstance(recvd, capnp._DynamicStructReader)
|
||||
assert isinstance(recvd, capnp._DynamicStructReader)
|
||||
# https://github.com/python/mypy/issues/13038
|
||||
assert_carstate(msg.carState, recvd.carState)
|
||||
|
||||
@@ -139,16 +132,16 @@ class TestMessaging(unittest.TestCase):
|
||||
|
||||
# no msg in queue, socket should timeout
|
||||
recvd = messaging.recv_one(sub_sock)
|
||||
self.assertTrue(recvd is None)
|
||||
assert recvd is None
|
||||
|
||||
# one msg in queue
|
||||
msg = random_carstate()
|
||||
pub_sock.send(msg.to_bytes())
|
||||
recvd = messaging.recv_one(sub_sock)
|
||||
self.assertIsInstance(recvd, capnp._DynamicStructReader)
|
||||
assert isinstance(recvd, capnp._DynamicStructReader)
|
||||
assert_carstate(msg.carState, recvd.carState)
|
||||
|
||||
@zmq_expected_failure
|
||||
@pytest.mark.xfail(condition="ZMQ" in os.environ, reason='ZMQ detected')
|
||||
def test_recv_one_or_none(self):
|
||||
sock = "carState"
|
||||
pub_sock = messaging.pub_sock(sock)
|
||||
@@ -157,13 +150,13 @@ class TestMessaging(unittest.TestCase):
|
||||
|
||||
# no msg in queue, socket shouldn't block
|
||||
recvd = messaging.recv_one_or_none(sub_sock)
|
||||
self.assertTrue(recvd is None)
|
||||
assert recvd is None
|
||||
|
||||
# one msg in queue
|
||||
msg = random_carstate()
|
||||
pub_sock.send(msg.to_bytes())
|
||||
recvd = messaging.recv_one_or_none(sub_sock)
|
||||
self.assertIsInstance(recvd, capnp._DynamicStructReader)
|
||||
assert isinstance(recvd, capnp._DynamicStructReader)
|
||||
assert_carstate(msg.carState, recvd.carState)
|
||||
|
||||
def test_recv_one_retry(self):
|
||||
@@ -179,7 +172,7 @@ class TestMessaging(unittest.TestCase):
|
||||
p = multiprocessing.Process(target=messaging.recv_one_retry, args=(sub_sock,))
|
||||
p.start()
|
||||
time.sleep(sock_timeout*15)
|
||||
self.assertTrue(p.is_alive())
|
||||
assert p.is_alive()
|
||||
p.terminate()
|
||||
|
||||
# wait 15 socket timeouts before sending
|
||||
@@ -187,9 +180,6 @@ class TestMessaging(unittest.TestCase):
|
||||
delayed_send(sock_timeout*15, pub_sock, msg.to_bytes())
|
||||
start_time = time.monotonic()
|
||||
recvd = messaging.recv_one_retry(sub_sock)
|
||||
self.assertGreaterEqual(time.monotonic() - start_time, sock_timeout*15)
|
||||
self.assertIsInstance(recvd, capnp._DynamicStructReader)
|
||||
assert (time.monotonic() - start_time) >= sock_timeout*15
|
||||
assert isinstance(recvd, capnp._DynamicStructReader)
|
||||
assert_carstate(msg.carState, recvd.carState)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
44
cereal/messaging/tests/test_pub_sub_master.py
Executable file → Normal file
44
cereal/messaging/tests/test_pub_sub_master.py
Executable file → Normal file
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import random
|
||||
import time
|
||||
from typing import Sized, cast
|
||||
import unittest
|
||||
|
||||
import cereal.messaging as messaging
|
||||
from cereal.messaging.tests.test_messaging import events, random_sock, random_socks, \
|
||||
@@ -10,9 +8,9 @@ from cereal.messaging.tests.test_messaging import events, random_sock, random_so
|
||||
zmq_sleep
|
||||
|
||||
|
||||
class TestSubMaster(unittest.TestCase):
|
||||
class TestSubMaster:
|
||||
|
||||
def setUp(self):
|
||||
def setup_method(self):
|
||||
# ZMQ pub socket takes too long to die
|
||||
# sleep to prevent multiple publishers error between tests
|
||||
zmq_sleep(3)
|
||||
@@ -21,21 +19,21 @@ class TestSubMaster(unittest.TestCase):
|
||||
sm = messaging.SubMaster(events)
|
||||
for p in [sm.updated, sm.recv_time, sm.recv_frame, sm.alive,
|
||||
sm.sock, sm.data, sm.logMonoTime, sm.valid]:
|
||||
self.assertEqual(len(cast(Sized, p)), len(events))
|
||||
assert len(cast(Sized, p)) == len(events)
|
||||
|
||||
def test_init_state(self):
|
||||
socks = random_socks()
|
||||
sm = messaging.SubMaster(socks)
|
||||
self.assertEqual(sm.frame, -1)
|
||||
self.assertFalse(any(sm.updated.values()))
|
||||
self.assertFalse(any(sm.alive.values()))
|
||||
self.assertTrue(all(t == 0. for t in sm.recv_time.values()))
|
||||
self.assertTrue(all(f == 0 for f in sm.recv_frame.values()))
|
||||
self.assertTrue(all(t == 0 for t in sm.logMonoTime.values()))
|
||||
assert sm.frame == -1
|
||||
assert not any(sm.updated.values())
|
||||
assert not any(sm.alive.values())
|
||||
assert all(t == 0. for t in sm.recv_time.values())
|
||||
assert all(f == 0 for f in sm.recv_frame.values())
|
||||
assert all(t == 0 for t in sm.logMonoTime.values())
|
||||
|
||||
for p in [sm.updated, sm.recv_time, sm.recv_frame, sm.alive,
|
||||
sm.sock, sm.data, sm.logMonoTime, sm.valid]:
|
||||
self.assertEqual(len(cast(Sized, p)), len(socks))
|
||||
assert len(cast(Sized, p)) == len(socks)
|
||||
|
||||
def test_getitem(self):
|
||||
sock = "carState"
|
||||
@@ -59,8 +57,8 @@ class TestSubMaster(unittest.TestCase):
|
||||
msg = messaging.new_message(sock)
|
||||
pub_sock.send(msg.to_bytes())
|
||||
sm.update(1000)
|
||||
self.assertEqual(sm.frame, i)
|
||||
self.assertTrue(all(sm.updated.values()))
|
||||
assert sm.frame == i
|
||||
assert all(sm.updated.values())
|
||||
|
||||
def test_update_timeout(self):
|
||||
sock = random_sock()
|
||||
@@ -70,9 +68,9 @@ class TestSubMaster(unittest.TestCase):
|
||||
start_time = time.monotonic()
|
||||
sm.update(timeout)
|
||||
t = time.monotonic() - start_time
|
||||
self.assertGreaterEqual(t, timeout/1000.)
|
||||
self.assertLess(t, 5)
|
||||
self.assertFalse(any(sm.updated.values()))
|
||||
assert t >= timeout/1000.
|
||||
assert t < 5
|
||||
assert not any(sm.updated.values())
|
||||
|
||||
def test_avg_frequency_checks(self):
|
||||
for poll in (True, False):
|
||||
@@ -118,12 +116,12 @@ class TestSubMaster(unittest.TestCase):
|
||||
pub_sock.send(msg.to_bytes())
|
||||
time.sleep(0.01)
|
||||
sm.update(1000)
|
||||
self.assertEqual(sm[sock].vEgo, n)
|
||||
assert sm[sock].vEgo == n
|
||||
|
||||
|
||||
class TestPubMaster(unittest.TestCase):
|
||||
class TestPubMaster:
|
||||
|
||||
def setUp(self):
|
||||
def setup_method(self):
|
||||
# ZMQ pub socket takes too long to die
|
||||
# sleep to prevent multiple publishers error between tests
|
||||
zmq_sleep(3)
|
||||
@@ -156,8 +154,4 @@ class TestPubMaster(unittest.TestCase):
|
||||
if capnp:
|
||||
msg.clear_write_flag()
|
||||
msg = msg.to_bytes()
|
||||
self.assertEqual(msg, recvd, i)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
assert msg == recvd, i
|
||||
|
||||
13
cereal/messaging/tests/test_services.py
Executable file → Normal file
13
cereal/messaging/tests/test_services.py
Executable file → Normal file
@@ -1,26 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import tempfile
|
||||
from typing import Dict
|
||||
import unittest
|
||||
from parameterized import parameterized
|
||||
|
||||
import cereal.services as services
|
||||
from cereal.services import SERVICE_LIST
|
||||
|
||||
|
||||
class TestServices(unittest.TestCase):
|
||||
class TestServices:
|
||||
|
||||
@parameterized.expand(SERVICE_LIST.keys())
|
||||
def test_services(self, s):
|
||||
service = SERVICE_LIST[s]
|
||||
self.assertTrue(service.frequency <= 104)
|
||||
self.assertTrue(service.decimation != 0)
|
||||
assert service.frequency <= 104
|
||||
assert service.decimation != 0
|
||||
|
||||
def test_generated_header(self):
|
||||
with tempfile.NamedTemporaryFile(suffix=".h") as f:
|
||||
ret = os.system(f"python3 {services.__file__} > {f.name} && clang++ {f.name}")
|
||||
self.assertEqual(ret, 0, "generated services header is not valid C")
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
assert ret == 0, "generated services header is not valid C"
|
||||
|
||||
@@ -16,13 +16,13 @@ _services: dict[str, tuple] = {
|
||||
"gyroscope2": (True, 100., 100),
|
||||
"accelerometer": (True, 104., 104),
|
||||
"accelerometer2": (True, 100., 100),
|
||||
"magnetometer": (True, 25., 25),
|
||||
"magnetometer": (True, 25.),
|
||||
"lightSensor": (True, 100., 100),
|
||||
"temperatureSensor": (True, 2., 200),
|
||||
"temperatureSensor2": (True, 2., 200),
|
||||
"gpsNMEA": (True, 9.),
|
||||
"deviceState": (True, 2., 1),
|
||||
"can": (True, 100., 1223), # decimation gives ~5 msgs in a full segment
|
||||
"can": (True, 100., 2053), # decimation gives ~3 msgs in a full segment
|
||||
"controlsState": (True, 100., 10),
|
||||
"pandaStates": (True, 10., 1),
|
||||
"peripheralState": (True, 2., 1),
|
||||
@@ -38,7 +38,7 @@ _services: dict[str, tuple] = {
|
||||
"carState": (True, 100., 10),
|
||||
"carControl": (True, 100., 10),
|
||||
"carOutput": (True, 100., 10),
|
||||
"longitudinalPlan": (True, 20., 5),
|
||||
"longitudinalPlan": (True, 20., 10),
|
||||
"procLog": (True, 0.5, 15),
|
||||
"gpsLocationExternal": (True, 10., 10),
|
||||
"gpsLocation": (True, 1., 1),
|
||||
@@ -47,9 +47,10 @@ _services: dict[str, tuple] = {
|
||||
"gnssMeasurements": (True, 10., 10),
|
||||
"clocks": (True, 0.1, 1),
|
||||
"ubloxRaw": (True, 20.),
|
||||
"liveLocationKalman": (True, 20., 5),
|
||||
"livePose": (True, 20., 4),
|
||||
"liveLocationKalman": (True, 20.),
|
||||
"liveParameters": (True, 20., 5),
|
||||
"cameraOdometry": (True, 20., 5),
|
||||
"cameraOdometry": (True, 20., 10),
|
||||
"lateralPlanDEPRECATED": (True, 20., 5),
|
||||
"thumbnail": (True, 0.2, 1),
|
||||
"onroadEvents": (True, 1., 1),
|
||||
|
||||
@@ -24,8 +24,8 @@ int fsync_dir(const std::string &path) {
|
||||
int result = -1;
|
||||
int fd = HANDLE_EINTR(open(path.c_str(), O_RDONLY, 0755));
|
||||
if (fd >= 0) {
|
||||
result = fsync(fd);
|
||||
close(fd);
|
||||
result = HANDLE_EINTR(fsync(fd));
|
||||
HANDLE_EINTR(close(fd));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -47,9 +47,9 @@ class DeviceCameraConfig:
|
||||
yield cam, getattr(self, cam)
|
||||
|
||||
_ar_ox_fisheye = CameraConfig(1928, 1208, 567.0) # focal length probably wrong? magnification is not consistent across frame
|
||||
_os_fisheye = CameraConfig(2688, 1520, 567.0 / 2 * 3)
|
||||
_os_fisheye = CameraConfig(2688 // 2, 1520 // 2, 567.0 / 4 * 3)
|
||||
_ar_ox_config = DeviceCameraConfig(CameraConfig(1928, 1208, 2648.0), _ar_ox_fisheye, _ar_ox_fisheye)
|
||||
_os_config = DeviceCameraConfig(CameraConfig(2688, 1520, 2648.0 * 2 / 3), _os_fisheye, _os_fisheye)
|
||||
_os_config = DeviceCameraConfig(CameraConfig(2688 // 2, 1520 // 2, 1522.0 * 3 / 4), _os_fisheye, _os_fisheye)
|
||||
_neo_config = DeviceCameraConfig(CameraConfig(1164, 874, 910.0), CameraConfig(816, 612, 650.0), _NoneCameraConfig())
|
||||
|
||||
DEVICE_CAMERAS = {
|
||||
|
||||
@@ -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.
|
||||
|
||||
# 288 Supported Cars
|
||||
# 287 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|
|
||||
|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
@@ -25,8 +25,7 @@ A supported vehicle is one that just works when you install a comma device. All
|
||||
|Chrysler|Pacifica 2017-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica 2017-18">Buy Here</a></sub></details>||
|
||||
|Chrysler|Pacifica 2019-20|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica 2019-20">Buy Here</a></sub></details>||
|
||||
|Chrysler|Pacifica 2021-23|All|Stock|0 mph|39 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica 2021-23">Buy Here</a></sub></details>||
|
||||
|Chrysler|Pacifica Hybrid 2017|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica Hybrid 2017">Buy Here</a></sub></details>||
|
||||
|Chrysler|Pacifica Hybrid 2018|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica Hybrid 2018">Buy Here</a></sub></details>||
|
||||
|Chrysler|Pacifica Hybrid 2017-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica Hybrid 2017-18">Buy Here</a></sub></details>||
|
||||
|Chrysler|Pacifica Hybrid 2019-24|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica Hybrid 2019-24">Buy Here</a></sub></details>||
|
||||
|comma|body|All|openpilot|0 mph|0 mph|[](##)|[](##)|None||
|
||||
|CUPRA|Ateca 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,12</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 USB-C coupler<br>- 1 VW J533 connector<br>- 1 comma 3X<br>- 1 harness box<br>- 1 long OBD-C cable<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=CUPRA&model=Ateca 2018-23">Buy Here</a></sub></details>||
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
# openpilot-docs
|
||||
# openpilot docs
|
||||
|
||||
These docs are autogenerated from [this folder](https://github.com/commaai/openpilot/tree/master/docs) in the main openpilot repository.
|
||||
This is the source for [docs.comma.ai](https://docs.comma.ai).
|
||||
The site is updated on pushes to master by this [workflow](../.github/workflows/docs.yaml).
|
||||
|
||||
## Development
|
||||
NOTE: Those commands must be run in the root directory of openpilot, **not /docs**
|
||||
|
||||
**1. Install the docs dependencies**
|
||||
``` bash
|
||||
pip install .[docs]
|
||||
```
|
||||
|
||||
**2. Build the new site**
|
||||
``` bash
|
||||
mkdocs build
|
||||
```
|
||||
|
||||
**3. Run the new site locally**
|
||||
``` bash
|
||||
mkdocs serve
|
||||
```
|
||||
|
||||
References:
|
||||
* https://www.mkdocs.org/getting-started/
|
||||
* https://github.com/ntno/mkdocs-terminal
|
||||
|
||||
@@ -29,7 +29,7 @@ pytest
|
||||
cd system/loggerd && pytest .
|
||||
|
||||
# run the linter
|
||||
pre-commit run --all
|
||||
op lint
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
22
docs/car-porting/what-is-a-car-port.md
Normal file
22
docs/car-porting/what-is-a-car-port.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# What is a car port?
|
||||
|
||||
A car port enables openpilot support on a particular car. Each car model openpilot supports needs to be individually ported. All car ports live in `openpilot/selfdrive/car/`.
|
||||
|
||||
The complexity of a car port varies depending on many factors including:
|
||||
* existing openpilot support for similar cars
|
||||
* architecture and APIs available in the car
|
||||
|
||||
|
||||
# Structure of a car port
|
||||
* `interface.py`: Interface for the car, defines the CarInterface class
|
||||
* `carstate.py`: Reads CAN from car and builds openpilot CarState message
|
||||
* `carcontroller.py`: Builds CAN messages to send to car
|
||||
* `values.py`: Limits for actuation, general constants for cars, and supported car documentation
|
||||
* `radar_interface.py`: Interface for parsing radar points from the car
|
||||
|
||||
|
||||
# Overiew
|
||||
|
||||
[Jason Young](https://github.com/jyoung8607) gave a talk at COMMA_CON with an overview of the car porting process. The talk is available on YouTube:
|
||||
|
||||
https://youtu.be/KcfzEHB6ms4?si=5szh1PX6TksOCKmM
|
||||
8
docs/concepts/glossary.md
Normal file
8
docs/concepts/glossary.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# openpilot glossary
|
||||
|
||||
* **route**:
|
||||
* **segment**: routes are split into one minute chunks called segments.
|
||||
* **panda**: this is . See the repo.
|
||||
* **onroad**:
|
||||
* **offroad**:
|
||||
* **comma 3X**:
|
||||
@@ -1,10 +1,8 @@
|
||||
# loggerd
|
||||
# Logging
|
||||
|
||||
openpilot records routes in one minute chunks called segments. A route starts on the rising edge of ignition and ends on the falling edge.
|
||||
|
||||
Check out our [python library](https://github.com/commaai/openpilot/blob/master/tools/lib/logreader.py) for reading openpilot logs. Also checkout our [tools](https://github.com/commaai/openpilot/tree/master/tools) to replay and view your data. These are the same tools we use to debug and develop openpilot.
|
||||
|
||||
## log types
|
||||
Check out our [Python library](https://github.com/commaai/openpilot/blob/master/tools/lib/logreader.py) for reading openpilot logs. Also checkout our [tools](https://github.com/commaai/openpilot/tree/master/tools) to replay and view your data. These are the same tools we use to debug and develop openpilot.
|
||||
|
||||
For each segment, openpilot records the following log types:
|
||||
|
||||
@@ -15,9 +13,10 @@ rlogs contain all the messages passed amongst openpilot's processes. See [cereal
|
||||
## {f,e,d}camera.hevc
|
||||
|
||||
Each camera stream is H.265 encoded and written to its respective file.
|
||||
* fcamera.hevc is the road camera
|
||||
* ecamera.hevc is the wide road camera
|
||||
* dcamera.hevc is the driver camera
|
||||
|
||||
* `fcamera.hevc` is the road camera
|
||||
* `ecamera.hevc` is the wide road camera
|
||||
* `dcamera.hevc` is the driver camera
|
||||
|
||||
## qlog.bz2 & qcamera.ts
|
||||
|
||||
1
docs/concepts/safety.md
Symbolic link
1
docs/concepts/safety.md
Symbolic link
@@ -0,0 +1 @@
|
||||
../SAFETY.md
|
||||
1
docs/contributing/architecture.md
Normal file
1
docs/contributing/architecture.md
Normal file
@@ -0,0 +1 @@
|
||||
# Architecture
|
||||
30
docs/contributing/roadmap.md
Normal file
30
docs/contributing/roadmap.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Roadmap
|
||||
|
||||
This is the roadmap for the next major openpilot releases. Also check out
|
||||
|
||||
* [Milestones](https://github.com/commaai/openpilot/milestones) for minor releases
|
||||
* [Projects](https://github.com/commaai/openpilot/projects?query=is%3Aopen) for shorter-term projects not tied to releases
|
||||
* [Bounties](https://comma.ai/bounties) for paid individual issues
|
||||
|
||||
## openpilot 0.10
|
||||
|
||||
openpilot 0.10 will be the first release with a driving policy trained in
|
||||
a [learned simulator](https://youtu.be/EqQNZXqzFSI).
|
||||
|
||||
* Driving model trained in a learned simlator
|
||||
* Always-on driver monitoring (behind a toggle)
|
||||
* GPS removed from the driving stack
|
||||
* 100KB qlogs
|
||||
* `master-ci` pushed after 1000 hours of hardware-in-the-loop testing
|
||||
* Car interface code moved into [opendbc](https://github.com/commaai/opendbc)
|
||||
* openpilot on PC for Linux x86, Linux arm64, and Mac (Apple Silicon)
|
||||
|
||||
## openpilot 1.0
|
||||
|
||||
openpilot 1.0 will feature a fully end-to-end driving policy.
|
||||
|
||||
* End-to-end longitudinal control in Chill mode
|
||||
* Automatic Emergency Braking (AEB)
|
||||
* Driver monitoring with sleep detection
|
||||
* Rolling updates/releases pushed out by CI
|
||||
* [panda safety 1.0](https://github.com/orgs/commaai/projects/27)
|
||||
@@ -1,6 +1,6 @@
|
||||
# What is openpilot?
|
||||
|
||||
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](docs/INTEGRATION.md) and [limitations](docs/LIMITATIONS.md).
|
||||
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](https://github.com/commaai/openpilot/blob/master/docs/INTEGRATION.md) and [limitations](https://github.com/commaai/openpilot/blob/master/docs/LIMITATIONS.md).
|
||||
|
||||
|
||||
## How do I use it?
|
||||
@@ -1,39 +1,42 @@
|
||||
# SSH
|
||||
# connect to a comma 3/3X
|
||||
|
||||
## Quick Start
|
||||
A comma 3/3X is a normal [Linux](https://github.com/commaai/agnos-builder) computer that exposes [SSH](https://wiki.archlinux.org/title/Secure_Shell) and a [serial console](https://wiki.archlinux.org/title/Working_with_the_serial_console).
|
||||
|
||||
## Serial Console
|
||||
|
||||
On both the comma three and 3X, the serial console is accessible from the main OBD-C port.
|
||||
Connect the comma 3/3X to your computer with a normal USB C cable, or use a [comma serial](https://comma.ai/shop/comma-serial) for steady 12V power.
|
||||
|
||||
On the comma three, the serial console is exposed through a UART-to-USB chip, and `tools/serial/connect.sh` can be used to connect.
|
||||
|
||||
On the comma 3X, the serial console is accessible through the [panda](https://github.com/commaai/panda) using the `panda/tests/som_debug.sh` script.
|
||||
|
||||
## SSH
|
||||
|
||||
In order to SSH into your device, you'll need a GitHub account with SSH keys. See this [GitHub article](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) for getting your account setup with SSH keys.
|
||||
|
||||
* Enable SSH in your device's settings
|
||||
* Enter your GitHub username in the device's settings
|
||||
* Connect to your device
|
||||
* Username: `comma`
|
||||
* Port: `22` or `8022`
|
||||
* Username: `comma`
|
||||
* Port: `22`
|
||||
|
||||
Here's an example command for connecting to your device using its tethered connection:<br />
|
||||
`ssh comma@192.168.43.1`
|
||||
|
||||
For doing development work on device, it's recommended to use [SSH agent forwarding](https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding).
|
||||
|
||||
## Notes
|
||||
### Notes
|
||||
|
||||
The public keys are only fetched from your GitHub account once. In order to update your device's authorized keys, you'll need to re-enter your GitHub username.
|
||||
|
||||
The `id_rsa` key in this directory only works while your device is in the setup state with no software installed. After installation, that default key will be removed.
|
||||
|
||||
See the [community wiki](https://github.com/commaai/openpilot/wiki/SSH) for more detailed instructions and information.
|
||||
#### ssh.comma.ai proxy
|
||||
|
||||
# Connecting to ssh.comma.ai
|
||||
SSH into your comma device from anywhere with `ssh.comma.ai`. Requires a [comma prime subscription](https://comma.ai/connect).
|
||||
With a [comma prime subscription](https://comma.ai/connect), you can SSH into your comma device from anywhere.
|
||||
|
||||
## Setup
|
||||
|
||||
With software version 0.6.1 or newer, enter your GitHub username on your device under Developer Settings. Your GitHub authorized public keys will become your authorized SSH keys for `ssh.comma.ai`. You can add any additional keys in `/system/comma/home/.ssh/authorized_keys.persist`.
|
||||
|
||||
## Recommended .ssh/config
|
||||
|
||||
With the below SSH configuration, you can type `ssh comma-{dongleid}` to connect to your device through `ssh.comma.ai`.<br />
|
||||
For example: `ssh comma-ffffffffffffffff`
|
||||
With the below SSH configuration, you can type `ssh comma-{dongleid}` to connect to your device through `ssh.comma.ai`.
|
||||
|
||||
```
|
||||
Host comma-*
|
||||
@@ -41,20 +44,21 @@ Host comma-*
|
||||
User comma
|
||||
IdentityFile ~/.ssh/my_github_key
|
||||
ProxyCommand ssh %h@ssh.comma.ai -W %h:%p
|
||||
|
||||
Host ssh.comma.ai
|
||||
Hostname ssh.comma.ai
|
||||
Port 22
|
||||
IdentityFile ~/.ssh/my_github_key
|
||||
```
|
||||
|
||||
## One-off connection
|
||||
### One-off connection
|
||||
|
||||
```
|
||||
ssh -i ~/.ssh/my_github_key -o ProxyCommand="ssh -i ~/.ssh/my_github_key -W %h:%p -p %p %h@ssh.comma.ai" comma@ffffffffffffffff
|
||||
```
|
||||
(Replace `ffffffffffffffff` with your dongle_id)
|
||||
|
||||
## ssh.comma.ai host key fingerprint
|
||||
### ssh.comma.ai host key fingerprint
|
||||
|
||||
```
|
||||
Host key fingerprint is SHA256:X22GOmfjGb9J04IA2+egtdaJ7vW9Fbtmpz9/x8/W1X4
|
||||
14
docs/how-to/replay-a-drive.md
Normal file
14
docs/how-to/replay-a-drive.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Replay
|
||||
|
||||
Replaying is a critical tool for openpilot development and debugging.
|
||||
|
||||
## Replaying a route
|
||||
*Hardware required: none*
|
||||
|
||||
Just run `tools/replay/replay --demo`.
|
||||
|
||||
## Replaying CAN data
|
||||
*Hardware required: jungle and comma 3/3X*
|
||||
|
||||
1. Connect your PC to a jungle.
|
||||
2.
|
||||
98
docs/how-to/turn-the-speed-blue.md
Normal file
98
docs/how-to/turn-the-speed-blue.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# Turn the speed blue
|
||||
*A getting started guide for openpilot development*
|
||||
|
||||
In 30 minutes, we'll get an openpilot development environment setup on your computer and make some changes to openpilot's UI.
|
||||
|
||||
And if you have a comma 3/3X, we'll deploy the change to your device for testing.
|
||||
|
||||
## 1. Setup your development environment
|
||||
|
||||
Run this to clone openpilot and install all the dependencies:
|
||||
```bash
|
||||
curl -fsSL openpilot.comma.ai | bash
|
||||
```
|
||||
|
||||
Navigate to openpilot folder & activate a Python virtual environment
|
||||
```bash
|
||||
cd openpilot
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
Then, compile openpilot:
|
||||
```bash
|
||||
scons -j8
|
||||
```
|
||||
|
||||
## 2. Run replay
|
||||
|
||||
We'll run the `replay` tool with the demo route to get data streaming for testing our UI changes.
|
||||
```bash
|
||||
# in terminal 1
|
||||
tools/replay/replay --demo
|
||||
|
||||
# in terminal 2
|
||||
selfdrive/ui/ui
|
||||
```
|
||||
|
||||
The openpilot UI should launch and show a replay of the demo route.
|
||||
|
||||
If you have your own comma device, you can replace `--demo` with one of your own routes from comma connect.
|
||||
|
||||
## 3. Make the speed blue
|
||||
|
||||
Search for “mph” with git grep in the `ui` folder.
|
||||
```bash
|
||||
$ git grep "mph" selfdrive/ui/
|
||||
paint.cc: ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, COLOR_WHITE_ALPHA(200), "sans-regular");
|
||||
```
|
||||
|
||||
The line right above contains the actual speed. Unfortunately, COLOR_BLUE isn’t defined, but a git grep of COLOR_WHITE shows it’s nvgRGBA(255, 255, 255, 255). Personally, I like a lighter blue, so I went with #8080FF.
|
||||
```bash
|
||||
$ git diff
|
||||
diff --git a/selfdrive/ui/paint.cc b/selfdrive/ui/paint.cc
|
||||
index 821d95115..cc996eaa1 100644
|
||||
--- a/selfdrive/ui/paint.cc
|
||||
+++ b/selfdrive/ui/paint.cc
|
||||
@@ -175,8 +175,8 @@ static void ui_draw_vision_speed(UIState *s) {
|
||||
const float speed = std::max(0.0, (*s->sm)["carState"].getCarState().getVEgo() * (s->scene.is_metric ? 3.6 : 2.2369363));
|
||||
const std::string speed_str = std::to_string((int)std::nearbyint(speed));
|
||||
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
|
||||
- ui_draw_text(s, s->fb_w/2, 210, speed_str.c_str(), 96 * 2.5, COLOR_WHITE, "sans-bold");
|
||||
- ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, COLOR_WHITE_ALPHA(200), "sans-regular");
|
||||
+ ui_draw_text(s, s->fb_w/2, 210, speed_str.c_str(), 96 * 2.5, nvgRGBA(128, 128, 255, 255), "sans-bold");
|
||||
+ ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, nvgRGBA(128, 128, 255, 200), "sans-regular");
|
||||
}
|
||||
|
||||
static void ui_draw_vision_event(UIState *s) {
|
||||
```
|
||||
|
||||
|
||||
## 4. Rebuild UI, and admire your work
|
||||
|
||||
```
|
||||
scons -j8 && selfdrive/ui/ui
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 5. Push your fork to GitHub
|
||||
|
||||
Click fork on GitHub. Then, push with:
|
||||
```bash
|
||||
git remote rm origin
|
||||
git remote add origin git@github.com:<your-github-username>/openpilot.git
|
||||
git add .
|
||||
git commit -m "Make the speed blue."
|
||||
git push --set-upstream origin master
|
||||
```
|
||||
|
||||
## 6. Run your fork on device in your car!
|
||||
|
||||
Uninstall openpilot from your device through the settings. Then, enter the URL for your very own installer:
|
||||
```
|
||||
installer.comma.ai/<your-github-username>/master
|
||||
```
|
||||
|
||||
## 7. Admire your work IRL
|
||||
|
||||

|
||||
1
docs/index.md
Symbolic link
1
docs/index.md
Symbolic link
@@ -0,0 +1 @@
|
||||
getting-started/what-is-openpilot.md
|
||||
@@ -1,12 +0,0 @@
|
||||
This is the source for a new https://docs.comma.ai. It's not hosted anywhere yet, but it's easy to run locally.
|
||||
|
||||
https://www.mkdocs.org/getting-started/
|
||||
|
||||
```
|
||||
pip install mkdocs mkdocs-terminal
|
||||
mkdocs serve
|
||||
```
|
||||
|
||||
inspiration:
|
||||
* https://rerun.io/docs/
|
||||
* https://docs.expo.dev/
|
||||
@@ -1,9 +0,0 @@
|
||||
# What is a car port?
|
||||
|
||||
All car ports live in `openpilot/selfdrive/car/`.
|
||||
|
||||
* interface.py: Interface for the car, defines the CarInterface class
|
||||
* carstate.py: Reads CAN from car and builds openpilot CarState message
|
||||
* carcontroller.py: Builds CAN messages to send to car
|
||||
* values.py: Limits for actuation, general constants for cars, and supported car documentation
|
||||
* radar_interface.py: Interface for parsing radar points from the car
|
||||
@@ -1,4 +0,0 @@
|
||||
This section is for how-to's on common workflows.
|
||||
|
||||
They'll be like this blog post we wrote:
|
||||
https://blog.comma.ai/turning-the-speed-blue/
|
||||
@@ -1,18 +0,0 @@
|
||||
site_name: openpilot docs
|
||||
docs_dir: docs
|
||||
repo_url: https://github.com/commaai/openpilot/
|
||||
|
||||
theme:
|
||||
name: terminal
|
||||
features:
|
||||
- navigation.side.toc.hide
|
||||
|
||||
nav:
|
||||
- Getting Started:
|
||||
- What is openpilot?: getting-started/what-is-openpilot.md
|
||||
- How-to:
|
||||
- Turn the speed blue: how-to/turning-the-speed-blue.md
|
||||
- Car Porting:
|
||||
- What is a car port?: car-porting/what-is-a-car-port.md
|
||||
- Porting a car brand: car-porting/brand-port.md
|
||||
- Porting a car model: car-porting/model-port.md
|
||||
Binary file not shown.
965
docs_sp/CHANGELOGS.md
Normal file
965
docs_sp/CHANGELOGS.md
Normal file
@@ -0,0 +1,965 @@
|
||||
sunnypilot - 0.9.8.0 (2024-xx-xx)
|
||||
========================
|
||||
* Always on driver monitoring toggle
|
||||
************************
|
||||
* UPDATED: Synced with commaai's openpilot
|
||||
* master commit 4ef757c (July 06, 2024)
|
||||
* NEW❗: Default Driving Model: Notre Dame (July 01, 2024)
|
||||
* NEW❗: Longitudinal: Acceleration Personality thanks to kegman, rav4kumar, and arne1282!
|
||||
* Select from three distinct acceleration personalities: Eco, Normal, and Sport
|
||||
* Acceleration personalities are integrated directly into the model's acceleration matrix and can be activated in real-time!
|
||||
* NEW❗: Longitudinal: Dynamic Personality thanks to rav4kumar!
|
||||
* Dynamically adjusts following distance and reaction based on your "Driving Personality" setting
|
||||
* Personalities adapt in real-time to your speed and the distance to the lead car
|
||||
* Provides a more responsive and tailored driving experience compared to predefined settings
|
||||
* UPDATED: Driving Personality: Updated mode names
|
||||
* Aggressive, Moderate, Standard, Relaxed
|
||||
* NEW❗: Toyota - Enhanced Blind Spot Monitor (BSM) thanks to arne182, rav4kumar, and eFiniLan!
|
||||
* Enables Blind Spot Monitor (BSM) signals parsing in sunnypilot using the factory Blind Spot Monitor (BSM)
|
||||
* sunnypilot will use debugging CAN messages to receive unfiltered BSM signals, allowing detection of more objects
|
||||
* Supported platforms
|
||||
* RAV4 TSS1, equipped with factory Blind Spot Monitoring (BSM)
|
||||
* Lexus LSS1, equipped with factory Blind Spot Monitoring (BSM)
|
||||
* Toyota TSS1/1.5, equipped with factory Blind Spot Monitoring (BSM)
|
||||
* Prius TSS2, equipped with factory Blind Spot Monitoring (BSM)
|
||||
* NOTE: Only enable this feature if your Toyota/Lexus vehicle has factory Blind Spot Monitor equipped, and mentioned in the supported platforms list
|
||||
* UPDATED: Toyota: TSS2 longitudinal: Custom Tuning
|
||||
* Re-tuned and tested by the community (July 1, 2024)
|
||||
* UPDATED: Driving Model Selector v5
|
||||
* NEW❗: Driving Model additions
|
||||
* Notre Dame (July 01, 2024) - NDv3
|
||||
* UPDATED: Toyota: Continued support for Smart DSU (SDSU) and Radar CAN Filter
|
||||
* In response to the official deprecation of support for Smart DSU (SDSU) and Radar CAN Filter in the upstream ([commaai/openpilot#32777](https://github.com/commaai/openpilot/pull/32777)), sunnypilot will continue maintaining software support for Smart DSU (SDSU) and Radar CAN Filter
|
||||
* UPDATED: Continued support for Mapbox navigation
|
||||
* In response to the official temporary deprecation of support for Mapbox navigation in the upstream ([commaai/openpilot#32773](https://github.com/commaai/openpilot/pull/32773)), sunnypilot will continue maintaining software support for Mapbox navigation
|
||||
* NEW❗: Toyota - Automatic Door Locking and Unlocking thanks to AlexandreSato, cydia2020, and dragonpilot-community!
|
||||
* Auto Lock by Speed: All doors are automatically locked when vehicle speed is approximately 6 mph (10 km/h) or higher
|
||||
* Auto Unlock by Shift to P: All doors are automatically unlocked when shifting the shift lever to P
|
||||
* FIXED: Driving Personality:
|
||||
* Maniac mode now correctly enforced when selected
|
||||
* UI Updates
|
||||
* Display Metrics Below Chevron
|
||||
* NEW❗: Time to Lead Car
|
||||
* Displays the time to reach the position previously occupied by the lead car
|
||||
* NEW❗: Display Distance, Speed, and Time to Lead Car simultaneously
|
||||
* Kia Ceed Plug-in Hybrid Non-SCC 2022 support thanks to TerminatorNL!
|
||||
|
||||
sunnypilot - 0.9.7.1 (2024-06-13)
|
||||
========================
|
||||
* New driving model
|
||||
* Inputs the past curvature for smoother and more accurate lateral control
|
||||
* Simplified neural network architecture in the model's last layers
|
||||
* Minor fixes to desire augmentation and weight decay
|
||||
* New driver monitoring model
|
||||
* Improved end-to-end bit for phone detection
|
||||
* Adjust driving personality with the follow distance button
|
||||
* Support for hybrid variants of supported Ford models
|
||||
* Fingerprinting without the OBD-II port on all cars
|
||||
* Improved fuzzy fingerprinting for Ford and Volkswagen
|
||||
************************
|
||||
* UPDATED: Synced with commaai's openpilot
|
||||
* master commit f8cb04e (June 10, 2024)
|
||||
* NEW❗: sunnylink (Alpha early access)
|
||||
* NEW❗: Config/Settings Backup
|
||||
* Remotely back up and restore sunnypilot settings easily
|
||||
* Device registration with sunnylink ensures a secure, integrated experience across services
|
||||
* AES encryption derived from the device's RSA private key is used for utmost security
|
||||
* Settings are encrypted on-device, transmitted securely via HTTPS, and stored encrypted on sunnylink
|
||||
* Prevents loss of settings after device resets, offering peace of mind through end-to-end encryption
|
||||
* Early alpha access to all current and previous GitHub Sponsors and Patreon supporters
|
||||
* GitHub account pairing from device settings scanning QR code
|
||||
* Pairing your account will allow you to access features via our API (still WIP but accessible if you dig a little on our code 😉)
|
||||
* Allow inheritance of your sponsorship status, allowing you to get extra features and early access whenever applicable
|
||||
* NEW❗: iOS Siri Shortcuts Navigation support thanks to twilsonco and mike86437!
|
||||
* iOS and macOS Shortcuts to quickly set navigation destinations from your iOS device
|
||||
* comma Prime support
|
||||
* Personal Mapbox/Amap/Google Maps token support
|
||||
* Instructions on how to set up your iOS Siri Shortcuts: https://routinehub.co/shortcut/17677/
|
||||
* NEW❗: Forced Offroad mode
|
||||
* Force sunnypilot in the offroad state even when the car is on
|
||||
* When Forced Offroad mode is on, allows changing offroad-only settings even when the car is turned on
|
||||
* To engage/disengage Force Offroad, go to Settings -> Device panel
|
||||
* UPDATED: Auto Lane Change Timer -> Auto Lane Change by Blinker
|
||||
* NEW❗: New "Off" option to disable lane change by blinker
|
||||
* UPDATED: Pause Lateral Below Speed with Blinker
|
||||
* NEW❗: Customizable Pause Lateral Speed
|
||||
* Pause lateral actuation with blinker when traveling below the desired speed selected. Default is 20 MPH or 32 km/h.
|
||||
* UPDATED: Hyundai CAN Longitudinal
|
||||
* Auto-enable radar tracks on platforms with applicable Mando radar
|
||||
* UPDATED: Hyundai CAN-FD Camera-based SCC
|
||||
* NEW❗: Parse lead info for camera-based SCC platforms with longitudinal support
|
||||
* Improve lead tracking when using openpilot longitudinal
|
||||
* RE-ENABLED: Map-based Turn Speed Control (M-TSC) for supported platforms
|
||||
* openpilot Longitudinal Control available cars
|
||||
* Custom Stock Longitudinal Control available cars
|
||||
* UPDATED: Continued support for comma Pedal
|
||||
* In response to the official deprecation of support for comma Pedal in the upstream, sunnypilot will continue maintaining software support for comma Pedal
|
||||
* UPDATED: Driving Model Selector v4
|
||||
* NEW❗: Driving Model additions
|
||||
* North Dakota (April 29, 2024) - NDv2
|
||||
* WD40 (April 09, 2024) - WD40
|
||||
* Duck Amigo (March 18, 2024) - DA
|
||||
* Recertified Herbalist (March 01, 2024) - CHLR
|
||||
* Legacy Driving Models with Navigate on openpilot (NoO) support
|
||||
* Includes Duck Amigo and all preceding models
|
||||
* UPDATED: Bumping mapd by [@pfeiferj](https://github.com/pfeiferj) to version [v1.9.0](https://github.com/pfeiferj/mapd/releases/tag/v1.9.0) thanks to pfeiferj!
|
||||
* UPDATED: Reset Mapbox Access Token -> Reset Access Tokens for Map Services
|
||||
* Reset self-service access tokens for Mapbox, Amap, and Google Maps
|
||||
* UPDATED: Upstream native support for Gap Adjust Cruise
|
||||
* UPDATED: Neural Network Lateral Control (NNLC)
|
||||
* Due to upstream changes with platform simplifications, most platforms will match and fallback to combined platform model
|
||||
* This will be updated when the new mapping of platforms are restructured (thanks @twilsonco 😉)
|
||||
* UI Updates
|
||||
* Display Metrics Below Chevron
|
||||
* NEW❗: Metrics is now being displayed below the chevron instead of above
|
||||
* NEW❗: Display both Distance and Speed simultaneously
|
||||
* NEW❗: View sunnylink connectivity status on the left sidebar!
|
||||
|
||||
sunnypilot - 0.9.6.2 (2024-05-29)
|
||||
========================
|
||||
* REMOVED: Screen Recorder
|
||||
* Screen Recorder is removed due to unnecessary resource usage
|
||||
* An improved version will be available in the near future. Stay tuned!
|
||||
|
||||
sunnypilot - 0.9.6.1 (2024-02-27)
|
||||
========================
|
||||
* New driving model
|
||||
* Vision model trained on more data
|
||||
* Improved driving performance
|
||||
* Directly outputs curvature for lateral control
|
||||
* New driver monitoring model
|
||||
* Trained on larger dataset
|
||||
* AGNOS 9
|
||||
* comma body streaming and controls over WebRTC
|
||||
* Improved fuzzy fingerprinting for many makes and models
|
||||
* Alpha longitudinal support for new Toyota models
|
||||
* Chevrolet Equinox 2019-22 support thanks to JasonJShuler and nworb-cire!
|
||||
* Dodge Durango 2020-21 support
|
||||
* Hyundai Staria 2023 support thanks to sunnyhaibin!
|
||||
* Kia Niro Plug-in Hybrid 2022 support thanks to sunnyhaibin!
|
||||
* Lexus LC 2024 support thanks to nelsonjchen!
|
||||
* Toyota RAV4 2023-24 support
|
||||
* Toyota RAV4 Hybrid 2023-24 support
|
||||
************************
|
||||
* UPDATED: Synced with commaai's openpilot
|
||||
* master commit db57a21 (February 22, 2024)
|
||||
* v0.9.6 release (February 27, 2024)
|
||||
* UPDATED: Dynamic Experimental Control (DEC)
|
||||
* Synced with dragonpilot-community/dragonpilot:beta3 commit f4ee52f
|
||||
* NEW❗: Default Driving Model: Certified Herbalist v2 (February 13, 2024)
|
||||
* UPDATED: Driving Model Selector v3
|
||||
* NEW❗: Driving Model additions
|
||||
* Certified Herbalist v2 (February 13, 2024) - CHv2
|
||||
* Certified Herbalist (February 5, 2024) - CH
|
||||
* Los Angeles v2 (January 24, 2024) - LAv2
|
||||
* Los Angeles (January 22, 2024) - LAv1
|
||||
* NEW❗: Model Caching thanks to DevTekVE!
|
||||
* Model caching allows the selection of previously downloaded Driving Model
|
||||
* Users can now access cached versions of selected models, eliminating redundant downloads for previously fetched models
|
||||
* Legacy Driving Models support
|
||||
* New Delhi (December 21, 2023) - ND
|
||||
* Blue Diamond v2 (December 11, 2023) - BDv2
|
||||
* Blue Diamond (November 18, 2023) - BDv1
|
||||
* Farmville (November 7, 2023) - FV
|
||||
* Night Strike (October 3, 2023) - NS
|
||||
* Certain features are deprecated with newer Driving Models
|
||||
* Dynamic Lane Profile (DLP)
|
||||
* Custom Offsets
|
||||
* UPDATED: Dynamic Lane Profile (DLP)
|
||||
* Continued support for Legacy Driving Models (e.g., ND, BDv2, BDv1, FV, NS)
|
||||
* Deprecated support for newer Driving Models (e.g., CHv2, CH, LAv2, LAv1)
|
||||
* UPDATED: Custom Offsets
|
||||
* Continued support for Legacy Driving Models (e.g., ND, BDv2, BDv1, FV, NS)
|
||||
* Deprecated support for newer Driving Models (e.g., CHv2, CH, LAv2, LAv1)
|
||||
* UPDATED: Hyundai/Kia/Genesis - ESCC Radar Interceptor
|
||||
* Message parsing improvements with the latest firmware update: https://github.com/sunnypilot/panda/tree/test-escc-smdps
|
||||
* UI Updates
|
||||
* NEW❗: Visuals: Display Feature Status toggle
|
||||
* Display the statuses of certain features on the driving screen
|
||||
* NEW❗: Visuals: Enable Onroad Settings toggle
|
||||
* Display the Onroad Settings button on the driving screen to adjust feature options on the driving screen, without navigating into the settings menu
|
||||
* REMOVED: "Device ambient" temperature option on the sidebar
|
||||
* FIXED: New comma 3X support
|
||||
* FIXED: New comma eSIM support
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - 0.9.5.3 (2023-12-24)
|
||||
========================
|
||||
* UPDATED: Dynamic Experimental Control (DEC)
|
||||
* Synced with dragonpilot-community/dragonpilot:lp-dp-beta2 commit 578d38b
|
||||
* UPDATED: Driving Model Selector v2
|
||||
* Driving models sort in descending order based on availability date
|
||||
* Experimental/unmerged driving models are only available in "dev-c3" branch
|
||||
* To select and use experimental driving models, navigate to "Software" panel, select the "dev-c3" branch, and check for update
|
||||
* UPDATED: Vision-based Turn Speed Control (V-TSC) implementation
|
||||
* Refactored implementation thanks to pfeiferj!
|
||||
* More accurate and consistent velocity calculation to achieve smoother longitudinal control in curves
|
||||
* NEW❗: Speed Limit Warning
|
||||
* Display alert and/or chime to warn the driver when the cruising speed is faster than the speed limit plus the Warning Offset
|
||||
* Customizable Warning Offset, independent of Speed Limit Control (SLC)'s Limit Offset
|
||||
* UPDATED: Speed Limit Source Policy
|
||||
* Selectable speed limit source for Speed Limit Control and Speed Limit Warning
|
||||
* Applicable to: Speed Limit Control, Speed Limit Warning
|
||||
* UPDATED: Speed Limit Control (SLC)
|
||||
* Engage Mode: Removed "Warning Only" mode - this has been replaced by the new Speed Limit Warning sub-menu
|
||||
* UPDATED: OpenStreetMap (OSM) implementation
|
||||
* Refactored implementation thanks to pfeiferj!
|
||||
* Less resource impact
|
||||
* Significantly smaller sizes with databases
|
||||
* All regions are available to download
|
||||
* Weekly map updates thanks to pfeiferj!
|
||||
* Increased the font size of the road name
|
||||
* C3X-specific changes
|
||||
* Altitude (ALT.) display on Developer UI
|
||||
* Current street name on top of driving screen when "OSM Debug UI" is enabled
|
||||
* UPDATED: Map-based Turn Speed Control (M-TSC) implementation
|
||||
* Only available in "staging-c3" and "dev-c3" branches. If you are using "release-c3" branch, navigate to "Software" panel, select the desired target branch, and check for update
|
||||
* Refactored implementation thanks to pfeiferj!
|
||||
* Based on the new OpenStreetMap implementation
|
||||
* Improved predicted curvature calculations from OpenStreetMap data
|
||||
* UI updates
|
||||
* RE-ENABLED: Navigation: Full screen support
|
||||
* Display the map view in full screen
|
||||
* To switch back to driving view, tap on the border edge
|
||||
* Hyundai Bayon Non-SCC 2019 support thanks to polein78!
|
||||
|
||||
sunnypilot - 0.9.5.2 (2023-12-07)
|
||||
========================
|
||||
* NEW❗: MADS: Allow Navigate on openpilot in Chill Mode
|
||||
* Allow navigation to feed map view into the driving model while using Chill Mode
|
||||
* Support all platforms, including platforms that do not support openpilot longitudinal control & Experimental Mode
|
||||
* NEW❗: Neural Network Lateral Controller
|
||||
* Formerly known as "NNFF", this replaces the lateral "torque" controller with one using a neural network trained on each car's (actually, each separate EPS firmware) driving data for increased controls accuracy
|
||||
* Contact @twilsonco in the sunnypilot Discord server with feedback, or to provide log data for your car if your car is currently unsupported
|
||||
* NEW❗: Driving Model Selector
|
||||
* Easily switch between driving models without reinstalling branches. Offering immediate access to the latest models upon release
|
||||
* An internet connection is required for downloading models. Each model switch currently involves downloading the model again. Future updates may allow for offline switching
|
||||
* Warning is displayed for metered connections to avoid unexpected data usage if on cellular data
|
||||
* Change driving models via **Settings -> Software -> Current Driving Model**.
|
||||
* NEW❗: Hyundai CAN longitudinal:
|
||||
* NEW❗: Enable radar tracks for certain Santa Fe platforms
|
||||
* Internal Combustion Engine (ICE) 2021-23
|
||||
* Hybrid 2022-23
|
||||
* Plug-in Hybrid 2022-23
|
||||
* NEW❗: Lane Change: When manually braking with steering engaged, turning on the turn signal will default to Nudge mode
|
||||
* Volkswagen MQB CC only platforms (radar or no radar) support thanks to jyoung8607!
|
||||
|
||||
sunnypilot - 0.9.5.1 (2023-11-17)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master commit e94c3c5
|
||||
* NEW❗: Farmville driving model
|
||||
* NEW❗: Onroad Settings Panel
|
||||
* Onroad buttons (i.e., DLP, GAC) moved to its dedicated panel
|
||||
* Driving Personality
|
||||
* Dynamic Lane Profile (DLP)
|
||||
* Dynamic Experimental Control (DEC)
|
||||
* Speed Limit Control (SLC)
|
||||
* NEW❗: Display main feature status on onroad view in real-time
|
||||
* GAP - Driving Personality
|
||||
* DLP - Dynamic Lane Profile
|
||||
* DEC - Dynamic Experimental Control
|
||||
* SLC - Speed Limit Control
|
||||
* NEW❗: Dynamic Experimental Control (DEC) thanks to dragonpilot-community!
|
||||
* Automatically determines and selects between openpilot ACC and openpilot End to End longitudinal based on conditions for a more natural drive
|
||||
* Dynamic Experimental Control is only active while in Experimental Mode
|
||||
* When Dynamic Experimental Control is ON, initially setting cruise speed will set to the vehicle's current speed
|
||||
* NEW❗: Hyundai CAN longitudinal:
|
||||
* NEW❗: Parse lead info for camera-based SCC platforms
|
||||
* Improve lead tracking when using openpilot longitudinal
|
||||
* NEW❗: Parse lead distance to display on car cluster
|
||||
* Introduced better lead distance calculation to display on the car's cluster, replacing the binary "lead visible" indication on the SCC cluster
|
||||
* Lead distance is now categorized into different ranges for more detailed and comprehensive information to the driver similar to how stock ACC does it
|
||||
* NEW❗: Parse speed limit sign recognition from camera for certain supported platforms
|
||||
* NEW❗: Subaru - Stop and Go auto-resume support thanks to martinl!
|
||||
* Global (excluding Gen 2 and Hybrid) and Pre-Global support
|
||||
* NEW❗: Toyota - Stop and Go hack
|
||||
* Allow some Toyota/Lexus cars to auto resume during stop and go traffic
|
||||
* Only applicable to certain models and model years
|
||||
* NEW❗: Toyota: ZSS support thanks to dragonpilot-community and ErichMoraga!
|
||||
* NEW❗: MSPA (Cereal structs refactor)
|
||||
* Make sunnypilot Parsable Again - @sshane
|
||||
* sunnypilot is now parsable with stock openpilot tools
|
||||
* NEW❗: Display 3D buildings on map thanks to jakethesnake420!
|
||||
* openpilot Longitudianl Control capable cars only
|
||||
* UPDATED: Gap Adjust Cruise is now a part of Driving Personality
|
||||
* [DISTANCE/FOLLOW DISTANCE/GAP DISTANCE] physical button on the steering wheel to select Driving Personality on by default
|
||||
* Status now viewable in onroad view or Onroad Settings Panel
|
||||
* REMOVED: Gap Adjust Cruise toggle
|
||||
* UPDATED: Speed Limit Control (SLC)
|
||||
* NEW❗: Speed Limit Engage Mode
|
||||
* Select the desired mode to set the cruising speed to the speed limit
|
||||
* Warning Only: Warn the driver when the vehicle is driven faster than the speed limit
|
||||
* Auto: Automatic speed adjustment on motorways based on speed limit data
|
||||
* User Confirm: Inform the driver to change set speed of Adaptive Cruise Control to help the driver stay within the speed limit
|
||||
* Supported platforms
|
||||
* openpilot Longitudinal Control available cars (Excluding certain Toyota/Lexus, Ford, explained below)
|
||||
* Custom Stock Longitudinal Control available cars
|
||||
* Unsupported platforms
|
||||
* Toyota/Lexus and Ford - most platforms do not allow us to control the PCM's set speed, requires testers to verify
|
||||
* NEW❗: Speed limit source selector
|
||||
* Select the desired precedence order of sources used to adapt cruise speed to road limits
|
||||
* UPDATED: Custom Stock Longitudinal Control
|
||||
* RE-ENABLED: Hyundai/Kia/Genesis CAN-FD platforms
|
||||
* UPDATED: Custom Offsets reimplementation
|
||||
* Camera Offset only works in Laneful (Laneful Only or Laneful in Auto mode when using Dynamic Lane Profile)
|
||||
* Path Offset can be applied to both Laneless and Laneful
|
||||
* UPDATED: Refactored Torque Lateral Control custom tuning menu
|
||||
* NEW❗: Less Restrict Settings for Self-Tune (Beta)
|
||||
* NEW❗: Custom Tuning for setting offline and live values in real-time
|
||||
* UPDATED: Auto-detect custom Mapbox token if a personal Mapbox token is provided
|
||||
* REMOVED: "Enable Mapbox Navigation" toggle
|
||||
* UI updates
|
||||
* New Settings menu redesign and improved interactions
|
||||
* FIXED: Retain hotspot/tethering state was not consistently saved
|
||||
* FIXED: Map stuck in "Map Loading" if comma Prime is active
|
||||
* FIXED: OpenStreetMap implementation on C3X devices
|
||||
* M-TSC
|
||||
* Altitude (ALT.) display on Developer UI
|
||||
* Current street name on top of driving screen when "OSM Debug UI" is enabled
|
||||
* Hyundai Kona Non-SCC 2019 support thanks to Quex!
|
||||
* Kia Seltos Non-SCC 2023-24 support thanks to Moodkiller and jeroid_!
|
||||
|
||||
sunnypilot - 0.9.4.1 (2023-08-11)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's 0.9.4 release
|
||||
* NEW❗: Moonrise driving model
|
||||
* NEW❗: Ford upstream models support
|
||||
* UPDATED: Dynamic Lane Profile selector in the "SP - Controls" menu
|
||||
* REMOVED: Dynamic Lane Profile driving screen UI button
|
||||
* FIXED: Disallow torque lateral control for angle control platforms (e.g. Ford, Nissan, Tesla)
|
||||
* Torque lateral control cannot be used by angle control platforms, and would cause a "Controls Unresponsive" error if Torque lateral control is enforced in settings
|
||||
* REMOVED: Speed Limit Style override
|
||||
* Honda Accord 2016-17 support thanks to mlocoteta!
|
||||
* Serial Steering hardware required. For more information, see https://github.com/mlocoteta/serialSteeringHardware
|
||||
* mapd: utilize advisory speed limit in curves (#142) thanks to pfeiferj!
|
||||
|
||||
sunnypilot - 0.9.3.1 (2023-07-09)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's 0.9.3 release
|
||||
* NEW❗: Display Temperature on Sidebar toggle
|
||||
* Display Ambient temperature, memory temperature, CPU core with the highest temperature, GPU temperature, or max of Memory/CPU/GPU on the sidebar
|
||||
* Replace "Display CPU Temperature on Sidebar" toggle
|
||||
* NEW❗: Hot Coffee driving model
|
||||
* NEW❗: HKG CAN: Smoother Stopping Performance (Beta) toggle
|
||||
* Smoother stopping behind a stopped car or desired stopping event.
|
||||
* This is only applicable to HKG CAN platforms using openpilot longitudinal control
|
||||
* NEW❗: Toyota: TSS2 longitudinal: Custom Tuning
|
||||
* Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars thanks to dragonpilot-community!
|
||||
* NEW❗: Enable Screen Recorder toggle
|
||||
* Enable this will display a button on the onroad screen to toggle on or off real-time screen recording with UI elements.
|
||||
* IMPROVED: Dynamic Lane Profile: when using Laneline planner via Laneline Mode or Auto Mode, enforce Laneless planner while traveling below 10 MPH or 16 km/h
|
||||
* REMOVED: Display CPU Temperature on Sidebar
|
||||
|
||||
sunnypilot - 0.9.2.3 (2023-06-18)
|
||||
========================
|
||||
* NEW❗: Auto Lane Change: Delay with Blind Spot
|
||||
* Toggle to enable a delay timer for seamless lane changes when blind spot monitoring (BSM) detects an obstructing vehicle, ensuring safe maneuvering
|
||||
* NEW❗: Driving Screen Off: Wake with Non-Critical Events
|
||||
* When Driving Screen Off Timer is not set to "Always On":
|
||||
* Enabled: Wake the brightness of the screen to display all events
|
||||
* Disabled: Wake the brightness of the screen to display critical events
|
||||
* Currently, all non-nudge modes are default to continue lane change after 1 seconds of blind spot detection
|
||||
* NEW❗: Fleet Manager PIN Requirement toggle
|
||||
* User can now enable or disable PIN requirement on the comma device before accessing Fleet Manager
|
||||
* NEW❗: Reset all sunnypilot settings toggle
|
||||
* NEW❗: Turn signals display on screen when blinker is used
|
||||
* Green: Blinker is on
|
||||
* Red: Blinker is on, car detected in the adjacent blind spot or road edge detected
|
||||
* IMPROVED: mapd: better exceptions handling when loading dependencies
|
||||
* UPDATED: Green Traffic Light Chime no longer displays an orange border when executed
|
||||
* FIXED: mapd: Road name flashing caused by desync with last GPS timestamp
|
||||
* FIXED: Ram HD (2500/3500): Ignore paramsd sanity check
|
||||
* Live parameters have trouble with self-tuning on this platform with upstream openpilot 0.9.2
|
||||
* Hyundai: Longitudinal support for CAN-based Camera SCC cars thanks to Zack1010OP's Patreon sponsor!
|
||||
|
||||
sunnypilot - 0.9.2.2 (2023-06-13)
|
||||
========================
|
||||
* NEW❗: Toyota: Allow M.A.D.S. toggling with LKAS Button (Beta)
|
||||
* IMPROVED: Ram: cruise button handling
|
||||
|
||||
sunnypilot - 0.9.2.1 (2023-06-10)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's 0.9.2 release
|
||||
* UPDATED: feature revamp with better stability
|
||||
* UPDATED:
|
||||
* M.A.D.S.
|
||||
* Path color becomes LIGHT ORANGE during Driver Steering Override
|
||||
* Gap Adjust Cruise (now known as Driving Personality in upstream openpilot 0.9.3):
|
||||
* Updated profiles and jerk changes
|
||||
* Experimental Mode support
|
||||
* Three settings: Stock, Aggressive, and Maniac
|
||||
* Stock is recommended and the default
|
||||
* In Aggressive/Maniac mode, lead follow distance is shorter and quicker gas/brake response
|
||||
* Dynamic Lane Profile
|
||||
* Display blue borders on both sides of the driving path when Laneline mode is being used in the planner
|
||||
* Auto Mode optimization
|
||||
* Permanent: Laneless during Auto Lane Change execution
|
||||
* Mapd
|
||||
* OpenStreetMap Database: new regions added
|
||||
* Developer UI (Dev UI)
|
||||
* REMOVED: 2-column design
|
||||
* NEW❗: 1-column + 1-row design
|
||||
* Custom Stock Longitudinal Control
|
||||
* NEW❗: Chrysler/Jeep/Ram support
|
||||
* NEW❗: Mazda support
|
||||
* NEW❗: Volkswagen PQ support
|
||||
* DISABLED: Hyundai/Kia/Genesis CAN-FD platforms
|
||||
* NEW❗: Switch between Chill (openpilot ACC) and Experimental (E2E longitudinal) with DISTANCE button on the steering wheel
|
||||
* To switch between Chill and Experimental Mode: press and hold the DISTANCE button on the steering wheel for over 0.5 second
|
||||
* All openpilot longitudinal capable cars support
|
||||
* NEW❗: Nicki Minaj driving model
|
||||
* NEW❗: Nissan and Mazda upstream models support
|
||||
* NEW❗: Pre-Global Subaru upstream models support
|
||||
* NEW❗: Display End-to-end Longitudinal Status (Beta)
|
||||
* Display an icon that appears when the End-to-end model decides to start or stop
|
||||
* NEW❗: Green Traffic Light Chime (Beta)
|
||||
* A chime will play when the traffic light you are waiting for turns green, and you have no vehicle in front of you.
|
||||
* NEW❗: Lead Vehicle Departure Alert
|
||||
* Notify when the leading vehicle drives away
|
||||
* NEW❗: Speedometer: Display True Speed
|
||||
* Display the true vehicle current speed from wheel speed sensors.
|
||||
* NEW❗: Speedometer: Hide from Onroad Screen
|
||||
* NEW❗: Auto-Hide UI Buttons
|
||||
* Hide UI buttons on driving screen after a 30-second timeout. Tap on the screen at anytime to reveal the UI buttons
|
||||
* Applicable to Dynamic Lane Profile (DLP) and Gap Adjust Cruise (GAC)
|
||||
* NEW❗: Display DM Camera in Reverse Gear
|
||||
* Show Driver Monitoring camera while the car is in reverse gear
|
||||
* NEW❗: Block Lane Change: Road Edge Detection (Beta)
|
||||
* Block lane change when road edge is detected on the stalk actuated side
|
||||
* NEW❗: Display CPU Temperature on Sidebar
|
||||
* Display the CPU core with the highest temperature on the sidebar
|
||||
* NEW❗: Display current driving model in Software settings
|
||||
* NEW❗: HKG: smartMDPS automatic detection (installed with applicable firmware)
|
||||
* FIXED: Unintended siren/alarm from the comma device if the vehicle is turned off too quickly in PARK gear
|
||||
* FIXED: mapd: Exception handling for loading dependencies
|
||||
* Fleet Manager via Browser support thanks to actuallylemoncurd, AlexandreSato, ntegan1, and royjr!
|
||||
* Access your dashcam footage, screen recordings, and error logs when the car is turned off
|
||||
* Connect to the device via Wi-Fi, mobile hotspot, or tethering on the comma device, then navigate to http://ipAddress:5050 to access.
|
||||
* Honda Clarity 2018-22 support thanks to mcallbosco, vanillagorillaa and wirelessnet2!
|
||||
* Ram: Steer to 0/7 MPH support thanks to vincentw56!
|
||||
* Retain hotspot/tethering state across reboots thanks to rogerioaguas!
|
||||
|
||||
sunnypilot - Version Latest (2023-02-22)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2023.02.19-04:52:00:GMT - 0.9.2
|
||||
* Refactor sunnypilot features to be more stable
|
||||
|
||||
sunnypilot - Version Latest (2022-12-16)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.12.16-06:31:00:GMT - 0.9.1
|
||||
* NEW❗: GM:
|
||||
* NEW❗: Gap Adjust Cruise support - Chill, Normal, Aggressive
|
||||
* NEW❗: Experimental Mode: Hold DISTANCE button on the steering wheel for 0.5 second to switch between Experimental Mode and Chill Mode
|
||||
* REMOVED❌: Toytoa: SnG Hack
|
||||
* This method is not recommended and may cause some cars to not behave as expected
|
||||
* SDSU is strongly recommended to enable SnG for Toyota vehicles without SnG from factory
|
||||
* commaai: radard: add missing accel data for vision-only leads (commaai/openpilot#26619) - pending PR
|
||||
* VOACC performance is drastically improved when using Chill Mode
|
||||
* IMPROVED: M.A.D.S. events handling
|
||||
* IMPROVED: UI: screen recorder button change
|
||||
* IMPROVED: OpenStreetMap Offline Database optimization
|
||||
* FIXED: Toyota: vehicles' LKAS button no longer has a delay with toggling M.A.D.S.
|
||||
* FIXED: Toyota: brake pedal press at standstill causing Cruise Fault
|
||||
* FIXED: Volkswagen MQB: reduce Camera Malfunction occurrences (requires testing)
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-12-10)
|
||||
========================
|
||||
* IMPROVED: NEW❗ Developer UI design
|
||||
* Second column metrics is now moved to the bottom of the screen
|
||||
* ACC. = Acceleration
|
||||
* L.S. = Lead Speed
|
||||
* E.T. = EPS Torque
|
||||
* B.D. = Bearing Degree
|
||||
* FRI. = Friction
|
||||
* L.A. = Lateral Acceleration
|
||||
* ALT. = Altitude
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-12-07)
|
||||
========================
|
||||
* NEW❗: Screen Recorder support thanks to neokii and Kumar!
|
||||
* NEW❗: End-to-end longitudinal start/stop status icon
|
||||
* Only appears when Experimental Mode is enabled
|
||||
* NEW❗: End-to-end longitudinal car chime when starting
|
||||
* Hyundai/Kia/Genesis CAN platform, Honda/Acura Bosch/Nidec, Toyota/Lexus
|
||||
* i.e. Traffic light turns green, stop sign ready to go, etc.
|
||||
* Only appears when Experimental Mode is enabled AND longitudinal control is disengaged
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-12-05)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.12.04-22:46:00:GMT - 0.9.1
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-11-12)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.11.12-10:02:00:GMT - 0.8.17
|
||||
* FIXED: CAN Error for CAN HKG cars that do not have navigation from the factory
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-11-11)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.11.11-21:22:00:GMT - 0.8.17
|
||||
* commaai: AGNOS 6.2 (commaai/openpilot#26441)
|
||||
* NEW❗: Speed Limit Control - HKG - add speed limit from car's navigation head unit
|
||||
* Compatible with certain models, trims, and model years
|
||||
* DISABLED: FCA: RAM HD - steer down to 0
|
||||
* FIXED: UI: End-to-end longitudinal button on driving screen synchronization
|
||||
* FIXED: Honda: Longitudinal status with set cruise speed now displays properly in the car's dashboard
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-11-08)
|
||||
========================
|
||||
* ADDED: New Zealand offline OpenStreetMap database
|
||||
|
||||
sunnypilot - Version Latest (2022-11-04)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.11.05-01:44:00:GMT - 0.8.17
|
||||
* RE-ENABLED: Dynamic Lane Profile - preserves lanelines
|
||||
* Can be found in "SP - Controls" menu
|
||||
* NEW❗: DLP: switch to laneless for current/future curves thanks to @twilsonco!
|
||||
* Can be found in "SP - Controls" menu
|
||||
* NEW❗: UI: Road Camera Selector
|
||||
* Enable this will display a button on the driving screen to select the driving camera
|
||||
* Can be found in "SP - Visuals" menu
|
||||
* NEW❗: Controls: Camera & Path Custom Offsets
|
||||
* Only applicable to laneline mode when using Dynamic Lane Profile
|
||||
* NEW❗: Buttons on driving screen are now sorted based on priority and availability
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-28)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.28-03:53:00:GMT - 0.8.17
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-26)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.26-06:20:00:GMT - 0.8.17
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-25)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.25-23:53:00:GMT - 0.8.17
|
||||
* Pre-Global Subaru support thanks to @martinl!
|
||||
* NEW❗: Speed Limit values turn red when current speed is higher than posted speed limit
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-23)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.22-23:15:00:GMT - 0.8.17
|
||||
* IMPROVED: Custom Stock Longitudinal Control - HKG - only allow engagement on user button press
|
||||
* IMPROVED: Custom Stock Longitudinal Control - Volkswagen MQB & PQ - more consistent set speed change
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-21)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.21-17:33:00:GMT - 0.8.17
|
||||
* IMPROVED: Custom Stock Longitudinal Control - Volkswagen MQB & PQ - more predictable button send logic
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-20)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.20-20:25:00:GMT - 0.8.17
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-19)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.19-08:31:00:GMT - 0.8.17
|
||||
* IMPROVED: Controls: Speed Limit Control - accelerator press only disengage if "Disengage on Accelerator Pedal" is enabled
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-18)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.18-04:44:00:GMT - 0.8.17
|
||||
* RE-ENABLED: Volkswagen MQB & PQ with Custom Stock Longitudinal Control
|
||||
* NEW❗: Steering Rate Cost Live Tune
|
||||
* Enables live tune for Steering Rate Cost. Lower value allows steering wheel to move more freely at low speed
|
||||
* Can be found in "SP - Controls" menu
|
||||
* FIXED: MADS: GM - include Regen Paddle logic thanks to @twilsonco!
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-17)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.17-23:54:00:GMT+1 - 0.8.17
|
||||
* ENABLED: "Custom Stock Longitudinal Control" toggle for CAN-FD cars
|
||||
* FIXED: HKG CAN-FD: Could not engage when openpilot longitudinal is enabled
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-13)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.13-19:43:00:GMT+1 - 0.8.17
|
||||
* ADDED: Live Tmux toggle
|
||||
* Can be found in "SP - General" menu
|
||||
* IMPROVED: OpenStreetMap Database Update - only check for database update with explicit user decision
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-11)
|
||||
========================
|
||||
* ADDED: Hyundai openpilot longitudinal improvements - huge thanks to @aragon7777!
|
||||
* ADDED: Check for OpenStreetMap Database Update button
|
||||
* UPDATED: commaai: Low speed lateral control improvements (commaai:openpilot#26022, bbcd448) - pending PR
|
||||
* FIXED: MUTCD speed limit spacing adjusts dynamically when no subtext is shown (i.e., speed limit offset, distance to next speed limit)
|
||||
* FIXED: MADS: Intermittent CAN Error when engaging for Toyota Prius TSS-P
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-09)
|
||||
========================
|
||||
* ADDED: commaai: Low speed lateral control improvements (commaai:openpilot#26022, bca288bb) - pending PR
|
||||
* FIXED: MADS: Intermittent CAN Error when engaging for Toyota Prius TSS-P
|
||||
* IMPROVED: mapd: stop signs and other supported traffic_calming tags are now slowing/stopping as expected
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-08)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.08-12:07:00:GMT+1 - 0.8.17
|
||||
* FIXED: MADS: Intermittent CAN Error when engaging for Toyota Prius TSS-P
|
||||
* IMPROVED: mapd: Speed Humps are now set at 20 MPH or 32 km/h
|
||||
* IMPROVED: OpenStreetMap Offline Database download experience
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-10-07)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.10.07-08:16:00:GMT - 0.8.17
|
||||
* NEW❗: OpenStreetMap database can now be downloaded locally for offline use
|
||||
* Now offering US South, US West, US Northeast, US Florida, Taiwan, and South Africa
|
||||
* Databases updated - 2022.10.05-03:30:00:GMT
|
||||
* NEW❗: mapd: Stop Sign, Yield, Speed Bump, Speed Hump, Sharp Curve support - huge thanks to @move-fast and @dragonpilot-community!
|
||||
* Go to https://openstreetmap.org and start mapping out your area!
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-09-30)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.30-22:43:00:GMT - 0.8.17
|
||||
* RE-ADDED: Torque Lateral Controller Live Tune Menu
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-09-23)
|
||||
========================
|
||||
* ADDED: Developer UI: latAccelFactorFiltered & frictionCoefficientFiltered values displays in green if Torque is using live params
|
||||
* Bug fixes and performance improvements
|
||||
|
||||
sunnypilot - Version Latest (2022-09-22)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.19-22:19:00:GMT - 0.8.17
|
||||
* NEW❗: Toggle to explicitly enable Custom Stock Longitudinal Control
|
||||
* Applicable cars only: Honda, Hyundai/Kia/Genesis
|
||||
* Settings -> Toggles menu
|
||||
|
||||
sunnypilot - Version Latest (2022-09-21)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.19-22:19:00:GMT - 0.8.17
|
||||
* ADDED: Toggle to enable Live Torque (self/auto tune) with Torque lateral controller
|
||||
* To enable, first enable "Enforce Torque Lateral Controller" toggle
|
||||
* UPDATED: New metrics in Developer UI (when Live Torque is enabled)
|
||||
* REMOVED: latAccelFactorRaw & frictionCoefficientRaw from torqued
|
||||
* ADDED: latAccelFactorFiltered & frictionCoefficientFiltered from torqued
|
||||
* REMOVED: Temporary remove Torque Lateral Controller Live Tune Menu
|
||||
|
||||
sunnypilot - Version Latest (2022-09-20)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.19-22:19:00:GMT - 0.8.17
|
||||
* ADDED: Toggle to enable Live Torque (self/auto tune) with Torque lateral controller
|
||||
* To enable, first enable "Enforce Torque Lateral Controller" toggle
|
||||
* REMOVED: Temporary remove Torque Lateral Controller Live Tune Menu
|
||||
|
||||
sunnypilot - Version Latest (2022-09-18)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.17-11:23:00:GMT - 0.8.17
|
||||
* ADDED: Kia Forte Non-SCC 2019 support for @askalice
|
||||
* FIXED: Torque Lateral Control Live Tune now syncs with commaai:openpilot#25822
|
||||
* FIXED: mapd dependencies no longer need to be re-downloaded after unknown reboots
|
||||
|
||||
sunnypilot - Version Latest (2022-09-17)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.17-11:23:00:GMT - 0.8.17
|
||||
* NEW❗: Non SCC HKG support
|
||||
* Custom Stock Longitudinal Control
|
||||
* ❗No❗ openpilot longitudinal control
|
||||
* FIXED: Honda Bosch random low-value set speed changes
|
||||
|
||||
sunnypilot - Version Latest (2022-09-16)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.16-20:23:00:GMT - 0.8.17
|
||||
|
||||
sunnypilot - Version Latest (2022-09-15)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.16-02:00:00:GMT - 0.8.17
|
||||
* FIXED: Block additional auto lane change actions if blinker stays on after the first lane change
|
||||
* REVERTED: Some Toyota with LKAS button no longer requires double press to engage/disengage M.A.D.S.
|
||||
|
||||
sunnypilot - Version Latest (2022-09-14)u
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.11-02:47:00:GMT - 0.8.17
|
||||
* NEW❗: GM models supported in Force Car Recognition (FCR)
|
||||
* Under "SP - Vehicles"
|
||||
* NEW❗: Prompt to select car in "SP - Vehicles" if car unrecognized on startup
|
||||
* FIXED: Some Toyota with LKAS button no longer requires double press to engage/disengage M.A.D.S.
|
||||
* UPDATED: ESCC: Use radar tracks from radar if available
|
||||
|
||||
sunnypilot - Version Latest (2022-09-13)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.11-02:47:00:GMT - 0.8.17
|
||||
* NEW❗: New metric in Developer UI
|
||||
* Actual Lateral Acceleration (Roll Compensated)
|
||||
|
||||
sunnypilot - Version Latest (2022-09-12)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.11-02:47:00:GMT - 0.8.17
|
||||
* FIXED: Honda Nidec models not gaining speed when longitudinal engaged
|
||||
|
||||
sunnypilot - Version Latest (2022-09-11)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.11-02:47:00:GMT - 0.8.17
|
||||
* NEW❗: Hyundai Enhanced SCC now forwards FCW and AEB signals and commands from radar to car
|
||||
* RE-ENABLED: MADS Status Icon toggle
|
||||
|
||||
sunnypilot - Version Latest (2022-09-10)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.11-02:47:00:GMT - 0.8.17
|
||||
* NEW❗: RAM improvement implementation thanks to realfast!
|
||||
* DISABLED: Chrysler/Jeep/Ram with Custom Stock Longitudinal Control
|
||||
* DISABLED: Volkswagen MQB & PQ with Custom Stock Longitudinal Control
|
||||
|
||||
sunnypilot - Version Latest (2022-09-09)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.09-07:35:00:GMT - 0.8.17
|
||||
* NEW❗: MADS now supporting General Motors (GM)
|
||||
* ADDED: Custom Stock Longitudinal Control - Volkswagen
|
||||
* MQB & PQ
|
||||
* ADDED: Reverse ACC Change
|
||||
* ACC +/-: Short=5, Long=1
|
||||
* ADDED: Custom Stock Longitudinal Control
|
||||
* Hyundai/Kia/Genesis
|
||||
* Honda Bosch
|
||||
* ADDED: Hyundai: 2015-16 Genesis resume from standstill fix (commaai:openpilot#25579) - pending PR
|
||||
* Vision Turn Speed Control re-enabled
|
||||
* Disable Onroad Uploads toggle re-enabled
|
||||
|
||||
sunnypilot - Version Latest (2022-09-08)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.08-04:05:00:GMT - 0.8.17
|
||||
* NEW❗: Block lane change initiation while brake is pressed
|
||||
|
||||
sunnypilot - Version Latest (2022-09-07)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.08-04:05:00:GMT - 0.8.17
|
||||
* NEW❗: Display End-to-end longitudinal 🌮 on screen
|
||||
* NEW❗: Hold DISTANCE button on the steering wheel for 1 second to switch between E2E Long and ACC mode
|
||||
* Enable toggle on the driving screen to switch between modes with End-to-end longitudinal
|
||||
* Only applicable to cars with openpilot longitudinal control
|
||||
* NEW❗: Block lane change initiation while brake is pressed
|
||||
* REMOVED: Dynamic Lane Profile - upstream laneless model is now on by default
|
||||
* REMOVED: hyundai: consistent start from stop (commaai:openpilot#25672) - pending PR
|
||||
|
||||
sunnypilot - Version Latest (2022-09-06)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.06 - 0.8.17
|
||||
* NEW❗: Display useful metrics above the chevron that tracks the lead car
|
||||
* Under "SP - Visuals" menu
|
||||
* Only applicable to cars with openpilot longitudinal control
|
||||
* ADDED: hyundai: consistent start from stop (commaai:openpilot#25672) - pending PR
|
||||
* FIXED: Vienna speed limit interface now scales properly with the outer box
|
||||
* REMOVED: Hyundai long improvements (commaai:openpilot#25604) - closed PR
|
||||
|
||||
sunnypilot - Version Latest (2022-09-05)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.03 - 0.8.17
|
||||
* NEW❗: Speed Limit Control (SLC) interface integrated with upstream
|
||||
* NEW❗: Speed limit from active navigation is now prioritized for Speed Limit Control
|
||||
* NEW❗: MUTCD (U.S.) or Vienna (E.U.) speed limit interfaces can now be selected under "SP - Controls"
|
||||
|
||||
sunnypilot - Version Latest (2022-09-04)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.03 - 0.8.17
|
||||
* FIXED: Gap Adjust Cruise status now displays properly on screen
|
||||
* FIXED: mapd - missing index in list caused mapd to crash
|
||||
* REMOVED: Temporary removed Vision Turn Speed Control
|
||||
|
||||
sunnypilot - Version Latest (2022-09-03)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.09.03 - 0.8.17
|
||||
* ADDED: New border colors for different operation engagements
|
||||
* ADDED: UI: Show barrier when car detected in blind spot
|
||||
* Only applicable to cars that have BSM detection with openpilot
|
||||
* FIXED: Cruise Cancel button no longer display prompt if cruise not engaged
|
||||
* TWEAKED: Update changelogs on startup in Settings -> Software -> Version
|
||||
* REMOVED: Upload Raw Logs and Full Resolution Videos toggles
|
||||
|
||||
sunnypilot - Version Latest (2022-08-31)
|
||||
========================
|
||||
* UPDATED: Synced with commaai's master branch - 2022.08.31 - 0.8.17
|
||||
* ADDED: New border colors for different operation engagements
|
||||
* ADDED: UI: Show barrier when car detected in blind spot
|
||||
* Only applicable to cars that have BSM detection with openpilot
|
||||
* FIXED: Cruise Cancel button no longer display prompt if cruise not engaged
|
||||
* REMOVED: Upload Raw Logs and Full Resolution Videos toggles
|
||||
|
||||
sunnypilot - Version 0.8.16 (2022-07-16)
|
||||
========================
|
||||
* Sync with commaai's master branches
|
||||
* NEW❗: Add toggle to pause lateral actuation below 30 MPH / 50 KM/H
|
||||
* IMPROVED: Better controls mismatch handling
|
||||
* IMPROVED: Less frequent Low Memory alert
|
||||
* IMPROVED: Only allow lateral control when in forward gears
|
||||
* IMPROVED: Better alerts handling on gear changes
|
||||
|
||||
sunnypilot - Version 0.8.14-1.3 (2022-06-29)
|
||||
========================
|
||||
* Hyundai/Kia/Genesis
|
||||
* NEW❗: MADS: Add GAP/Distance button on the steering wheel to engage/disengage
|
||||
* To engage/disengage MADS: Hold the button for 0.5 second
|
||||
* NEW❗: Dynamic Lane Profile: Add toggle to enable "Laneless for Curves in Auto Lane"
|
||||
* HOTFIX🛠: Improve Torque lateral control and reduce ping pong for some Toyota cars
|
||||
* Torque control: higher low speed gains and better steering angle deadzone logic
|
||||
* Developer UI: Remove Distance Traveled, replace with Memory Usage %
|
||||
* This may have a potential to fix the Low Memory alert that may appear
|
||||
|
||||
sunnypilot - Version 0.8.14-1 (2022-06-27)
|
||||
========================
|
||||
* HOTFIX🛠: Honda, Toyota, Volkswagen now initialized correctly with Torque Lateral Live Tune
|
||||
|
||||
sunnypilot - Version 0.8.14-1 (2022-06-27)
|
||||
========================
|
||||
* NEW❗: Added toggle to enable updates for sunnypilot
|
||||
* HOTFIX🛠: Volkswagen car list now displays properly in Force Car Recognition menu
|
||||
* REVERTED: Honda - temporary removes CRUISE (MAIN) for MADS engagement
|
||||
* LKAS button continues to be used for MADS engagement/disengagement
|
||||
|
||||
sunnypilot - Version 0.8.14-1 (2022-06-26)
|
||||
========================
|
||||
Visit https://bit.ly/sunnyreadme for more details
|
||||
* sunnypilot 0.8.14 release - based on openpilot 0.8.14 devel
|
||||
* "0.8.14-prod-c3" branch only supports comma three
|
||||
* If you have a comma two, EON, or other devices than a comma three, visit sunnyhaibin's discord server for more details: https://discord.gg/wRW3meAgtx
|
||||
* Mono-branch support
|
||||
* Honda/Acura
|
||||
* Hyundai/Kia/Genesis
|
||||
* Toyota/Lexus
|
||||
* Volkswagen MQB
|
||||
* Modified Assistive Driving Safety (MADS) Mode
|
||||
* NEW❗: CRUISE (MAIN) now engages MADS for all supported car makes
|
||||
* NEW❗: Added toggle to disable disengaging Automatic Lane Centering (ALC) on the brake pedal
|
||||
* Dynamic Lane Profile (DLP)
|
||||
* NEW❗: Gap Adjust Cruise (GAC)
|
||||
* openpilot longitudinal cars can now adjust between the lead car's following distance gap via 3 modes:
|
||||
* Steering Wheel (SW) | User Interface (UI) | Steering Wheel + User Interface (SW+UI)
|
||||
* NEW❗: Custom Camera & Path Offsets
|
||||
* NEW❗: Torque Lateral Control from openpilot 0.8.15 master (as of 2022-06-15)
|
||||
* NEW❗: Torque Lateral Control Live Tune Menu
|
||||
* NEW❗: Speed Limit Sign from openpilot 0.8.15 master (as of 2022-06-22)
|
||||
* NEW❗: Mapbox Speed Limit data will now be utilized in Speed Limit Control (SLC)
|
||||
* Speed limit data will be utilized in the following availability:
|
||||
* Mapbox (active navigation) -> OpenStreetMap -> Car Interface (Toyota's TSR)
|
||||
* Custom Stock Longitudinal Control
|
||||
* NEW❗: Volkswagen MQB
|
||||
* Honda
|
||||
* Hyundai/Kia/Genesis
|
||||
* NEW❗: Mapbox navigation support for non-Prime users
|
||||
* Visit sunnyhaibin's discord server for more details: https://discord.gg/wRW3meAgtx
|
||||
* Hyundai/Kia/Genesis
|
||||
* NEW❗: Enhanced SCC (ESCC) Support
|
||||
* Requires hardware modification. Visit sunnyhaibin's discord server for more details: https://discord.gg/wRW3meAgtx
|
||||
* NEW❗: Smart MDPS (SMDPS) Support - Auto-detection
|
||||
* Requires hardware modification and custom firmware for the SMDPS. Visit sunnyhaibin's discord server for more details: https://discord.gg/wRW3meAgtx
|
||||
* Toyota/Lexus
|
||||
* NEW❗: Added toggle to enforce stock longitudinal control
|
||||
|
||||
sunnypilot - Version 0.8.12-4
|
||||
========================
|
||||
* NEW❗: Custom Stock Longitudinal Control by setting the target speed via openpilot's "MAX" speed thanks to multikyd!
|
||||
* Speed Limit Control
|
||||
* Vision-based Turn Control
|
||||
* Map-based Turn Control
|
||||
* NEW❗: HDA status integration with Custom Stock Longitudinal Control on applicable HKG cars only
|
||||
* NEW❗: Roll Compensation and SteerRatio fix from comma's 0.8.13
|
||||
* NEW❗: Dev UI to display different metrics on screen
|
||||
* Click on the "MAX" box on the top left of the openpilot display to toggle different metrics display
|
||||
* Lead car relative distance; Lead car relative speed; Actual steering degree; Desired steering degree; Engine RPM; Longitudinal acceleration; Lead car actual speed; EPS torque; Current altitude; Compass direction
|
||||
* NEW❗: Stand Still Timer to display time spent at a stop with M.A.D.S engaged (i.e., stop lights, stop signs, traffic congestions)
|
||||
* NEW❗: Current car speed text turns red when the car is braking
|
||||
* NEW❗: Export GPS tracks into GPX files and upload to OSM thanks to eFini!
|
||||
* NEW❗: Enable ACC and M.A.D.S with a single press of the RES+/SET- button
|
||||
* NEW❗: ACC +/-: Short=5, Long=1
|
||||
* Change the ACC +/- buttons behavior with cruise speed change in openpilot
|
||||
* Disabled (Stock): Short=1, Long=5
|
||||
* Enabled: Short=5, Long=1
|
||||
* NEW❗: Speed Limit Value Offset (not %)*
|
||||
* Set speed limit higher or lower than actual speed limit for a more personalized drive.
|
||||
* *To use this feature, turn off "Enable Speed Limit % Offset"*
|
||||
* NEW❗: Dedicated icon to show the status of M.A.D.S.
|
||||
* NEW❗: No Offroad Fix for non-official devices that cannot shut down after the car is turned off
|
||||
* NEW❗: Stop N' Go Resume Alternative
|
||||
* Offer alternative behavior to auto resume when stopped behind a lead car using stock SCC/ACC. This feature removes the repeating prompt chime when stopped and/or allows some cars to use auto resume (i.e., Genesis)
|
||||
* IMPROVED: Show the lead car icon in the car's dashboard when a lead car is detected by openpilot's camera vision
|
||||
* FIXED: MADS button unintentionally set MAX when using stock longitudinal control thanks to Spektor56!
|
||||
|
||||
sunnypilot - Version 0.8.12-3
|
||||
========================
|
||||
* NEW❗: Bypass "System Malfunction" alert toggle
|
||||
* Prevent openpilot from returning the "System Malfunction" alert that hinders the ability use openpilot
|
||||
* FIXED: Hyundai/Kia/Genesis Brake Hold Active now outputs the correct events on screen with M.A.D.S. engaged
|
||||
|
||||
sunnypilot - Version 0.8.12-2
|
||||
========================
|
||||
* NEW❗: Disable M.A.D.S. toggle to disable the beloved M.A.D.S. feature
|
||||
* Enable Stock openpilot engagement/disengagement
|
||||
* ADJUST: Initialize Driving Screen Off Brightness at 50%
|
||||
|
||||
sunnypilot - Version 0.8.12-1
|
||||
========================
|
||||
* sunnypilot 0.8.12 release - based on openpilot 0.8.12 devel
|
||||
* Dedicated Hyundai/Kia/Genesis branch support
|
||||
* NEW❗: OpenStreetMap integration thanks to the Move Fast team!
|
||||
* NEW❗: Vision-based Turn Control
|
||||
* NEW❗: Map-Data-based Turn Control
|
||||
* NEW❗: Speed Limit Control w/ optional Speed Limit Offset
|
||||
* NEW❗: OpenStreetMap integration debug UI
|
||||
* Only available to openpilot longitudinal enabled cars
|
||||
* NEW❗: Hands on Wheel Monitoring according to EU r079r4e regulation
|
||||
* NEW❗: Disable Onroad Uploads for data-limited Wi-Fi hotspots when using OpenStreetMap related features
|
||||
* NEW❗: Fast Boot (Prebuilt)
|
||||
* NEW❗: Auto Lane Change Timer
|
||||
* NEW❗: Screen Brightness Control (Global)
|
||||
* NEW❗: Driving Screen Off Timer
|
||||
* NEW❗: Driving Screen Off Brightness (%)
|
||||
* NEW❗: Max Time Offroad
|
||||
* Improved user feedback with M.A.D.S. operations thanks to Spektor56!
|
||||
* Lane Path
|
||||
* Green🟢 (Laneful), Red🔴 (Laneless): M.A.D.S. engaged
|
||||
* White⚪: M.A.D.S. suspended or disengaged
|
||||
* Black⚫: M.A.D.S. engaged, steering is being manually override by user
|
||||
* Screen border now only illuminates Green when SCC/ACC is engaged
|
||||
|
||||
sunnypilot - Version 0.8.10-1 (Unreleased)
|
||||
========================
|
||||
* sunnypilot 0.8.10 release - based on openpilot 0.8.10 `devel`
|
||||
* Add Toyota cars to Force Car Recognition
|
||||
|
||||
sunnypilot - Version 0.8.9-4
|
||||
========================
|
||||
* Hyundai: Fix Ioniq Hybrid signals
|
||||
|
||||
sunnypilot - Version 0.8.9-3
|
||||
========================
|
||||
* Update home screen brand and version structure
|
||||
|
||||
sunnypilot - Version 0.8.9-2
|
||||
========================
|
||||
* Added additional Sonata Hybrid Firmware Versions
|
||||
* Features
|
||||
* Modified Assistive Driving Safety (MADS) Mode
|
||||
* Dynamic Lane Profile (DLP)
|
||||
* Quiet Drive 🤫
|
||||
* Force Car Recognition (FCR)
|
||||
* PID Controller: add kd into the stock PID controller
|
||||
|
||||
sunnypilot - Version 0.8.9-1
|
||||
========================
|
||||
* First changelog!
|
||||
* Features
|
||||
* Modified Assistive Driving Safety (MADS) Mode
|
||||
* Dynamic Lane Profile (DLP)
|
||||
* Quiet Drive 🤫
|
||||
* Force Car Recognition (FCR)
|
||||
* PID Controller: add kd into the stock PID controller
|
||||
36
docs_sp/SAFETY.md
Normal file
36
docs_sp/SAFETY.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Safety
|
||||
|
||||
openpilot is an Adaptive Cruise Control (ACC) and Automated Lane Centering (ALC) system.
|
||||
Like other ACC and ALC systems, openpilot is a failsafe passive system and it requires the
|
||||
driver to be alert and to pay attention at all times.
|
||||
|
||||
In order to enforce driver alertness, openpilot includes a driver monitoring feature
|
||||
that alerts the driver when distracted.
|
||||
|
||||
However, even with an attentive driver, we must make further efforts for the system to be
|
||||
safe. We repeat, **driver alertness is necessary, but not sufficient, for openpilot to be
|
||||
used safely** and openpilot is provided with no warranty of fitness for any purpose.
|
||||
|
||||
openpilot is developed in good faith to be compliant with FMVSS requirements and to follow
|
||||
industry standards of safety for Level 2 Driver Assistance Systems. In particular, we observe
|
||||
ISO26262 guidelines, including those from [pertinent documents](https://www.nhtsa.gov/sites/nhtsa.dot.gov/files/documents/13498a_812_573_alcsystemreport.pdf)
|
||||
released by NHTSA. In addition, we impose strict coding guidelines (like [MISRA C : 2012](https://www.misra.org.uk/what-is-misra/))
|
||||
on parts of openpilot that are safety relevant. We also perform software-in-the-loop,
|
||||
hardware-in-the-loop and in-vehicle tests before each software release.
|
||||
|
||||
Following Hazard and Risk Analysis and FMEA, at a very high level, we have designed openpilot
|
||||
ensuring two main safety requirements.
|
||||
|
||||
1. The driver must always be capable to immediately retake manual control of the vehicle,
|
||||
by stepping on the brake pedal or by pressing the cancel button.
|
||||
2. The vehicle must not alter its trajectory too quickly for the driver to safely
|
||||
react. This means that while the system is engaged, the actuators are constrained
|
||||
to operate within reasonable limits[^1].
|
||||
|
||||
For additional safety implementation details, refer to [panda safety model](https://github.com/commaai/panda#safety-model). For vehicle specific implementation of the safety concept, refer to [panda/board/safety/](https://github.com/commaai/panda/tree/master/board/safety).
|
||||
|
||||
**Extra note**: comma.ai strongly discourages the use of openpilot forks with safety code either missing or
|
||||
not fully meeting the above requirements.
|
||||
|
||||
[^1]: For these actuator limits we observe ISO11270 and ISO15622. Lateral limits described there translate to 0.9 seconds of maximum actuation to achieve a 1m lateral deviation.
|
||||
|
||||
3
docs_sp/assets/features/dlp-1.png
Normal file
3
docs_sp/assets/features/dlp-1.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:996ef2f2fad71a5fa0c8a175c6f05fc841330ee57c1edee871077a95c737ac9f
|
||||
size 62046
|
||||
3
docs_sp/assets/features/dlp-2.png
Normal file
3
docs_sp/assets/features/dlp-2.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2ac783627ef97d31bbe79281986226c1a06501a80ba57f73e5cc66bae318242c
|
||||
size 107559
|
||||
3
docs_sp/assets/features/dlp-3.png
Normal file
3
docs_sp/assets/features/dlp-3.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:abac3aad3f1f6fd8cd0d278e82c5a7e79aa7e9e3275fe261bc387acab63bd046
|
||||
size 164956
|
||||
11
docs_sp/branches/definitions.md
Normal file
11
docs_sp/branches/definitions.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Definitions
|
||||
|
||||
| Branch | Definition | Description | Stability/Readiness |
|
||||
|:------------:|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
|
||||
| `release-c3` | Release branch | Stable release branches. After testing on `staging-c3`, updates are pushed here and published publicly. | **Ready to Use:** Highly stable, recommended for most users. |
|
||||
| `staging-c3` | Staging branch | Pre-release testing branches. Community feedback is essential to identify issues before public release. | **Varied Stability:** Generally stable, but intended for testing before public release. |
|
||||
| `dev-c3` | Development branches | Experimental branches with the latest features and bug fixes brought in manually. Expect bugs and braking changes. | **Experimental:** Least stable, suitable for testers and developers. |
|
||||
| `master` | Primary development branch | All Pull Requests are merged here for future releases. CI automatically strips, minifies, and pushes changes to `staging-c3`. Running the `master` branch is suitable for development purposes but not recommended for non-development use. | **For Development Use:** Suitable for developers, may be unstable for general use. |
|
||||
|
||||
!!! tip
|
||||
Your feedback is invaluable. Testers, even without software development experience, are encourage to run `dev-c3` or `staging-c3` and report issues.
|
||||
7
docs_sp/branches/recommended-branches.md
Normal file
7
docs_sp/branches/recommended-branches.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Recommended Branches
|
||||
|
||||
| Branch | Compatible Device | Installation URL | Change Logs |
|
||||
|:----------------:|-------------------|---------------------------|------------------------------------------------------------------------------------------|
|
||||
| `release-c3` | comma 3/3X | release-c3.sunnypilot.ai | [CHANGELOGS.md](https://github.com/sunnyhaibin/sunnypilot/blob/release-c3/CHANGELOGS.md) |
|
||||
| `staging-c3` | comma 3/3X | staging-c3.sunnypilot.ai | [CHANGELOGS.md](https://github.com/sunnyhaibin/sunnypilot/blob/release-c3/CHANGELOGS.md) |
|
||||
| `dev-c3` | comma 3/3X | dev-c3.sunnypilot.ai | [CHANGELOGS.md](https://github.com/sunnyhaibin/sunnypilot/blob/release-c3/CHANGELOGS.md) |
|
||||
68
docs_sp/community/CONTRIBUTING.md
Normal file
68
docs_sp/community/CONTRIBUTING.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# How to contribute
|
||||
|
||||
Our software is open source so you can solve your own problems without needing help from others. And if you solve a problem and are so kind, you can upstream it for the rest of the world to use. Check out our [post about open-sourcing and externalization](https://www.sunnypilot.ai/blog/july/a-new-chapter-transparency/). Development activity is coordinated through our [GitHub Issues](https://github.com/sunnypilot/sunnypilot/issues), [GitHub Discussions](https://github.com/sunnypilot/sunnypilot/discussions), and [Discord](https://discord.sunnypilot.ai).
|
||||
|
||||
### Getting Started
|
||||
|
||||
* Setup your [development environment](https://github.com/sunnypilot/sunnypilot/tree/master/tools)
|
||||
* Read about the [development workflow](WORKFLOW.md)
|
||||
* Join our [Discord](https://discord.sunnypilot.ai)
|
||||
* Docs are at [https://docs.sunnypilot.ai](https://docs.sunnypilot.ai) and [https://www.sunnypilot.ai/blog](https://www.sunnypilot.ai/blog)
|
||||
|
||||
## What contributions are we looking for?
|
||||
|
||||
**sunnypilot's priorities are [safety](../SAFETY.md), stability, quality, and features, in that order.** Aligning with comma's ideals, part of sunnypilot's mission is 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.
|
||||
|
||||
All of these are examples of good PRs:
|
||||
|
||||
* [typo fix](https://github.com/commaai/openpilot/pull/30678)
|
||||
* [removing unused code](https://github.com/commaai/openpilot/pull/30573)
|
||||
* [simple car model port](https://github.com/commaai/openpilot/pull/30245)
|
||||
* [car brand port](https://github.com/commaai/openpilot/pull/23331)
|
||||
* [UI design changes](https://github.com/sunnypilot/sunnypilot/commit/84f6fce90639135611ec568c4d39a352a300bede)
|
||||
* [new features](https://github.com/sunnypilot/sunnypilot/commit/68e1379003bfdb599921cf9cd5684bfb762fd676)
|
||||
|
||||
### What doesn't get merged?
|
||||
|
||||
* **arbitrary 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
|
||||
|
||||
### First contribution
|
||||
|
||||
Check out any [good first issue from commaai's openpilot](https://github.com/commaai/openpilot/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) to get started.
|
||||
|
||||
### What do I need to contribute?
|
||||
|
||||
A lot of sunnypilot work requires only a PC, and some requires a comma device.
|
||||
Most car-related contributions require access to that car, plus a comma device installed in the car.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Pull requests should be against the [`master`](https://github.com/sunnypilot/sunnypilot) branch. If you're unsure about a contribution, feel free to open a discussion, issue, or draft PR to discuss the problem you're trying to solve.
|
||||
|
||||
A good pull request has all of the following:
|
||||
|
||||
- a clearly stated purpose
|
||||
- every line changed directly contributes to the stated purpose
|
||||
- verification, i.e. how did you test your PR?
|
||||
- justification
|
||||
|
||||
* if you've optimized something, post benchmarks to prove it's better
|
||||
* if you've improved your car's tuning, post before and after plots
|
||||
|
||||
- passes the CI tests
|
||||
|
||||
## Contributing without Code
|
||||
|
||||
* Report bugs in [GitHub issues](https://github.com/sunnypilot/sunnypilot/issues).
|
||||
* Report driving issues in the `#general` Discord channel.
|
||||
* Consider opting into driver camera uploads to improve the driver monitoring model.
|
||||
* Connect your device to Wi-Fi regularly, so that comma can pull data for training better driving models.
|
||||
* Run the `staging-c3` branch and report issues. This branch is like `master` but it's built just like a release.
|
||||
43
docs_sp/community/WORKFLOW.md
Normal file
43
docs_sp/community/WORKFLOW.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# sunnypilot development workflow
|
||||
|
||||
Aside from the ML models, most tools used for sunnypilot development are in this repo.
|
||||
|
||||
Most development happens on normal Ubuntu workstations, and not in cars or directly on comma devices. See the [setup guide](https://github.com/sunnypilot/sunnypilot/tree/master/tools) for getting your PC setup for sunnypilot development.
|
||||
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
# get the latest stuff
|
||||
git pull
|
||||
git lfs pull
|
||||
git submodule update --init --recursive
|
||||
|
||||
# update dependencies
|
||||
tools/ubuntu_setup.sh
|
||||
|
||||
# build everything
|
||||
scons -j$(nproc)
|
||||
|
||||
# build just the ui with either of these
|
||||
scons -j8 selfdrive/ui/
|
||||
cd selfdrive/ui/ && scons -u -j8
|
||||
|
||||
# test everything
|
||||
pytest
|
||||
|
||||
# test just logging services
|
||||
cd system/loggerd && pytest .
|
||||
|
||||
# run the linter
|
||||
op lint
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
### Automated Testing
|
||||
|
||||
All PRs and commits are automatically checked by GitHub Actions. Check out `.github/workflows/` for what GitHub Actions runs. Any new tests should be added to GitHub Actions.
|
||||
|
||||
### Code Style and Linting
|
||||
|
||||
Code is automatically checked for style by GitHub Actions as part of the automated tests. You can also run these tests yourself by running `pre-commit run --all`.
|
||||
274
docs_sp/community/reporting-a-bug.md
Normal file
274
docs_sp/community/reporting-a-bug.md
Normal file
@@ -0,0 +1,274 @@
|
||||
# Bug Reports
|
||||
|
||||
sunnypilot is an actively maintained project that we constantly strive to improve. With project of this size and complexity,
|
||||
bugs may occur. If you think you have discovered a bug, you can help us by submitting an issue
|
||||
in [comma's public issue tracker][comma's issue tracker],
|
||||
[sunnypilot's public issue tracker][sunnypilot's issue tracker] or on our [Discord][discord], following this guide.
|
||||
|
||||
[comma's issue tracker]: https://github.com/commaai/openpilot/issues
|
||||
[sunnypilot's issue tracker]: https://github.com/sunnypilot/sunnypilot/issues
|
||||
[discord]: https://discord.sunnypilot.ai
|
||||
|
||||
## Before creating an issue
|
||||
|
||||
With more than 2,500 users, issues are created frequently. The maintainers of this project are trying very hard to keep
|
||||
the number of open issues and reports down by fixing bugs as fast as possible. By following this guide, you will know
|
||||
exactly what information we need to help you quickly.
|
||||
|
||||
**But first, please do the following things before creating an issue.**
|
||||
|
||||
### Upgrade to the latest version
|
||||
|
||||
Chances are that the bug you discovered was already fixed in a subsequent version. Thus, before reporting an issue,
|
||||
ensure that you're running the [latest release version](https://github.com/sunnypilot/sunnypilot/releases) of sunnypilot.
|
||||
Please consult our [installation guide](../setup/read-before-installing.md) to learn how to upgrade to the latest version.
|
||||
|
||||
!!! warning "Bug fixes are not backported"
|
||||
Please understand that only bugs that occur in the latest version of sunnypilot will be addressed. Also, to reduce
|
||||
duplicate efforts, fixes cannot be backported to earlier versions.
|
||||
|
||||
### Remove customizations
|
||||
|
||||
If you're using customized features, such as your own tweaks of the features, please remove them from the branch
|
||||
you are testing from before reporting a bug. We can't offer official support for bugs that might hide in your implementations,
|
||||
so make sure to omit any customizations from the version being tested.
|
||||
|
||||
If, after removing the customizations, the bug is gone, the bug is likely caused by your customizations. A good idea is
|
||||
to add them back gradually to narrow down the root cause of the problem If you did a major version upgrade, make sure
|
||||
you adjusted all customizations you have implemented.
|
||||
|
||||
!!! tip
|
||||
If you are an advanced user, you could also utilize `git bisect`
|
||||
to perform a binary search in the history to find a particular regression.
|
||||
|
||||
!!! warning "Customizations mentioned in our documentation"
|
||||
A handful of the features sunnypilot offers can only be implemented with customizations. if you find a bug in any of
|
||||
the customizations that our documentations explicitly mentioned, you are, of course, encouraged to report it.
|
||||
|
||||
**Don't be shy to ask on our [Discord][discord] for help if you run into problems.**
|
||||
|
||||
### Search for solutions
|
||||
|
||||
At this stage, we know that the problem persists in the latest version and is not caused by any of your customizations.
|
||||
However, the problem might result from a small typo or a syntactical error in the source code, e.g., `selfdrive/car/interfaces.py`.
|
||||
|
||||
Now, before you go through the trouble of creating a bug report that is answered and closed right away with a link to
|
||||
the relevant documentation section or another already reported or closed issue or discussion, you can save time for us
|
||||
and yourself by doing some research:
|
||||
|
||||
1. [Search our documentation] and look for the relevant sections that could be related to your problem. If found, make
|
||||
sure that the settings are configured correctly.
|
||||
2. [Search our Discord][discord] to learn if other users are struggling with similar problems and work together with
|
||||
our
|
||||
great comunity towards a solution. Many problems are solved there.
|
||||
3. [Search comma's openpilot issue tracker][comma's issue tracker], as another user might
|
||||
already have reported the same problem that may exist in
|
||||
stock openpilot, and there might even be a known workaround or fix for it. Thus, no need to create a new issue.
|
||||
4. [Search sunnypilot's issue tracker][sunnypilot's issue tracker], as another user might already have
|
||||
reported the same problem, and there
|
||||
might even be a known workaround or fix for it. Thus, no need to create a new issue.
|
||||
|
||||
[Search our documentation]: ?q=
|
||||
|
||||
**Keep track of all <u>search terms</u> and <u>relevant links</u>, you'll need them in the bug report.**[^1]
|
||||
|
||||
[^1]:
|
||||
We might be using terminology in our documentation different from yours, but we mean the same. When you include the
|
||||
search terms and related links in your bug report, you help us to adjust and improve the documentation.
|
||||
|
||||
---
|
||||
|
||||
At this point, when you still haven't found a solution to your problem, we encourage you to report the issue on our
|
||||
[Discord][discord] because it's now very likely that you stumbled over something we don't know
|
||||
yet. Read the following section
|
||||
to learn how to create a complete and helpful bug report.
|
||||
|
||||
## Issue template
|
||||
|
||||
We have created an issue template to make the bug reporting process as simple as possible, and more efficient for our
|
||||
community and us.
|
||||
|
||||
- [Title]
|
||||
- [Context]<small>optional</small>
|
||||
- [Bug description]
|
||||
- [Related links]
|
||||
- [Reproduction]
|
||||
- [Steps to reproduce]
|
||||
- [Checklist]
|
||||
|
||||
[Title]: #title
|
||||
[Context]: #context
|
||||
[Bug description]: #bug-description
|
||||
[Related links]: #related-links
|
||||
[Reproduction]: #reproduction
|
||||
[Steps to reproduce]: #steps-to-reproduce
|
||||
[Checklist]: #checklist
|
||||
|
||||
### Title
|
||||
|
||||
A good title is short and descriptive. It should be a one-sentence executive summary of the issue, so the impact and
|
||||
severity of the bug you want to report can be inferred from the title.
|
||||
|
||||
| <!-- --> | Example |
|
||||
| -------- |--------------------------------------------------------------------------------------------------------------|
|
||||
| :material-check:{ style="color: #4DB6AC" } __Clear__ | Speed Limit Control (SLC) stuck in `preActive` when engaged |
|
||||
| :material-close:{ style="color: #EF5350" } __Wordy__ | The Speed Limit Control (SLC) remains in the `preActive` state when longitudinal it's supposed to be engaged |
|
||||
| :material-close:{ style="color: #EF5350" } __Unclear__ | SLC does not work |
|
||||
| :material-close:{ style="color: #EF5350" } __Useless__ | Help |
|
||||
|
||||
### Context <small>optional</small> { #context }
|
||||
|
||||
Before describing the bug, you can provide additional context for us to understand what you were trying to achieve.
|
||||
Explain the circumstances in which you're using sunnypilot, and what you _think_ might be relevant. Don't write
|
||||
about the bug here.
|
||||
|
||||
!!! note "__Why this might be helpful__"
|
||||
Some errors only manifest in specific settings, environments or edge cases, for example, when the feature is not available
|
||||
to certain cars.
|
||||
|
||||
### Bug description
|
||||
|
||||
Now, to the bug you want to report. Provide a clear, focused, specific, and concise summary of the bug you encountered.
|
||||
Explain why you think this is a bug that should be reported to sunnypilot, and not to one of its dependencies.[^3]
|
||||
Adhere to the following principles:
|
||||
|
||||
[^3]:
|
||||
Sometimes, users report bugs on our [sunnypilot's issue tracker] or [Discord][discord]
|
||||
that are caused by one of our upstream dependencies, including [comma's openpilot], [comma's panda],
|
||||
or other openpilot forks' dependencies. A good rule of thumb is
|
||||
to reproduce the issue with stock openpilot in the same conditions and
|
||||
check if the problem persists. If it does, the problem is likely not
|
||||
related to sunnypilot and should be reported upstream. When in
|
||||
doubt, use our [Discord][discord] to ask for help.
|
||||
|
||||
[comma's openpilot]: https://github.com/commaai/openpilot
|
||||
[comma's panda]: https://github.com/commaai/panda
|
||||
|
||||
- __Explain the <u>what</u>, not the <u>how</u>__ – don't explain
|
||||
[how to reproduce the bug][Steps to reproduce] here, we're getting there.
|
||||
Focus on articulating the problem and its impact as clearly as possible.
|
||||
|
||||
- __Keep it short and concise__ – if the bug can be precisely explained in one
|
||||
or two sentences, perfect. Don't inflate it – maintainers and future users
|
||||
will be grateful for having to read less.
|
||||
|
||||
- __One bug at a time__ – if you encounter several unrelated bugs, please
|
||||
create separate issues for them. Don't report them in the same issue, as
|
||||
this makes attribution difficult.
|
||||
|
||||
---
|
||||
|
||||
:material-run-fast: __Stretch goal__ – if you found a workaround or a way to fix
|
||||
the bug, you can help other users temporarily mitigate the problem before
|
||||
we maintainers can fix the bug in our code base.
|
||||
|
||||
!!! note "__Why we need this__"
|
||||
In order for us to understand the problem, we need a clear description of it and quantify its impact, which is
|
||||
essential for triage and prioritization.
|
||||
|
||||
### Related links
|
||||
|
||||
Of course, prior to reporting a bug, you have read our documentation and
|
||||
[could not find a working solution][search for solutions]. Please share links
|
||||
to all sections of our documentation that might be relevant to the bug, as it
|
||||
helps us gradually improve it.
|
||||
|
||||
Additionally, since you have searched [comma's issue tracker], [sunnypilot's issue tracker] or [Discord][discord]
|
||||
before reporting an issue, and have possibly found several issues or
|
||||
discussions, include those as well. Every link to an issue or discussion creates
|
||||
a backlink, guiding us maintainers and other users in the future.
|
||||
|
||||
---
|
||||
|
||||
:material-run-fast: __Stretch goal__ – if you also include the search terms you
|
||||
used when [searching for a solution][search for solutions] to your problem, you
|
||||
make it easier for us maintainers to improve the documentation.
|
||||
|
||||
[search for solutions]: #search-for-solutions
|
||||
|
||||
### Reproduction
|
||||
|
||||
A minimal reproduction is at the heart of every well-written bug report, as
|
||||
it allows us maintainers to instantly recreate the necessary conditions to
|
||||
inspect the bug to quickly find its root cause. It's a proven fact that issues
|
||||
with concise and small reproductions can be fixed much faster.
|
||||
|
||||
After you have created the reproduction, take note of your <u>__comma Dongle ID__</u>. It will be used during the bug
|
||||
report.
|
||||
|
||||
!!! note "__Why we need this__"
|
||||
If an issue contains no minimal reproduction or just a link to a repository with thousands of files, the
|
||||
maintainers would need to invest a lot of time into trying to recreate the right conditions to even inspect the
|
||||
bug, let alone fix it.
|
||||
|
||||
!!! warning "Don't share links to repositories"
|
||||
While we know that it is a good practice among developers to include a link
|
||||
to a repository with the bug report, we currently don't support those in our
|
||||
process. The reason is that the reproduction, which is automatically
|
||||
produced by the <u>__route ID__</u> contains all the necessary
|
||||
environment information that is often forgotten to be included.
|
||||
|
||||
Additionally, there are many non-technical users of sunnypilot that
|
||||
have trouble creating repositories.
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
At this point, you provided us with enough information to understand the bug
|
||||
and provided us with a reproduction that we could run and inspect. However, when
|
||||
we check your reproduction, it might not be immediately apparent how we can see
|
||||
the bug in action.
|
||||
|
||||
Thus, please list the specific steps we should follow when running your
|
||||
reproduction to observe the bug. Keep the steps short and concise, and make sure
|
||||
not to leave anything out. Use simple language as you would explain it to a
|
||||
five-year-old, and focus on continuity.
|
||||
|
||||
!!! note "__Why we need this__"
|
||||
We must know how to navigate your reproduction in order
|
||||
to observe the bug, as some bugs only occur at certain viewports or in
|
||||
specific conditions.
|
||||
|
||||
### Uploading logs and preserving routes
|
||||
|
||||
After reproducing the bug, please follow these steps to upload the necessary logs and preserve the routes.
|
||||
|
||||
1. Ensure the route is fully uploaded at [comma Connect]. We cannot look
|
||||
into issues without routes, or at least a comma Dongle ID.
|
||||
|
||||
1. Visit [comma Connect], select the route with the issue reproduced.
|
||||
2. Under the "Files" button, locate "All logs". Click "Upload x files".
|
||||
3. View the upload queue, and confirm that all raw logs are uploaded.
|
||||
|
||||
!!! note
|
||||
Sometimes when the qlogs of the route are still being uploaded, some raw logs may not be available to
|
||||
request for upload. Refresh the page a few times once you have confirmed all qlogs have been uploaded,
|
||||
then try to upload all raw logs again if available.
|
||||
|
||||
2. Share your Dongle ID with sunnypilot on [comma Connect].
|
||||
|
||||
1. Visit [comma Connect], navigate to the gear icon.
|
||||
2. Select "Share by email", and enter `support@sunnypilot.ai`.
|
||||
3. Confirm the sharing by clicking the share icon again.
|
||||
4. Set the device name to your vehicle's year/make/model and your Discord username, so it can be easily identified.
|
||||
|
||||
3. Once all raw logs are uploaded, click "More info" and enable the "Preserved" option to preserve the route.
|
||||
4. Attach the route ID in your issue submission.
|
||||
|
||||
[comma Connect]: https://connect.comma.ai
|
||||
|
||||
### Checklist
|
||||
|
||||
Thanks for following the guide and creating a high-quality and complete bug
|
||||
report – you are almost done. The checklist ensures that you have read this guide
|
||||
and have worked to your best knowledge to provide us with everything we need to
|
||||
know to help you.
|
||||
|
||||
- [ ] I have upgraded to the latest release version of sunnypilot.
|
||||
- [ ] I have removed or disable any customizations and confirmed the bug persists.
|
||||
- [ ] I have searched the documentation, issue trackers, and Discord for similar issues.
|
||||
- [ ] I have created a minimal reproduction and noted my comma Dongle ID.
|
||||
- [ ] I have shared my Dongle ID with sunnypilot at `support@sunnypilot.ai`.
|
||||
- [ ] I have filled out all required sections of the issue template.
|
||||
- [ ] I have followed this guide and ensured all necessary information is included.
|
||||
|
||||
__We'll take it from here.__
|
||||
97
docs_sp/community/reporting-a-docs-issue.md
Normal file
97
docs_sp/community/reporting-a-docs-issue.md
Normal file
@@ -0,0 +1,97 @@
|
||||
# Documentation issues
|
||||
|
||||
Our documentation is composed of many pages and includes extensive
|
||||
information on features, configurations, customizations, and much more. If you
|
||||
have found an inconsistency or see room for improvement, please follow this
|
||||
guide to submit an issue on our [issue tracker].
|
||||
|
||||
[issue tracker]: https://github.com/sunnypilot/sunnypilot/issues
|
||||
|
||||
## Issue template
|
||||
|
||||
Reporting a documentation issue is usually less involved than reporting a bug.
|
||||
Please thoroughly read this guide before creating a new documentation issue,
|
||||
and provide the following information as part of the issue:
|
||||
|
||||
- [Title]
|
||||
- [Description]
|
||||
- [Related links]
|
||||
- [Proposed change] <small>optional</small>
|
||||
- [Checklist]
|
||||
|
||||
[Title]: #title
|
||||
[Description]: #description
|
||||
[Related links]: #related-links
|
||||
[Proposed change]: #proposed-change
|
||||
[Checklist]: #checklist
|
||||
|
||||
### Title
|
||||
|
||||
A good title should be a short, one-sentence description of the issue, contain
|
||||
all relevant information and, in particular, keywords to simplify the search in
|
||||
our issue tracker.
|
||||
|
||||
| <!-- --> | Example |
|
||||
| -------- | -------- |
|
||||
| :material-check:{ style="color: #4DB6AC" } __Clear__ | Clarify Speed Limit Control engagement
|
||||
| :material-close:{ style="color: #EF5350" } __Unclear__ | Missing information in the docs
|
||||
| :material-close:{ style="color: #EF5350" } __Useless__ | Help
|
||||
|
||||
### Description
|
||||
|
||||
Provide a clear and concise summary of the inconsistency or issue you
|
||||
encountered in the documentation or the documentation section that needs
|
||||
improvement. Explain why you think the documentation should be adjusted and
|
||||
describe the severity of the issue:
|
||||
|
||||
- __Keep it short and concise__ – if the inconsistency or issue can be
|
||||
precisely explained in one or two sentences, perfect. Maintainers and future
|
||||
users will be grateful for having to read less.
|
||||
|
||||
- __One issue at a time__ – if you encounter several unrelated inconsistencies,
|
||||
please create separate issues for them. Don't report them in the same issue
|
||||
– it makes attribution difficult.
|
||||
|
||||
!!! note "__Why we need this__"
|
||||
Describing the problem clearly and concisely is a prerequisite for improving
|
||||
our documentation – we need to understand what's wrong, so we can fix it.
|
||||
|
||||
### Related links
|
||||
|
||||
After you described the documentation section that needs to be adjusted above,
|
||||
we now ask you to share the link to this specific documentation section and
|
||||
other possibly related sections. Make sure to use anchor links (permanent links)
|
||||
where possible, as it simplifies discovery.
|
||||
|
||||
!!! note "__Why we need this__"
|
||||
Providing the links to the documentation help us understand which sections
|
||||
of our documentation need to be adjusted, extended, or overhauled.
|
||||
|
||||
### Proposed change <small>optional</small> { #proposed-change }
|
||||
|
||||
Now that you have provided us with the description and links to the
|
||||
documentation sections, you can help us, maintainers, and the community by
|
||||
proposing an improvement. You can sketch out rough ideas or write a concrete
|
||||
proposal. This field is optional but very helpful.
|
||||
|
||||
!!! note "__Why we need this__"
|
||||
An improvement proposal can be beneficial for other users who encounter
|
||||
the same issue, as they offer solutions before we maintainers can update
|
||||
the documentation.
|
||||
|
||||
### Checklist
|
||||
|
||||
Thanks for following the guide and providing valuable feedback for our
|
||||
documentation – you are almost done. The checklist ensures that you have read
|
||||
this guide and have worked to your best knowledge to provide us with every piece
|
||||
of information we need to improve it.
|
||||
|
||||
- [ ] I have provided a clear and descriptive title for the documentation issue.
|
||||
- [ ] I have summarized the inconsistency or issue concisely in the description.
|
||||
- [ ] I have included links to the specific documentation section(s) that need
|
||||
adjustments.
|
||||
- [ ] (Optional) I have proposed a change or improvement to the documentation.
|
||||
- [ ] I have followed this guide and ensured all necessary information is included.
|
||||
|
||||
__We'll take it from here.__
|
||||
|
||||
31
docs_sp/features/dynamic-lane-profile.md
Normal file
31
docs_sp/features/dynamic-lane-profile.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Dynamic Lane Profile (DLP)
|
||||
|
||||
Dynamic Lane Profile (DLP) aims to provide the best driving experience by confidently keeping the vehicle within a lane.
|
||||
It allows sunnypilot to dynamically switch between lane profiles based on the lane recognition confidence level on the road.
|
||||
|
||||
!!! note
|
||||
Due to the removal of lateral planner in newer Driving Models, Dynamic Lane Profile is only available with the
|
||||
following selected Driving Models:
|
||||
|
||||
- New Delhi (December 21, 2023) - ND
|
||||
- Blue Diamond v2 (December 11, 2023) - BDv2
|
||||
- Blue Diamond (November 18, 2023) - BDv1
|
||||
- Farmville (November 7, 2023) - FV
|
||||
- Night Strike (October 3, 2023) - NS
|
||||
|
||||
## Available Modes
|
||||
|
||||
- **Auto Lane**: sunnypilot dynamically selects between `Laneline` or `Laneless` model.
|
||||
- **Laneline**: uses the Laneline model only.
|
||||
- **Laneless**: uses the Laneless model only.
|
||||
|
||||
### Feature Location
|
||||
|
||||
1. Settings
|
||||

|
||||
|
||||
2. `sunnypilot` Panel
|
||||

|
||||
|
||||
3. Select the desired mode
|
||||

|
||||
3
docs_sp/features/index.md
Normal file
3
docs_sp/features/index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Features
|
||||
|
||||
WIP
|
||||
40
docs_sp/features/modified-assistive-driving-safety.md
Normal file
40
docs_sp/features/modified-assistive-driving-safety.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Modified Assistive Driving Safety (M.A.D.S.)
|
||||
|
||||
Modified Assistive Driving Safety (MADS) aims to elevate the user's driving experience by modifying the behaviors of
|
||||
driving assist engagements.
|
||||
|
||||
!!! note
|
||||
This feature aligns closely with comma.ai's safety rules.
|
||||
|
||||
## Independent Engagement
|
||||
|
||||
MADS allows users to engage sunnypilot Automatic Lane Centering (ALC) for lateral control and Adaptive Cruise Control
|
||||
(ACC) or Smart Cruise Control (SCC) for longitudinal control independently.
|
||||
|
||||
??? note "Why This Feature Exists"
|
||||
While newer car models allow for independent engagement of lateral (steering) and longitudinal (speed) control,
|
||||
many older models and stock openpilot enforce engaging both controls together. MADS introduces this modern
|
||||
convenience to older models, effectively backporting a feature found in newer cars and providing users more flexibility.
|
||||
|
||||
## Dedicated Buttons
|
||||
|
||||
### Toggle for sunnypilot ALC
|
||||
|
||||
- `CRUISE (MAIN)` button: Available on all supported cars on sunnypilot.
|
||||
- `LFA` button: Available on newer HKG cars.
|
||||
- `LKAS` button: Available on Honda, Toyota, and Global Subaru.
|
||||
|
||||
### Engagement
|
||||
|
||||
- `SET-` button: Enables ACC/SCC.
|
||||
- `CANCEL` button: Disables ACC/SCC only.
|
||||
- `CRUISE (MAIN)` must be `ON` to use ACC/SCC.
|
||||
|
||||
!!! info
|
||||
The `CRUISE (MAIN)` button disables sunnypilot completely when `OFF`. This is strictly enforced in the panda safety code.
|
||||
|
||||
## Lateral Control on Brake Pedal
|
||||
|
||||
Dedicated toggle to handle Lateral state on brake pedal press and release:
|
||||
|
||||
- **ON**: Pressing the `BRAKE pedal` will pause Automatic Lane Centering.
|
||||
10
docs_sp/getting-started/develop-sunnypilot.md
Normal file
10
docs_sp/getting-started/develop-sunnypilot.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# To start developing sunnypilot
|
||||
|
||||
sunnypilot is a fork of [commaai's openpilot](https://github.com/commaai/openpilot), developed by [sunnypilot](https://sunnypilot.ai) and by users like you.
|
||||
We welcome both pull requests and issues on [GitHub](http://github.com/sunnypilot/sunnypilot).
|
||||
|
||||
* Join the [community Discord](https://discord.sunnypilot.ai)
|
||||
* Check out [the contributing docs](../community/CONTRIBUTING.md)
|
||||
* Check out the [openpilot tools](https://github.com/sunnypilot/sunnypilot/tree/master/tools)
|
||||
* Read about the [development workflow](../community/WORKFLOW.md)
|
||||
* Information about running sunnypilot and code documentation lives on the [sunnypilot docs](https://docs.sunnypilot.ai)
|
||||
16
docs_sp/getting-started/use-sunnypilot-in-a-car.md
Normal file
16
docs_sp/getting-started/use-sunnypilot-in-a-car.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# To start using sunnypilot in a car
|
||||
|
||||
To use sunnypilot in a car, you need four things:
|
||||
|
||||
1. **Supported Device:** a comma 3/3X, available at [comma.ai/shop](https://comma.ai/shop/comma-3x).
|
||||
|
||||
2. **Software:** The setup procedure for the comma 3/3X allows users to enter a URL for custom software. Use the URL `release-c3.sunnypilot.ai` to install the release version.
|
||||
|
||||
3. **Supported Car:** Ensure that you have one of [the 275+ supported cars](https://github.com/sunnypilot/sunnypilot/blob/master/docs/CARS.md).
|
||||
|
||||
4. **Car Harness:** You will also need a [car harness](https://comma.ai/shop/car-harness) to connect your comma 3/3X to your car.
|
||||
|
||||
[comma.ai](https://comma.ai) have detailed instructions for [how to install the harness and device in a car](https://comma.ai/setup).
|
||||
|
||||
!!! note
|
||||
It's possible to run sunnypilot on [other hardware](https://blog.comma.ai/self-driving-car-for-free/), although it's not plug-and-play.
|
||||
11
docs_sp/getting-started/what-is-sunnypilot.md
Normal file
11
docs_sp/getting-started/what-is-sunnypilot.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# What is sunnypilot?
|
||||
|
||||
sunnypilot is a fork of [comma.ai's openpilot](https://github.com/commaai/openpilot), an open source driver assistance system. sunnypilot offers the user a unique driving experience for over 250+ supported car makes and models with modified behaviors of driving assist engagements. sunnypilot complies with comma.ai's safety rules as accurately as possible.
|
||||
|
||||
## How do I use it?
|
||||
|
||||
sunnypilot is designed to be used on the comma 3/3X.
|
||||
|
||||
## How does it work?
|
||||
|
||||
In short, sunnypilot uses the car's existing APIs for the built-in [ADAS](https://en.wikipedia.org/wiki/Advanced_driver-assistance_system) system and simply provides better acceleration, braking, and steering inputs than the stock system.
|
||||
53
docs_sp/how-to/enabling-mapbox-navigation.md
Normal file
53
docs_sp/how-to/enabling-mapbox-navigation.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# :map: Enabling Mapbox navigation
|
||||
|
||||
Enabling Mapbox Navigation on sunnypilot enhances your driving experience by providing accurate maps and directions.
|
||||
|
||||
Following the instructions below, you will set up a free Mapbox account, generating your own access token, and
|
||||
configuring on your comma 3/3X. Next:
|
||||
|
||||
## 1. Create a free Mapbox account
|
||||
|
||||
Sign up for a free Mapbox account. Although a credit card is required for verification, you will not be charged for the
|
||||
free tier.
|
||||
|
||||
## 2. Generate access token
|
||||
|
||||
!!! warning
|
||||
You won't be able to access the secret key after this window.
|
||||
|
||||
On the Dashboard, find the **Access Tokens** section and click `Create a Token`. Name it as you like and set
|
||||
the scopes to allow everything for both Public and Secret. Copy both keys.
|
||||
|
||||
## 3. Connect comma 3/3X to a network
|
||||
|
||||
Once rebooted, connect your comma 3/3X to a network with internet access and note the comma 3/3X’s IP address.
|
||||
|
||||
## 4. Configure keys
|
||||
|
||||
In a browser, navigate to `C3_IP:8082` (e.g., 192.168.1.69:8082). You should see the comma logo and an input field.
|
||||
Paste your Public token (pk.xx), press enter, paste your Secret key (sk.xx), and press enter again. This page lets
|
||||
you search for destinations.
|
||||
|
||||
## 5. Set Home and Work addresses
|
||||
|
||||
To set Home and Work addresses, search for a place, select Home/Work from the dropdown, and click Navigate. For
|
||||
other destinations, select Recent Places.
|
||||
|
||||
!!! warning
|
||||
Your comma 3/3X requires an active internet connection to download map data, generate directions, and update
|
||||
ETA. Once data is downloaded, offline use is possible, but updates (like new directions after a missed turn)
|
||||
won't occur.
|
||||
|
||||
!!! info
|
||||
At this time, it is not possible to search directly on the comma 3/3X.
|
||||
|
||||
!!! info
|
||||
Mapbox does not support alphanumeric addresses (e.g., W123N1234 Main St). There is currently no known
|
||||
workaround for this.
|
||||
|
||||
!!! tip
|
||||
If your comma 3/3X shows a "Map Loading" screen, a reboot via the UI should fix it.
|
||||
Connect the comma 3/3X to a network (i.e. your phone's hotspot) and use your phone browser to search for places.
|
||||
|
||||
In the Navigation panel on the comma 3/3X, select Home, Work, and Recent Places without needing a browser
|
||||
(assuming internet connection).
|
||||
50
docs_sp/how-to/hyundai/enabling-radar-tracks.md
Normal file
50
docs_sp/how-to/hyundai/enabling-radar-tracks.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# :satellite: Radar Tracks
|
||||
|
||||
Unlock the potential of sunnypilot by enabling radar tracks manually on applicable Hyundai/Kia/Genesis cars. Thanks to
|
||||
[@greghogan](https://github.com/greghogan) and [@pd0wm](https://github.com/pd0wm), this feature is now accessible via SSH.
|
||||
|
||||
!!! info "How Radar Points Can Be Used Along With Vision"
|
||||
Current openpilot policy is to identify with vision first and match it to a radar point. If vision sees nothing,
|
||||
you get a false negative and no lead car detection. (Source: [Hubblesphere#7894 from comma.ai community Discord](https://discord.com/channels/469524606043160576/872899198738104330/872913890793635872))
|
||||
|
||||
!!! caution
|
||||
**USE AT YOUR OWN RISK!** Stock system safety features, such as AEB and FCW, may be affected by these changes.
|
||||
|
||||
## 1. Prerequisites
|
||||
|
||||
Ensure the car is in the `OFF` ignition position and connect your comma 3/3X to the car.
|
||||
|
||||
## 2. SSH connection
|
||||
|
||||
Connect to your comma 3/3X via [SSH](https://github.com/commaai/openpilot/wiki/SSH).
|
||||
|
||||
## 3. Execute commands
|
||||
|
||||
In the SSH terminal, execute the following commands:
|
||||
|
||||
```bash
|
||||
pkill -f openpilot
|
||||
python /data/openpilot/selfdrive/debug/hyundai_enable_radar_points.py
|
||||
```
|
||||
Follow the script instructions and ensure no faults appear.
|
||||
|
||||
## 4. Reboot
|
||||
|
||||
Reboot your comma 3/3X. Once rebotoed, start your car and ensure there is no fault caused by enabling the radar tracks.
|
||||
|
||||
## 5. Test drive
|
||||
|
||||
Go for a quick drive, drive behind a lead car, and allow the drive to upload its raw logs in [comma Connect](https://connect.comma.ai).
|
||||
|
||||
## 6. Verify in Cabana
|
||||
|
||||
Load the test route in [Cabana](https://github.com/sunnypilot/sunnypilot/tree/master/tools/cabana), load `hyundai_kia_mando_front_radar.dbc`, search `RADAR_TRACK_50x`,
|
||||
and check `LONG_DIST`.
|
||||
|
||||
## 7. Confirmation
|
||||
|
||||
If the radar tracks data is relevant, you've successfully enabled radar tracks.
|
||||
|
||||
!!! tip
|
||||
Having issues or need assistance? Reach out to the community in the `hyundai-kia-genesis` channel in
|
||||
[sunnypilot Discord](https://discord.sunnypilot.ai) or [commaai community Discord](https://discord.comma.ai).
|
||||
98
docs_sp/how-to/turn-the-speed-blue.md
Normal file
98
docs_sp/how-to/turn-the-speed-blue.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# Turn the speed blue
|
||||
*A getting started guide for openpilot development*
|
||||
|
||||
In 30 minutes, we'll get an openpilot development environment setup on your computer and make some changes to openpilot's UI.
|
||||
|
||||
And if you have a comma 3/3X, we'll deploy the change to your device for testing.
|
||||
|
||||
## 1. Setup your development environment
|
||||
|
||||
Run this to clone openpilot and install all the dependencies:
|
||||
```bash
|
||||
curl -fsSL openpilot.comma.ai | bash
|
||||
```
|
||||
|
||||
Navigate to openpilot folder & activate a Python virtual environment
|
||||
```bash
|
||||
cd openpilot
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
Then, compile openpilot:
|
||||
```bash
|
||||
scons -j8
|
||||
```
|
||||
|
||||
## 2. Run replay
|
||||
|
||||
We'll run the `replay` tool with the demo route to get data streaming for testing our UI changes.
|
||||
```bash
|
||||
# in terminal 1
|
||||
tools/replay/replay --demo
|
||||
|
||||
# in terminal 2
|
||||
selfdrive/ui/ui
|
||||
```
|
||||
|
||||
The openpilot UI should launch and show a replay of the demo route.
|
||||
|
||||
If you have your own comma device, you can replace `--demo` with one of your own routes from comma connect.
|
||||
|
||||
## 3. Make the speed blue
|
||||
|
||||
Search for “mph” with git grep in the `ui` folder.
|
||||
```bash
|
||||
$ git grep "mph" selfdrive/ui/
|
||||
paint.cc: ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, COLOR_WHITE_ALPHA(200), "sans-regular");
|
||||
```
|
||||
|
||||
The line right above contains the actual speed. Unfortunately, COLOR_BLUE isn’t defined, but a git grep of COLOR_WHITE shows it’s nvgRGBA(255, 255, 255, 255). Personally, I like a lighter blue, so I went with #8080FF.
|
||||
```bash
|
||||
$ git diff
|
||||
diff --git a/selfdrive/ui/paint.cc b/selfdrive/ui/paint.cc
|
||||
index 821d95115..cc996eaa1 100644
|
||||
--- a/selfdrive/ui/paint.cc
|
||||
+++ b/selfdrive/ui/paint.cc
|
||||
@@ -175,8 +175,8 @@ static void ui_draw_vision_speed(UIState *s) {
|
||||
const float speed = std::max(0.0, (*s->sm)["carState"].getCarState().getVEgo() * (s->scene.is_metric ? 3.6 : 2.2369363));
|
||||
const std::string speed_str = std::to_string((int)std::nearbyint(speed));
|
||||
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
|
||||
- ui_draw_text(s, s->fb_w/2, 210, speed_str.c_str(), 96 * 2.5, COLOR_WHITE, "sans-bold");
|
||||
- ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, COLOR_WHITE_ALPHA(200), "sans-regular");
|
||||
+ ui_draw_text(s, s->fb_w/2, 210, speed_str.c_str(), 96 * 2.5, nvgRGBA(128, 128, 255, 255), "sans-bold");
|
||||
+ ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, nvgRGBA(128, 128, 255, 200), "sans-regular");
|
||||
}
|
||||
|
||||
static void ui_draw_vision_event(UIState *s) {
|
||||
```
|
||||
|
||||
|
||||
## 4. Rebuild UI, and admire your work
|
||||
|
||||
```
|
||||
scons -j8 && selfdrive/ui/ui
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 5. Push your fork to GitHub
|
||||
|
||||
Click fork on GitHub. Then, push with:
|
||||
```bash
|
||||
git remote rm origin
|
||||
git remote add origin git@github.com:<your-github-username>/openpilot.git
|
||||
git add .
|
||||
git commit -m "Make the speed blue."
|
||||
git push --set-upstream origin master
|
||||
```
|
||||
|
||||
## 6. Run your fork on device in your car!
|
||||
|
||||
Uninstall openpilot from your device through the settings. Then, enter the URL for your very own installer:
|
||||
```
|
||||
installer.comma.ai/<your-github-username>/master
|
||||
```
|
||||
|
||||
## 7. Admire your work IRL
|
||||
|
||||

|
||||
1
docs_sp/index.md
Symbolic link
1
docs_sp/index.md
Symbolic link
@@ -0,0 +1 @@
|
||||
getting-started/what-is-sunnypilot.md
|
||||
@@ -0,0 +1,14 @@
|
||||
# Prohibited Safety Modifications
|
||||
|
||||
All [official sunnypilot branches](https://github.com/sunnyhaibin/sunnypilot/branches) strictly adhere to [comma.ai's safety policy](https://github.com/commaai/openpilot/blob/master/docs/SAFETY.md). Any changes that go against
|
||||
this policy will result in your fork and your device being banned from both comma.ai and sunnypilot channels.
|
||||
|
||||
The following changes are **VIOLATIONS** of the safety policy and **ARE NOT** supported in any official sunnypilot branches:
|
||||
|
||||
!!! danger "Driver Monitoring"
|
||||
- "Nerfing" or reducing monitoring parameters.
|
||||
|
||||
!!! danger "Panda Safety"
|
||||
- No preventing disengaging of <ins>**longitudinal control**</ins> (positive/negative acceleration) on brake pedal press.
|
||||
- No auto re-engaging of <ins>**longitudinal control**</ins> (positive/negative acceleration) on brake pedal release.
|
||||
- No disengaging on `CRUISE MAIN` in `OFF` state.
|
||||
1
docs_sp/setup/changelogs/index.md
Symbolic link
1
docs_sp/setup/changelogs/index.md
Symbolic link
@@ -0,0 +1 @@
|
||||
../../CHANGELOGS.md
|
||||
20
docs_sp/setup/read-before-installing.md
Normal file
20
docs_sp/setup/read-before-installing.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# 🚨 Read Before Installing
|
||||
|
||||
It is recommended to read the <u>**entire documentation**</u> before proceeding. This will ensure that you fully understand each added feature in sunnypilot. This also ensures that you are choosing the correct settings and branch for your car to have the best driving experience.
|
||||
|
||||
!!! warning
|
||||
By installing this software, you accept all responsibility for anything that might occur while you use it. sunnypilot and all contributors to sunnypilot are not liable.
|
||||
|
||||
**Use at your own risk.**
|
||||
|
||||
## Installation
|
||||
|
||||
Please refer to the [Recommended Branches](../branches/recommended-branches.md) to find your preferred/supported branch. This guide will assume you want to install the latest `release-c3` branch.
|
||||
|
||||
You can install sunnypilot on your comma 3/3X using one of the following methods:
|
||||
|
||||
- ### [URL Method (Directly on Device)](url-method.md)
|
||||
This method allows you to install sunnypilot directly from your device's screen using a provided URL. It's simple and user-friendly, requiring no additional tools or external devices.
|
||||
|
||||
- ### [SSH Method (Command Line)](ssh-method.md)
|
||||
This method is for advanced users who prefer to use SSH to clone the sunnypilot repository and install it manually via the command line. It offeres greater control over the installation process.
|
||||
26
docs_sp/setup/ssh-method.md
Normal file
26
docs_sp/setup/ssh-method.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# SSH Method
|
||||
|
||||
If you are looking to install sunnypilot via SSH, run the following commands in an SSH terminal after connecting to your comma 3/3X:
|
||||
|
||||
1. Navigate to `data` directory
|
||||
```sh
|
||||
cd /data
|
||||
```
|
||||
|
||||
2. Clone sunnypilot
|
||||
|
||||
!!! example ""
|
||||
`release-c3` branch is used in this step as an example.
|
||||
```sh
|
||||
git clone release-c3 --recurse-submodules https://github.com/sunnyhaibin/openpilot.git
|
||||
```
|
||||
|
||||
3. Git LFS
|
||||
```sh
|
||||
git lfs pull
|
||||
```
|
||||
|
||||
4. Reboot
|
||||
```sh
|
||||
sudo reboot
|
||||
```
|
||||
37
docs_sp/setup/url-method.md
Normal file
37
docs_sp/setup/url-method.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# URL Method
|
||||
|
||||
The URL installation method can be done in two ways, depending on your current setup and version of sunnypilot on your device.
|
||||
|
||||
=== "sunnypilot not installed, or sunnypilot < 0.8.17"
|
||||
|
||||
1. [Factory reset/uninstall](https://github.com/commaai/openpilot/wiki/FAQ#how-can-i-reset-the-device) the previous software if you have another software/fork installed.
|
||||
2. After factory reset/uninstall, upon reboot, select `Custom Software` when given the option.
|
||||
3. Input the **Installation URL** per [Recommended Branches](../branches/recommended-branches.md).
|
||||
4. Complete the rest of the installation by following the onscreen instructions.
|
||||
|
||||
!!! info "[Recommended Branches](../branches/recommended-branches.md)"
|
||||
| Branch | Installation URL |
|
||||
|:------------:|:--------------------------------:|
|
||||
| `release-c3` | release-c3.sunnypilot.ai |
|
||||
| `staging-c3` | staging-c3.sunnypilot.ai |
|
||||
| `dev-c3` | dev-c3.sunnypilot.ai |
|
||||
!!! example "Example of Installation URL"
|
||||
`release-c3.sunnypilot.ai`[^1]
|
||||
|
||||
=== "sunnypilot already installed, or sunnypilot ≥ 0.8.17"
|
||||
|
||||
1. On the comma 3/3X, go to `Settings` → `Software`.
|
||||
2. At the `Download` option, press `CHECK`. This will fetch the list of latest branches from the sunnypilot repository on GitHub.
|
||||
3. At the `Target Branch` option, press `SELECT` to open the `Target Branch` selector.
|
||||
4. Scroll and select the **Desired Branch** per Recommended Branches.
|
||||
|
||||
!!! info "[Recommended Branches](../branches/recommended-branches.md)"
|
||||
| Branch | Installation URL |
|
||||
|:------------:|:--------------------------------:|
|
||||
| `release-c3` | release-c3.sunnypilot.ai |
|
||||
| `staging-c3` | staging-c3.sunnypilot.ai |
|
||||
| `dev-c3` | dev-c3.sunnypilot.ai |
|
||||
!!! example "Example of Desired Branch"
|
||||
`release-c3`
|
||||
|
||||
[^1]: Shortened URL for convenience. Full URL is `smiskol.com/fork/sunnyhaibin/release-c3`.
|
||||
150
mkdocs-sp.yml
Normal file
150
mkdocs-sp.yml
Normal file
@@ -0,0 +1,150 @@
|
||||
site_name: sunnypilot docs
|
||||
repo_name: sunnypilot/sunnypilot
|
||||
repo_url: https://github.com/sunnypilot/sunnypilot/
|
||||
site_description: sunnypilot Documentation
|
||||
site_url: https://docs.sunnypilot.ai
|
||||
edit_uri: blob/new-docs/docs_sp
|
||||
|
||||
exclude_docs: README.md
|
||||
|
||||
strict: true
|
||||
docs_dir: docs_sp
|
||||
site_dir: docs_sp_site/
|
||||
|
||||
theme:
|
||||
name: material
|
||||
icon:
|
||||
repo: fontawesome/brands/github
|
||||
edit: material/file-edit-outline
|
||||
view: material/file-eye-outline
|
||||
features:
|
||||
- content.action.edit
|
||||
- content.action.view
|
||||
- content.code.copy
|
||||
- content.code.select
|
||||
#- navigation.expand
|
||||
- navigation.footer
|
||||
- navigation.indexes
|
||||
- navigation.path
|
||||
- navigation.sections
|
||||
- navigation.tabs
|
||||
- navigation.tabs.sticky
|
||||
- navigation.top
|
||||
- search.suggest
|
||||
- search.highlight
|
||||
- search.share
|
||||
font:
|
||||
text: Roboto
|
||||
code: Roboto Mono
|
||||
palette:
|
||||
- media: "(prefers-color-scheme)"
|
||||
toggle:
|
||||
icon: material/link
|
||||
name: Switch to light mode
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
primary: indigo
|
||||
accent: indigo
|
||||
toggle:
|
||||
icon: material/toggle-switch
|
||||
name: Switch to dark mode
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
primary: black
|
||||
accent: indigo
|
||||
toggle:
|
||||
icon: material/toggle-switch-off
|
||||
name: Switch to system preference
|
||||
navigation_depth: 3
|
||||
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- attr_list
|
||||
- def_list
|
||||
- footnotes
|
||||
- md_in_html
|
||||
- pymdownx.details
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
line_spans: __span
|
||||
pygments_lang_class: true
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.magiclink:
|
||||
normalize_issue_symbols: true
|
||||
repo_url_shorthand: true
|
||||
user: sunnypilot
|
||||
repo: sunnypilot
|
||||
- pymdownx.snippets
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
- pymdownx.tasklist:
|
||||
custom_checkbox: true
|
||||
clickable_checkbox: true
|
||||
- toc:
|
||||
permalink: true
|
||||
|
||||
plugins:
|
||||
- git-authors
|
||||
- git-committers:
|
||||
repository: sunnypilot/sunnypilot
|
||||
branch: master
|
||||
enabled: !ENV [CI, false]
|
||||
- git-revision-date-localized:
|
||||
enable_creation_date: true
|
||||
- search
|
||||
|
||||
extra:
|
||||
analytics:
|
||||
provider: google
|
||||
property: !ENV GOOGLE_ANALYTICS_KEY
|
||||
feedback:
|
||||
title: Was this page helpful?
|
||||
ratings:
|
||||
- icon: material/emoticon-happy-outline
|
||||
name: This page was helpful
|
||||
data: 1
|
||||
note: >-
|
||||
Thanks for your feedback!
|
||||
- icon: material/emoticon-sad-outline
|
||||
name: This page could be improved
|
||||
data: 0
|
||||
note: >-
|
||||
Thanks for your feedback! Help us improve this page by
|
||||
using our <a href="..." target="_blank" rel="noopener">feedback form</a>.
|
||||
|
||||
nav:
|
||||
- Getting Started:
|
||||
- index.md
|
||||
- What is sunnypilot?: getting-started/what-is-sunnypilot.md
|
||||
- Use sunnypilot in a car: getting-started/use-sunnypilot-in-a-car.md
|
||||
- Develop sunnypilot: getting-started/develop-sunnypilot.md
|
||||
- Setup:
|
||||
- 🚨 Read before installing 🚨: setup/read-before-installing.md
|
||||
- Installation:
|
||||
- URL Method: setup/url-method.md
|
||||
- SSH Method: setup/ssh-method.md
|
||||
- Changelogs:
|
||||
- setup/changelogs/index.md
|
||||
- Features:
|
||||
- features/index.md
|
||||
- Community:
|
||||
- Contributing: community/CONTRIBUTING.md
|
||||
- Reporting a bug: community/reporting-a-bug.md
|
||||
- Reporting a docs issue: community/reporting-a-docs-issue.md
|
||||
- Asking a question: https://discord.sunnypilot.ai
|
||||
- Safety Information:
|
||||
- Safety: SAFETY.md
|
||||
- Prohibited safety modifications: safety-information/prohibited-safety-modifications.md
|
||||
- How To:
|
||||
- Enabling Mapbox navigation: how-to/enabling-mapbox-navigation.md
|
||||
- Turn the speed blue: how-to/turn-the-speed-blue.md
|
||||
- Hyundai:
|
||||
- Enabling Radar Tracks: how-to/hyundai/enabling-radar-tracks.md
|
||||
- References:
|
||||
- Branches:
|
||||
- Definitions: branches/definitions.md
|
||||
- Recommended Branches: branches/recommended-branches.md
|
||||
38
mkdocs.yml
Normal file
38
mkdocs.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
site_name: openpilot docs
|
||||
repo_url: https://github.com/commaai/openpilot/
|
||||
site_url: https://docs.comma.ai
|
||||
|
||||
exclude_docs: README.md
|
||||
|
||||
strict: true
|
||||
docs_dir: docs
|
||||
site_dir: docs_site/
|
||||
|
||||
theme:
|
||||
name: readthedocs
|
||||
navigation_depth: 3
|
||||
|
||||
nav:
|
||||
- Getting Started:
|
||||
- What is openpilot?: getting-started/what-is-openpilot.md
|
||||
- How-to:
|
||||
- Turn the speed blue: how-to/turn-the-speed-blue.md
|
||||
- Connect to a comma 3/3X: how-to/connect-to-comma.md
|
||||
#- Replay a drive: how-to/replay-a-drive.md
|
||||
- Concepts:
|
||||
- Logs: concepts/logs.md
|
||||
- Safety: concepts/safety.md
|
||||
- Car Porting:
|
||||
- What is a car port?: car-porting/what-is-a-car-port.md
|
||||
- Porting a car brand: car-porting/brand-port.md
|
||||
- Porting a car model: car-porting/model-port.md
|
||||
- Contributing:
|
||||
- Roadmap: contributing/roadmap.md
|
||||
#- Architecture: contributing/architecture.md
|
||||
- Contributing Guide →: https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md
|
||||
- Links:
|
||||
- Blog →: https://blog.comma.ai
|
||||
- Bounties →: https://comma.ai/bounties
|
||||
- GitHub →: https://github.com/commaai
|
||||
- Discord →: https://discord.comma.ai
|
||||
- X →: https://x.com/comma_ai
|
||||
Submodule msgq_repo updated: da77480a96...e6c0716e41
1
opendbc
1
opendbc
Submodule opendbc deleted from adc1fffe60
1
opendbc_repo
Submodule
1
opendbc_repo
Submodule
Submodule opendbc_repo added at 529474a50e
2
panda
2
panda
Submodule panda updated: 5d92bdc6de...6a6cd44519
@@ -26,7 +26,7 @@ dependencies = [
|
||||
"pycapnp",
|
||||
"Cython",
|
||||
"setuptools",
|
||||
"numpy < 2.0.0", # control does not support numpy 2
|
||||
"numpy",
|
||||
|
||||
# body / webrtcd
|
||||
"aiohttp",
|
||||
@@ -52,27 +52,35 @@ dependencies = [
|
||||
"websocket_client",
|
||||
|
||||
# acados deps
|
||||
"casadi",
|
||||
"casadi @ https://github.com/commaai/casadi/releases/download/nightly-release-3.6.6/casadi-3.6.6-cp312-none-manylinux2014_aarch64.whl ; (python_version == '3.12' and platform_machine == 'aarch64')", # TODO: Go back to pypi casadi when they fix aarch64 for python312
|
||||
"casadi; platform_machine != 'aarch64' or python_version != '3.12'",
|
||||
"future-fstrings",
|
||||
|
||||
# these should be removed
|
||||
"psutil",
|
||||
"pycryptodome", # used in updated/casync, panda, body, and a test
|
||||
|
||||
#logreader
|
||||
"zstd",
|
||||
# logreader
|
||||
"zstandard",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
docs = [
|
||||
"Jinja2",
|
||||
"natsort",
|
||||
"mkdocs",
|
||||
"mkdocs-material",
|
||||
"mkdocs-git-revision-date-localized-plugin",
|
||||
"mkdocs-git-committers-plugin-2",
|
||||
"mkdocs-git-authors-plugin",
|
||||
"mkdocs-glightbox",
|
||||
]
|
||||
|
||||
testing = [
|
||||
"coverage",
|
||||
"hypothesis ==6.47.*",
|
||||
"import-linter",
|
||||
"mypy",
|
||||
"pre-commit",
|
||||
"pytest",
|
||||
"pytest-cov",
|
||||
"pytest-cpp",
|
||||
@@ -83,30 +91,25 @@ testing = [
|
||||
"pytest-asyncio",
|
||||
"pytest-mock",
|
||||
"pytest-repeat",
|
||||
"ruff"
|
||||
"ruff",
|
||||
"codespell",
|
||||
]
|
||||
|
||||
dev = [
|
||||
"av",
|
||||
"azure-identity",
|
||||
"azure-storage-blob",
|
||||
"breathe",
|
||||
"control",
|
||||
"dictdiffer",
|
||||
"flaky",
|
||||
"inputs",
|
||||
"lru-dict",
|
||||
"matplotlib",
|
||||
"metadrive-simulator; platform_machine != 'aarch64'",
|
||||
"mpld3",
|
||||
"myst-parser",
|
||||
"natsort",
|
||||
"opencv-python-headless",
|
||||
"metadrive-simulator@git+https://github.com/commaai/metadrive@opencv_headless ; platform_machine != 'aarch64'",
|
||||
"parameterized >=0.8, <0.9",
|
||||
#pprofile = "*"
|
||||
#"pprofile",
|
||||
"pyautogui",
|
||||
"pygame",
|
||||
"pyopencl; platform_machine != 'aarch64'", # broken on arm64
|
||||
"pytools < 2024.1.11; platform_machine != 'aarch64'", # pyopencl use a broken version
|
||||
"pywinctl",
|
||||
"pyprof2calltree",
|
||||
"rerun-sdk",
|
||||
@@ -116,12 +119,8 @@ dev = [
|
||||
|
||||
# this is only pinned since 5.15.11 is broken
|
||||
"pyqt5 ==5.15.2; platform_machine == 'x86_64'", # no aarch64 wheels for macOS/linux
|
||||
|
||||
]
|
||||
|
||||
[tool.uv.sources]
|
||||
metadrive-simulator = { git = "https://github.com/commaai/metadrive.git", branch = "opencv_headless" }
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://comma.ai"
|
||||
|
||||
@@ -132,9 +131,12 @@ build-backend = "hatchling.build"
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = [ "." ]
|
||||
|
||||
[tool.hatch.metadata]
|
||||
allow-direct-references = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "6.0"
|
||||
addopts = "--ignore=openpilot/ --ignore=cereal/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=teleoprtc_repo/ --ignore=msgq/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup"
|
||||
addopts = "--ignore=openpilot/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=teleoprtc_repo/ --ignore=msgq/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup"
|
||||
cpp_files = "test_*"
|
||||
cpp_harness = "selfdrive/test/cpp_harness.py"
|
||||
python_files = "test_*.py"
|
||||
@@ -167,6 +169,13 @@ testpaths = [
|
||||
"cereal/messaging/tests",
|
||||
]
|
||||
|
||||
[tool.codespell]
|
||||
count = true
|
||||
quiet-level = 3
|
||||
# if you've got a short variable name that's getting flagged, add it here
|
||||
ignore-words-list = "bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn"
|
||||
builtin = "clear,rare,informal,usage,code,names,en-GB_to_en-US"
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.11"
|
||||
plugins = [
|
||||
@@ -223,7 +232,7 @@ lint.ignore = [
|
||||
"UP038", # (x, y) -> x|y for isinstance
|
||||
]
|
||||
line-length = 160
|
||||
target-version="py311"
|
||||
target-version ="py311"
|
||||
exclude = [
|
||||
"body",
|
||||
"cereal",
|
||||
@@ -235,7 +244,8 @@ exclude = [
|
||||
"teleoprtc_repo",
|
||||
"third_party",
|
||||
]
|
||||
lint.flake8-implicit-str-concat.allow-multiline=false
|
||||
lint.flake8-implicit-str-concat.allow-multiline = false
|
||||
|
||||
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
||||
"selfdrive".msg = "Use openpilot.selfdrive"
|
||||
"common".msg = "Use openpilot.common"
|
||||
@@ -247,5 +257,6 @@ lint.flake8-implicit-str-concat.allow-multiline=false
|
||||
|
||||
[tool.coverage.run]
|
||||
concurrency = ["multiprocessing", "thread"]
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "preserve"
|
||||
|
||||
Submodule rednose_repo updated: 72b3479bab...023a6195db
@@ -2,7 +2,7 @@
|
||||
"embeds": [
|
||||
{
|
||||
"title": "🎉 sunnypilot `${NEW_BRANCH}` New Update 🎉",
|
||||
"description": "[sunnypilot](${PUBLIC_REPO_URL}): Build #${CI_PIPELINE_IID} of branch [${NEW_BRANCH}](${PUBLIC_REPO_URL}/tree/${NEW_BRANCH}) has been published.\n\nDrive safe! 🚗💨",
|
||||
"description": "[sunnypilot](${PUBLIC_REPO_URL}): Build #${EXTRA_VERSION_IDENTIFIER} of branch [${NEW_BRANCH}](${PUBLIC_REPO_URL}/tree/${NEW_BRANCH}) has been published.\n\nDrive safe! 🚗💨",
|
||||
"color": 4321431
|
||||
}
|
||||
]
|
||||
|
||||
2
release/ci/sync-lfs.sh
Normal file → Executable file
2
release/ci/sync-lfs.sh
Normal file → Executable file
@@ -4,4 +4,4 @@ mv .lfsconfig-comma .lfsconfig
|
||||
git lfs fetch --all; git lfs pull
|
||||
mv .lfsconfig .lfsconfig-comma
|
||||
mv .lfsconfig.bak .lfsconfig
|
||||
git lfs fetch --all; git lfs push origin main
|
||||
git lfs fetch --all; git lfs push --all origin
|
||||
|
||||
@@ -10,14 +10,12 @@ ROOT = HERE + "/.."
|
||||
# - minimizing release download size
|
||||
# - keeping the diff readable
|
||||
blacklist = [
|
||||
"body/STL/",
|
||||
|
||||
"panda/drivers/",
|
||||
"panda/examples/",
|
||||
"panda/tests/safety/",
|
||||
|
||||
"opendbc/.*.dbc$",
|
||||
"opendbc/generator/",
|
||||
"opendbc_repo/dbc/.*.dbc$",
|
||||
"opendbc_repo/dbc/generator/",
|
||||
|
||||
"cereal/.*test.*",
|
||||
"^common/tests/",
|
||||
@@ -28,7 +26,6 @@ blacklist = [
|
||||
"selfdrive/car/tests/test_models.*",
|
||||
|
||||
"^tools/",
|
||||
"^scripts/",
|
||||
"^tinygrad_repo/",
|
||||
|
||||
"matlab.*.md",
|
||||
@@ -118,55 +115,55 @@ whitelist = [
|
||||
"tinygrad_repo/tinygrad/.*.py",
|
||||
|
||||
# TODO: do this automatically
|
||||
"opendbc/comma_body.dbc",
|
||||
"opendbc/chrysler_ram_hd_generated.dbc",
|
||||
"opendbc/chrysler_ram_dt_generated.dbc",
|
||||
"opendbc/chrysler_pacifica_2017_hybrid_generated.dbc",
|
||||
"opendbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc",
|
||||
"opendbc/gm_global_a_powertrain_generated.dbc",
|
||||
"opendbc/gm_global_a_object.dbc",
|
||||
"opendbc/gm_global_a_chassis.dbc",
|
||||
"opendbc/FORD_CADS.dbc",
|
||||
"opendbc/ford_fusion_2018_adas.dbc",
|
||||
"opendbc/ford_lincoln_base_pt.dbc",
|
||||
"opendbc/honda_accord_2018_can_generated.dbc",
|
||||
"opendbc/acura_ilx_2016_can_generated.dbc",
|
||||
"opendbc/acura_rdx_2018_can_generated.dbc",
|
||||
"opendbc/acura_rdx_2020_can_generated.dbc",
|
||||
"opendbc/honda_civic_touring_2016_can_generated.dbc",
|
||||
"opendbc/honda_civic_hatchback_ex_2017_can_generated.dbc",
|
||||
"opendbc/honda_crv_touring_2016_can_generated.dbc",
|
||||
"opendbc/honda_crv_ex_2017_can_generated.dbc",
|
||||
"opendbc/honda_crv_ex_2017_body_generated.dbc",
|
||||
"opendbc/honda_crv_executive_2016_can_generated.dbc",
|
||||
"opendbc/honda_fit_ex_2018_can_generated.dbc",
|
||||
"opendbc/honda_odyssey_exl_2018_generated.dbc",
|
||||
"opendbc/honda_odyssey_extreme_edition_2018_china_can_generated.dbc",
|
||||
"opendbc/honda_insight_ex_2019_can_generated.dbc",
|
||||
"opendbc/acura_ilx_2016_nidec.dbc",
|
||||
"opendbc/honda_civic_ex_2022_can_generated.dbc",
|
||||
"opendbc/hyundai_canfd.dbc",
|
||||
"opendbc/hyundai_kia_generic.dbc",
|
||||
"opendbc/hyundai_kia_mando_front_radar_generated.dbc",
|
||||
"opendbc/mazda_2017.dbc",
|
||||
"opendbc/nissan_x_trail_2017_generated.dbc",
|
||||
"opendbc/nissan_leaf_2018_generated.dbc",
|
||||
"opendbc/subaru_global_2017_generated.dbc",
|
||||
"opendbc/subaru_global_2020_hybrid_generated.dbc",
|
||||
"opendbc/subaru_outback_2015_generated.dbc",
|
||||
"opendbc/subaru_outback_2019_generated.dbc",
|
||||
"opendbc/subaru_forester_2017_generated.dbc",
|
||||
"opendbc/toyota_tnga_k_pt_generated.dbc",
|
||||
"opendbc/toyota_new_mc_pt_generated.dbc",
|
||||
"opendbc/toyota_nodsu_pt_generated.dbc",
|
||||
"opendbc/toyota_adas.dbc",
|
||||
"opendbc/toyota_tss2_adas.dbc",
|
||||
"opendbc/vw_golf_mk4.dbc",
|
||||
"opendbc/vw_mqb_2010.dbc",
|
||||
"opendbc/tesla_can.dbc",
|
||||
"opendbc/tesla_radar_bosch_generated.dbc",
|
||||
"opendbc/tesla_radar_continental_generated.dbc",
|
||||
"opendbc/tesla_powertrain.dbc",
|
||||
"opendbc_repo/dbc/comma_body.dbc",
|
||||
"opendbc_repo/dbc/chrysler_ram_hd_generated.dbc",
|
||||
"opendbc_repo/dbc/chrysler_ram_dt_generated.dbc",
|
||||
"opendbc_repo/dbc/chrysler_pacifica_2017_hybrid_generated.dbc",
|
||||
"opendbc_repo/dbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc",
|
||||
"opendbc_repo/dbc/gm_global_a_powertrain_generated.dbc",
|
||||
"opendbc_repo/dbc/gm_global_a_object.dbc",
|
||||
"opendbc_repo/dbc/gm_global_a_chassis.dbc",
|
||||
"opendbc_repo/dbc/FORD_CADS.dbc",
|
||||
"opendbc_repo/dbc/ford_fusion_2018_adas.dbc",
|
||||
"opendbc_repo/dbc/ford_lincoln_base_pt.dbc",
|
||||
"opendbc_repo/dbc/honda_accord_2018_can_generated.dbc",
|
||||
"opendbc_repo/dbc/acura_ilx_2016_can_generated.dbc",
|
||||
"opendbc_repo/dbc/acura_rdx_2018_can_generated.dbc",
|
||||
"opendbc_repo/dbc/acura_rdx_2020_can_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_civic_touring_2016_can_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_civic_hatchback_ex_2017_can_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_crv_touring_2016_can_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_crv_ex_2017_can_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_crv_ex_2017_body_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_crv_executive_2016_can_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_fit_ex_2018_can_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_odyssey_exl_2018_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_odyssey_extreme_edition_2018_china_can_generated.dbc",
|
||||
"opendbc_repo/dbc/honda_insight_ex_2019_can_generated.dbc",
|
||||
"opendbc_repo/dbc/acura_ilx_2016_nidec.dbc",
|
||||
"opendbc_repo/dbc/honda_civic_ex_2022_can_generated.dbc",
|
||||
"opendbc_repo/dbc/hyundai_canfd.dbc",
|
||||
"opendbc_repo/dbc/hyundai_kia_generic.dbc",
|
||||
"opendbc_repo/dbc/hyundai_kia_mando_front_radar_generated.dbc",
|
||||
"opendbc_repo/dbc/mazda_2017.dbc",
|
||||
"opendbc_repo/dbc/nissan_x_trail_2017_generated.dbc",
|
||||
"opendbc_repo/dbc/nissan_leaf_2018_generated.dbc",
|
||||
"opendbc_repo/dbc/subaru_global_2017_generated.dbc",
|
||||
"opendbc_repo/dbc/subaru_global_2020_hybrid_generated.dbc",
|
||||
"opendbc_repo/dbc/subaru_outback_2015_generated.dbc",
|
||||
"opendbc_repo/dbc/subaru_outback_2019_generated.dbc",
|
||||
"opendbc_repo/dbc/subaru_forester_2017_generated.dbc",
|
||||
"opendbc_repo/dbc/toyota_tnga_k_pt_generated.dbc",
|
||||
"opendbc_repo/dbc/toyota_new_mc_pt_generated.dbc",
|
||||
"opendbc_repo/dbc/toyota_nodsu_pt_generated.dbc",
|
||||
"opendbc_repo/dbc/toyota_adas.dbc",
|
||||
"opendbc_repo/dbc/toyota_tss2_adas.dbc",
|
||||
"opendbc_repo/dbc/vw_golf_mk4.dbc",
|
||||
"opendbc_repo/dbc/vw_mqb_2010.dbc",
|
||||
"opendbc_repo/dbc/tesla_can.dbc",
|
||||
"opendbc_repo/dbc/tesla_radar_bosch_generated.dbc",
|
||||
"opendbc_repo/dbc/tesla_radar_continental_generated.dbc",
|
||||
"opendbc_repo/dbc/tesla_powertrain.dbc",
|
||||
]
|
||||
|
||||
# Sunnypilot whitelist
|
||||
@@ -203,7 +200,6 @@ sunnypilot_whitelist = [
|
||||
".*CARS.md",
|
||||
".*LIMITATIONS.md",
|
||||
".*CONTRIBUTING.md",
|
||||
".*sunnyhaibin0850_qrcode_paypal.me.png",
|
||||
"opendbc/.*.dbc",
|
||||
]
|
||||
|
||||
|
||||
390
scripts/git_rewrite/rewrite-git-history.sh
Executable file
390
scripts/git_rewrite/rewrite-git-history.sh
Executable file
@@ -0,0 +1,390 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
SRC=/tmp/openpilot/
|
||||
SRC_CLONE=/tmp/openpilot-clone/
|
||||
OUT=/tmp/openpilot-tiny/
|
||||
|
||||
REWRITE_IGNORE_BRANCHES=(
|
||||
dashcam3
|
||||
devel
|
||||
master-ci
|
||||
nightly
|
||||
release2
|
||||
release3
|
||||
release3-staging
|
||||
)
|
||||
|
||||
VALIDATE_IGNORE_FILES=(
|
||||
".github/ISSUE_TEMPLATE/bug_report.md"
|
||||
".github/pull_request_template.md"
|
||||
)
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
cd $DIR
|
||||
|
||||
LOGS_DIR=$DIR/git-rewrite-$(date +"%Y-%m-%dT%H:%M:%S%z")
|
||||
mkdir -p $LOGS_DIR
|
||||
|
||||
GIT_REWRITE_LOG=$LOGS_DIR/git-rewrite-log.txt
|
||||
BRANCH_DIFF_LOG=$LOGS_DIR/branch-diff-log.txt
|
||||
COMMIT_DIFF_LOG=$LOGS_DIR/commit-diff-log.txt
|
||||
|
||||
START_TIME=$(date +%s)
|
||||
exec > >(while IFS= read -r line; do
|
||||
CURRENT_TIME=$(date +%s)
|
||||
ELAPSED_TIME=$((CURRENT_TIME - START_TIME))
|
||||
echo "[${ELAPSED_TIME}s] $line"
|
||||
done | tee -a "$GIT_REWRITE_LOG") 2>&1
|
||||
|
||||
# INSTALL git-filter-repo
|
||||
if [ ! -f /tmp/git-filter-repo ]; then
|
||||
echo "Installing git-filter-repo..."
|
||||
curl -sSo /tmp/git-filter-repo https://raw.githubusercontent.com/newren/git-filter-repo/main/git-filter-repo
|
||||
chmod +x /tmp/git-filter-repo
|
||||
fi
|
||||
|
||||
# MIRROR openpilot
|
||||
if [ ! -d $SRC ]; then
|
||||
echo "Mirroring openpilot..."
|
||||
git clone --mirror https://github.com/commaai/openpilot.git $SRC # 4.18 GiB (488034 objects)
|
||||
|
||||
cd $SRC
|
||||
|
||||
echo "Starting size $(du -sh .)"
|
||||
|
||||
git remote update
|
||||
|
||||
# the git-filter-repo analysis is bliss - can be found in the repo root/filter-repo/analysis
|
||||
echo "Analyzing with git-filter-repo..."
|
||||
/tmp/git-filter-repo --force --analyze
|
||||
|
||||
echo "Pushing to openpilot-archive..."
|
||||
# push to archive repo - in smaller parts because the 2 GB push limit - https://docs.github.com/en/get-started/using-git/troubleshooting-the-2-gb-push-limit
|
||||
ARCHIVE_REPO=git@github.com:commaai/openpilot-archive.git
|
||||
git push --prune $ARCHIVE_REPO +refs/heads/master:refs/heads/master # push master first so it's the default branch (when openpilot-archive is an empty repo)
|
||||
git push --prune $ARCHIVE_REPO +refs/heads/*:refs/heads/* # 956.39 MiB (110725 objects)
|
||||
git push --prune $ARCHIVE_REPO +refs/tags/*:refs/tags/* # 1.75 GiB (21694 objects)
|
||||
# git push --mirror $ARCHIVE_REPO || true # fails to push refs/pull/* (deny updating a hidden ref) for pull requests
|
||||
# we fail and continue - more reading: https://stackoverflow.com/a/34266401/639708 and https://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/
|
||||
fi
|
||||
|
||||
# REWRITE master and tags
|
||||
if [ ! -d $SRC_CLONE ]; then
|
||||
echo "Cloning $SRC..."
|
||||
GIT_LFS_SKIP_SMUDGE=1 git clone $SRC $SRC_CLONE
|
||||
|
||||
cd $SRC_CLONE
|
||||
|
||||
echo "Checking out old history..."
|
||||
|
||||
git checkout tags/v0.7.1 > /dev/null 2>&1
|
||||
# checkout as main, since we need master ref later
|
||||
git checkout -b main
|
||||
|
||||
echo "Creating setup commits..."
|
||||
|
||||
# rm these so we don't get conflicts later
|
||||
git rm -r cereal opendbc panda selfdrive/ui/ui > /dev/null
|
||||
git commit -m "removed conflicting files" > /dev/null
|
||||
|
||||
# skip-smudge to get rid of some lfs errors that it can't find the reference of some lfs files
|
||||
# we don't care about fetching/pushing lfs right now
|
||||
git lfs install --skip-smudge --local
|
||||
|
||||
# squash initial setup commits
|
||||
git cherry-pick -n -X theirs 6c33a5c..59b3d06 > /dev/null
|
||||
git commit -m "switching to master" > /dev/null
|
||||
|
||||
# squash the two commits
|
||||
git reset --soft HEAD~2
|
||||
git commit -m "switching to master" -m "$(git log --reverse --format=%B 6c33a5c..59b3d06)" -m "removed conflicting files" > /dev/null
|
||||
|
||||
# get commits we want to cherry-pick
|
||||
# will start with the next commit after #59b3d06 tools is local now
|
||||
COMMITS=$(git rev-list --reverse 59b3d06..master)
|
||||
|
||||
# we need this for logging
|
||||
TOTAL_COMMITS=$(echo $COMMITS | wc -w | xargs)
|
||||
CURRENT_COMMIT_NUMBER=0
|
||||
|
||||
# empty this file
|
||||
> commit-map.txt
|
||||
|
||||
echo "Rewriting master commits..."
|
||||
|
||||
for COMMIT in $COMMITS; do
|
||||
CURRENT_COMMIT_NUMBER=$((CURRENT_COMMIT_NUMBER + 1))
|
||||
# echo -ne "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Cherry-picking commit: $COMMIT"\\r
|
||||
echo "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Cherry-picking commit: $COMMIT"
|
||||
|
||||
# set environment variables to preserve author/committer and dates
|
||||
export GIT_AUTHOR_NAME=$(git show -s --format='%an' $COMMIT)
|
||||
export GIT_AUTHOR_EMAIL=$(git show -s --format='%ae' $COMMIT)
|
||||
export GIT_COMMITTER_NAME=$(git show -s --format='%cn' $COMMIT)
|
||||
export GIT_COMMITTER_EMAIL=$(git show -s --format='%ce' $COMMIT)
|
||||
export GIT_AUTHOR_DATE=$(git show -s --format='%ad' $COMMIT)
|
||||
export GIT_COMMITTER_DATE=$(git show -s --format='%cd' $COMMIT)
|
||||
|
||||
# cherry-pick the commit
|
||||
if ! GIT_OUTPUT=$(git cherry-pick -m 1 -X theirs $COMMIT 2>&1); then
|
||||
# check if the failure is because of an empty commit
|
||||
if [[ "$GIT_OUTPUT" == *"The previous cherry-pick is now empty"* ]]; then
|
||||
echo "Empty commit detected. Skipping commit $COMMIT"
|
||||
git cherry-pick --skip
|
||||
# log it was empty to the mapping file
|
||||
echo "$COMMIT EMPTY" >> commit-map.txt
|
||||
else
|
||||
# handle other errors or conflicts
|
||||
echo "Cherry-pick failed. Handling error..."
|
||||
echo "$GIT_OUTPUT"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
# capture the new commit hash
|
||||
NEW_COMMIT=$(git rev-parse HEAD)
|
||||
|
||||
# save the old and new commit hashes to the mapping file
|
||||
echo "$COMMIT $NEW_COMMIT" >> commit-map.txt
|
||||
|
||||
# append the old commit ID to the commit message
|
||||
git commit --amend -m "$(git log -1 --pretty=%B)" -m "Former-commit-id: $COMMIT" > /dev/null
|
||||
fi
|
||||
|
||||
# prune every 3000 commits to avoid gc errors
|
||||
if [ $((CURRENT_COMMIT_NUMBER % 3000)) -eq 0 ]; then
|
||||
echo "Pruning repo..."
|
||||
git gc
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Rewriting tags..."
|
||||
|
||||
# remove all old tags
|
||||
git tag -l | xargs git tag -d
|
||||
|
||||
# read each line from the tag-commit-map.txt
|
||||
while IFS=' ' read -r TAG OLD_COMMIT; do
|
||||
# search for the new commit in commit-map.txt corresponding to the old commit
|
||||
NEW_COMMIT=$(grep "^$OLD_COMMIT " "commit-map.txt" | awk '{print $2}')
|
||||
|
||||
# check if this is a rebased commit
|
||||
if [ -z "$NEW_COMMIT" ]; then
|
||||
# if not, then just use old commit hash
|
||||
NEW_COMMIT=$OLD_COMMIT
|
||||
fi
|
||||
|
||||
echo "Rewriting tag $TAG from commit $NEW_COMMIT"
|
||||
git tag -f "$TAG" "$NEW_COMMIT"
|
||||
done < "$DIR/tag-commit-map.txt"
|
||||
|
||||
# uninstall lfs since we don't want to touch (push to) lfs right now
|
||||
# git push will also push lfs, if we don't uninstall (--local so just for this repo)
|
||||
git lfs uninstall --local
|
||||
|
||||
# force push new master
|
||||
git push --force origin main:master
|
||||
|
||||
# force push new tags
|
||||
git push --force --tags
|
||||
fi
|
||||
|
||||
# REWRITE branches based on master
|
||||
if [ ! -f "$SRC_CLONE/rewrite-branches-done" ]; then
|
||||
cd $SRC_CLONE
|
||||
> rewrite-branches-done
|
||||
|
||||
# empty file
|
||||
> $BRANCH_DIFF_LOG
|
||||
|
||||
echo "Rewriting branches based on master..."
|
||||
|
||||
# will store raw diffs here, if exist
|
||||
mkdir -p differences
|
||||
|
||||
# get a list of all branches except master and REWRITE_IGNORE_BRANCHES
|
||||
BRANCHES=$(git branch -r | grep -v ' -> ' | sed 's/.*origin\///' | grep -v '^master$' | grep -v -f <(echo "${REWRITE_IGNORE_BRANCHES[*]}" | tr ' ' '\n'))
|
||||
|
||||
for BRANCH in $BRANCHES; do
|
||||
# check if the branch is based on master history
|
||||
MERGE_BASE=$(git merge-base master origin/$BRANCH) || true
|
||||
if [ -n "$MERGE_BASE" ]; then
|
||||
echo "Rewriting branch: $BRANCH"
|
||||
|
||||
# create a new branch based on the new master
|
||||
NEW_MERGE_BASE=$(grep "^$MERGE_BASE " "commit-map.txt" | awk '{print $2}')
|
||||
if [ -z "$NEW_MERGE_BASE" ]; then
|
||||
echo "Error: could not find new merge base for branch $BRANCH" >> $BRANCH_DIFF_LOG
|
||||
continue
|
||||
fi
|
||||
git checkout -b ${BRANCH}_new $NEW_MERGE_BASE
|
||||
|
||||
# get the range of commits unique to this branch
|
||||
COMMITS=$(git rev-list --reverse $MERGE_BASE..origin/${BRANCH})
|
||||
|
||||
HAS_ERROR=0
|
||||
|
||||
# simple delimiter
|
||||
echo "BRANCH ${BRANCH}" >> commit-map.txt
|
||||
|
||||
for COMMIT in $COMMITS; do
|
||||
# set environment variables to preserve author/committer and dates
|
||||
export GIT_AUTHOR_NAME=$(git show -s --format='%an' $COMMIT)
|
||||
export GIT_AUTHOR_EMAIL=$(git show -s --format='%ae' $COMMIT)
|
||||
export GIT_COMMITTER_NAME=$(git show -s --format='%cn' $COMMIT)
|
||||
export GIT_COMMITTER_EMAIL=$(git show -s --format='%ce' $COMMIT)
|
||||
export GIT_AUTHOR_DATE=$(git show -s --format='%ad' $COMMIT)
|
||||
export GIT_COMMITTER_DATE=$(git show -s --format='%cd' $COMMIT)
|
||||
|
||||
# cherry-pick the commit
|
||||
if ! GIT_OUTPUT=$(git cherry-pick -m 1 -X theirs $COMMIT 2>&1); then
|
||||
# check if the failure is because of an empty commit
|
||||
if [[ "$GIT_OUTPUT" == *"The previous cherry-pick is now empty"* ]]; then
|
||||
echo "Empty commit detected. Skipping commit $COMMIT"
|
||||
git cherry-pick --skip
|
||||
# log it was empty to the mapping file
|
||||
echo "$COMMIT EMPTY" >> commit-map.txt
|
||||
else
|
||||
# handle other errors or conflicts
|
||||
echo "Cherry-pick of ${BRANCH} branch failed. Removing branch upstream..." >> $BRANCH_DIFF_LOG
|
||||
echo "$GIT_OUTPUT" > "$LOGS_DIR/branch-${BRANCH}"
|
||||
git cherry-pick --abort
|
||||
git push --delete origin ${BRANCH}
|
||||
HAS_ERROR=1
|
||||
break
|
||||
fi
|
||||
else
|
||||
# capture the new commit hash
|
||||
NEW_COMMIT=$(git rev-parse HEAD)
|
||||
|
||||
# save the old and new commit hashes to the mapping file
|
||||
echo "$COMMIT $NEW_COMMIT" >> commit-map.txt
|
||||
|
||||
# append the old commit ID to the commit message
|
||||
git commit --amend -m "$(git log -1 --pretty=%B)" -m "Former-commit-id: $COMMIT" > /dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
# force push the new branch
|
||||
if [ $HAS_ERROR -eq 0 ]; then
|
||||
# git lfs goes haywire here, so we need to install and uninstall
|
||||
# git lfs install --skip-smudge --local
|
||||
git lfs uninstall --local > /dev/null
|
||||
git push -f origin ${BRANCH}_new:${BRANCH}
|
||||
fi
|
||||
|
||||
# clean up local branch
|
||||
git checkout master > /dev/null
|
||||
git branch -D ${BRANCH}_new > /dev/null
|
||||
else
|
||||
echo "Deleting branch $BRANCH as it's not based on master history" >> $BRANCH_DIFF_LOG
|
||||
git push --delete origin ${BRANCH}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# VALIDATE cherry-pick
|
||||
if [ ! -f "$SRC_CLONE/validation-done" ]; then
|
||||
cd $SRC_CLONE
|
||||
> validation-done
|
||||
|
||||
TOTAL_COMMITS=$(grep -cve '^\s*$' commit-map.txt)
|
||||
CURRENT_COMMIT_NUMBER=0
|
||||
COUNT_SAME=0
|
||||
COUNT_DIFF=0
|
||||
|
||||
# empty file
|
||||
> $COMMIT_DIFF_LOG
|
||||
|
||||
echo "Validating commits..."
|
||||
|
||||
# will store raw diffs here, if exist
|
||||
mkdir -p differences
|
||||
|
||||
# read each line from commit-map.txt
|
||||
while IFS=' ' read -r OLD_COMMIT NEW_COMMIT; do
|
||||
if [ "$NEW_COMMIT" == "EMPTY" ]; then
|
||||
continue
|
||||
fi
|
||||
if [ "$OLD_COMMIT" == "BRANCH" ]; then
|
||||
echo "Branch ${NEW_COMMIT} below:" >> $COMMIT_DIFF_LOG
|
||||
continue
|
||||
fi
|
||||
CURRENT_COMMIT_NUMBER=$((CURRENT_COMMIT_NUMBER + 1))
|
||||
# retrieve short hashes and dates for the old and new commits
|
||||
OLD_COMMIT_SHORT=$(git rev-parse --short $OLD_COMMIT)
|
||||
NEW_COMMIT_SHORT=$(git rev-parse --short $NEW_COMMIT)
|
||||
OLD_DATE=$(git show -s --format='%cd' $OLD_COMMIT)
|
||||
NEW_DATE=$(git show -s --format='%cd' $NEW_COMMIT)
|
||||
|
||||
# echo -ne "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Comparing old commit $OLD_COMMIT_SHORT ($OLD_DATE) with new commit $NEW_COMMIT_SHORT ($NEW_DATE)"\\r
|
||||
echo "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Comparing old commit $OLD_COMMIT_SHORT ($OLD_DATE) with new commit $NEW_COMMIT_SHORT ($NEW_DATE)"
|
||||
|
||||
# generate lists of files and their hashes for the old and new commits, excluding ignored files
|
||||
OLD_FILES=$(git ls-tree -r $OLD_COMMIT | grep -vE "$(IFS='|'; echo "${VALIDATE_IGNORE_FILES[*]}")")
|
||||
NEW_FILES=$(git ls-tree -r $NEW_COMMIT | grep -vE "$(IFS='|'; echo "${VALIDATE_IGNORE_FILES[*]}")")
|
||||
|
||||
# Compare the diffs
|
||||
if diff <(echo "$OLD_FILES") <(echo "$NEW_FILES") > /dev/null; then
|
||||
# echo "Old commit $OLD_COMMIT_SHORT and new commit $NEW_COMMIT_SHORT are equivalent."
|
||||
COUNT_SAME=$((COUNT_SAME + 1))
|
||||
else
|
||||
echo "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Difference found between old commit $OLD_COMMIT_SHORT and new commit $NEW_COMMIT_SHORT" >> $COMMIT_DIFF_LOG
|
||||
COUNT_DIFF=$((COUNT_DIFF + 1))
|
||||
set +e
|
||||
diff -u <(echo "$OLD_FILES") <(echo "$NEW_FILES") > "$LOGS_DIR/commit-$CURRENT_COMMIT_NUMBER-$OLD_COMMIT_SHORT-$NEW_COMMIT_SHORT"
|
||||
set -e
|
||||
fi
|
||||
done < "commit-map.txt"
|
||||
|
||||
echo "Summary:" >> $COMMIT_DIFF_LOG
|
||||
echo "Equivalent commits: $COUNT_SAME" >> $COMMIT_DIFF_LOG
|
||||
echo "Different commits: $COUNT_DIFF" >> $COMMIT_DIFF_LOG
|
||||
fi
|
||||
|
||||
if [ ! -d $OUT ]; then
|
||||
cp -r $SRC $OUT
|
||||
|
||||
cd $OUT
|
||||
|
||||
# remove all non-master branches
|
||||
# git branch | grep -v "^ master$" | grep -v "\*" | xargs git branch -D
|
||||
|
||||
# echo "cleaning up refs"
|
||||
# delete pull request refs since we can't alter them anyway (https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally#error-failed-to-push-some-refs)
|
||||
# git for-each-ref --format='%(refname)' | grep '^refs/pull/' | xargs -I {} git update-ref -d {}
|
||||
|
||||
echo "importing new lfs files"
|
||||
# import "almost" everything to lfs
|
||||
BRANCHES=$(git for-each-ref --format='%(refname)' refs/heads/ | sed 's%refs/heads/%%g' | grep -v -f <(echo "${REWRITE_IGNORE_BRANCHES[*]}" | tr ' ' '\n') | tr '\n' ' ')
|
||||
git lfs migrate import --include="*.dlc,*.onnx,*.svg,*.png,*.gif,*.ttf,*.wav,selfdrive/car/tests/test_models_segs.txt,system/hardware/tici/updater,selfdrive/ui/qt/spinner_larch64,selfdrive/ui/qt/text_larch64,third_party/**/*.a,third_party/**/*.so,third_party/**/*.so.*,third_party/**/*.dylib,third_party/acados/*/t_renderer,third_party/qt5/larch64/bin/lrelease,third_party/qt5/larch64/bin/lupdate,third_party/catch2/include/catch2/catch.hpp,*.apk,*.apkpatch,*.jar,*.pdf,*.jpg,*.mp3,*.thneed,*.tar.gz,*.npy,*.csv,*.a,*.so*,*.dylib,*.o,*.b64,selfdrive/hardware/tici/updater,selfdrive/boardd/tests/test_boardd,selfdrive/ui/qt/spinner_aarch64,installer/updater/updater,selfdrive/debug/profiling/simpleperf/**/*,selfdrive/hardware/eon/updater,selfdrive/ui/qt/text_aarch64,selfdrive/debug/profiling/pyflame/**/*,installer/installers/installer_openpilot,installer/installers/installer_dashcam,selfdrive/ui/text/text,selfdrive/ui/android/text/text,selfdrive/ui/spinner/spinner,selfdrive/visiond/visiond,selfdrive/loggerd/loggerd,selfdrive/sensord/sensord,selfdrive/sensord/gpsd,selfdrive/ui/android/spinner/spinner,selfdrive/ui/qt/spinner,selfdrive/ui/qt/text,_stringdefs.py,dfu-util-aarch64-linux,dfu-util-aarch64,dfu-util-x86_64-linux,dfu-util-x86_64,stb_image.h,clpeak3,clwaste,apk/**/*,external/**/*,phonelibs/**/*,third_party/boringssl/**/*,flask/**/*,panda/**/*,board/**/*,messaging/**/*,opendbc/**/*,tools/cabana/chartswidget.cc,third_party/nanovg/**/*,selfdrive/controls/lib/lateral_mpc/lib_mpc_export/**/*,selfdrive/ui/paint.cc,werkzeug/**/*,pyextra/**/*,third_party/android_hardware_libhardware/**/*,selfdrive/controls/lib/lead_mpc_lib/lib_mpc_export/**/*,selfdrive/locationd/laikad.py,selfdrive/locationd/test/test_laikad.py,tools/gpstest/test_laikad.py,selfdrive/locationd/laikad_helpers.py,tools/nui/**/*,jsonrpc/**/*,selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/**/*,selfdrive/controls/lib/lateral_mpc/mpc_export/**/*,selfdrive/camerad/cameras/camera_qcom.cc,selfdrive/manager.py,selfdrive/modeld/models/driving.cc,third_party/curl/**/*,selfdrive/modeld/thneed/debug/**/*,selfdrive/modeld/thneed/include/**/*,third_party/openmax/**/*,selfdrive/controls/lib/longitudinal_mpc/mpc_export/**/*,selfdrive/controls/lib/longitudinal_mpc_model/lib_mpc_export/**/*,Pipfile,Pipfile.lock,gunicorn/**/*,*.qm,jinja2/**/*,click/**/*,dbcs/**/*,websocket/**/*" $BRANCHES
|
||||
|
||||
echo "reflog and gc"
|
||||
# this is needed after lfs import
|
||||
git reflog expire --expire=now --all
|
||||
git gc --prune=now --aggressive
|
||||
|
||||
# check the git-filter-repo analysis again - can be found in the repo root/filter-repo/analysis
|
||||
echo "Analyzing with git-filter-repo..."
|
||||
/tmp/git-filter-repo --force --analyze
|
||||
|
||||
echo "New size is $(du -sh .)"
|
||||
fi
|
||||
|
||||
cd $OUT
|
||||
|
||||
# fetch all lfs files from https://github.com/commaai/openpilot.git
|
||||
# some lfs files are missing on gitlab, but they can be found on github
|
||||
git config lfs.url https://github.com/commaai/openpilot.git/info/lfs
|
||||
git config lfs.pushurl ssh://git@github.com/commaai/openpilot.git
|
||||
git lfs fetch --all || true
|
||||
|
||||
# also fetch all lfs files from https://gitlab.com/commaai/openpilot-lfs.git
|
||||
git config lfs.url https://gitlab.com/commaai/openpilot-lfs.git/info/lfs
|
||||
git config lfs.pushurl ssh://git@gitlab.com/commaai/openpilot-lfs.git
|
||||
git lfs fetch --all || true
|
||||
|
||||
# final push - will also push lfs
|
||||
# TODO: switch to git@github.com:commaai/openpilot.git when ready
|
||||
# git push --mirror git@github.com:commaai/openpilot-tiny.git
|
||||
# using this instead to ignore refs/pull/* - since this is also what --mirror does - https://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/
|
||||
git push --prune git@github.com:commaai/openpilot-tiny.git +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/*
|
||||
82
scripts/git_rewrite/tag-commit-map.txt
Normal file
82
scripts/git_rewrite/tag-commit-map.txt
Normal file
@@ -0,0 +1,82 @@
|
||||
v0.1 e94a30bec07e719c5a7b037ca1f4db8312702cce
|
||||
v0.2 449b482cc3236ccf31829830b4f6a44b2dcc06c2
|
||||
v0.2.1 17d9becd3c673091b22f09aa02559a9ed9230f50
|
||||
v0.2.2 a64b9aa9b8cb5863c917b6926516291a63c02fe5
|
||||
v0.2.3 adaa4ed350acda4067fc0b455ad15b54cdf4c768
|
||||
v0.2.4 ecc565aa3fdc4c7e719aadc000e1fdc4d80d4fe0
|
||||
v0.2.5 29c58b45882ac79595356caf98580c1d2a626011
|
||||
v0.2.6 6c3afeec0fb439070b2912978b8dbb659033b1d9
|
||||
v0.2.7 c6ba5dc5391d3ca6cda479bf1923b88ce45509a0
|
||||
v0.2.8 95a349abcc050712c50d4d85a1c8a804eee7f6c2
|
||||
v0.2.9 693bcb0f83478f2651db6bac9be5ca5ad60d03f3
|
||||
v0.3.0 c5d8aec28b5230d34ae4b677c2091cc3dec7e3e8
|
||||
v0.3.1 41e3a0f699f5c39cb61a15c0eb7a4aa816d47c24
|
||||
v0.3.2 7fe46f1e1df5dec08a940451ba0feefd5c039165
|
||||
v0.3.3 5cf91d0496688fed4f2a6c7021349b1fc0e057a2
|
||||
v0.3.4 1b8c44b5067525a5d266b6e99799d8097da76a29
|
||||
v0.3.5 b111277f464cf66fa34b67819a83ea683e0f64df
|
||||
v0.4.0.2 da52d065a4c4f52d6017a537f3a80326f5af8bdc
|
||||
v0.4.1 4474b9b3718653aeb0aee26422caefb90460cc0e
|
||||
v0.4.2 28c0797d30175043bbfa31307b63aab4197cf996
|
||||
v0.4.4 9a9ff839a9b70cb2601d7696af743f5652395389
|
||||
v0.4.5 37285038d3f91fa1b49159c4a35a8383168e644f
|
||||
v0.4.6 c6df34f55ba8c5a911b60d3f9eb20e3fa45f68c1
|
||||
v0.4.7 ae5cb7a0dab8b1bed9d52292f9b4e8e66a0f8ec9
|
||||
v0.5 de33bc46452b1046387ee2b3a03191b2c71135fb
|
||||
v0.5.1 8f22f52235c48eada586795ac57edb22688e4d08
|
||||
v0.5.2 0129a8a4ff8da5314e8e4d4d3336e89667ff6d54
|
||||
v0.5.3 285c52eb693265a0a530543e9ca0aeb593a2a55e
|
||||
v0.5.4 a422246dc30bce11e970514f13f7c110f4470cc3
|
||||
v0.5.5 8f3539a27b28851153454eb737da9624cccaed2d
|
||||
v0.5.6 860a48765d1016ba226fb2c64aea35a45fe40e4a
|
||||
v0.5.7 9ce3045f139ee29bf0eea5ec59dfe7df9c3d2c51
|
||||
v0.5.8 2cee2e05ba0f3824fdbb8b957958800fa99071a1
|
||||
v0.5.9 ad145da3bcded0fe75306df02061d07a633963c3
|
||||
v0.5.10 ff4c1557d8358f158f4358788ff18ef93d2470ef
|
||||
v0.5.11 d1866845df423c6855e2b365ff230cf7d89a420b
|
||||
v0.5.12 f6e8ef27546e9a406724841e75f8df71cc4c2c97
|
||||
v0.5.13 dd34ccfe288ebda8e2568cf550994ae890379f45
|
||||
v0.6 60a20537c5f3fcc7f11946d81aebc8f90c08c117
|
||||
v0.6.1 cf5c4aeacb1703d0ffd35bdb5297d3494fee9a22
|
||||
v0.6.2 095ef5f9f60fca1b269aabcc3cfd322b17b9e674
|
||||
v0.6.3 d5f9caa82d80cdcc7f1b7748f2cf3ccbf94f82a3
|
||||
v0.6.4 58f376002e0c654fbc2de127765fa297cf694a33
|
||||
v0.6.5 70d17cd69b80e7627dcad8fd5b6438f2309ac307
|
||||
v0.6.6 d4eb5a6eafdd4803d09e6f3963918216cca5a81f
|
||||
v0.7 a2ae18d1dbd1e59c38ce22fa25ddffbd1d3084e3
|
||||
v0.7.1 1e1de64a1e59476b7b3d3558b92149246d5c3292
|
||||
v0.7.2 59bd58c940673b4c4a6a86f299022614bcf42b22
|
||||
v0.7.3 d7acd8b68f8131e0e714400cf124a3e228638643
|
||||
v0.7.4 e93649882c5e914eec4a8b8b593dc0587e497033
|
||||
v0.7.5 8abc0afe464626a461d2c7e192c912eeebeccc65
|
||||
v0.7.6 69aacd9d179fe6dd3110253a099c38b34cff7899
|
||||
v0.7.7 f1caed7299cdba5e45635d8377da6cc1e5fd7072
|
||||
v0.7.8 2189fe8741b635d8394d55dee28959425cfd5ad0
|
||||
v0.7.9 86dc54b836a973f132ed26db9f5a60b29f9b25b2
|
||||
v0.7.10 47a42ff432db8a2494e922ca5e767e58020f0446
|
||||
v0.7.11 f46ed718ba8d6bb4d42cd7b0f0150c406017c373
|
||||
v0.8 d56e04c0d960c8d3d4ab88b578dc508a2b4e07dc
|
||||
v0.8.1 cd6f26664cb8d32a13847d6648567c47c580e248
|
||||
v0.8.2 7cc0999aebfe63b6bb6dd83c1dff62c3915c4820
|
||||
v0.8.3 986500fe2f10870018f1fba1e5465476b8915977
|
||||
v0.8.4 f0d0b82b8d6f5f450952113e234d0a5a49e80c48
|
||||
v0.8.5 f5d9ddc6c2a2802a61e5ce590c6b6688bf736a69
|
||||
v0.8.6 75904ed7452c6cbfb2a70cd379a899d8a75b97c2
|
||||
v0.8.7 4f9e568019492126e236da85b5ca0a059f292900
|
||||
v0.8.8 a949a49d5efaaf2d881143d23e9fb5ff9e28e88c
|
||||
v0.8.9 a034926264cd1025c69d6ceb3fe444965f960b75
|
||||
v0.8.10 59accdd814398b884167c0f41dbf46dcccf0c29c
|
||||
v0.8.11 d630ec9092f039cb5e51c5dd6d92fc47b91407e4
|
||||
v0.8.12 57871c99031cf597ffa0d819057ac1401e129f32
|
||||
v0.8.13 e43e6e876513450d235124fcb711f1724ed9814c
|
||||
v0.8.14 71901c94dbbaa2f9f156a80c14cc7ea65219fc7c
|
||||
v0.8.15 5a7c2f90361e72e9c35e88abd2e11acdc4aba354
|
||||
v0.8.16 f41dc62a12cc0f3cb8c5453c0caa0ba21e1bd01e
|
||||
v0.9.0 58b84fb401a804967aa0dd5ee66fafa90194fd30
|
||||
v0.9.1 89f68bf0cbf53a81b0553d3816fdbe522f941fa1
|
||||
v0.9.2 c7d3b28b93faa6c955fb24bc64031512ee985ee9
|
||||
v0.9.3 8704c1ff952b5c85a44f50143bbd1a4f7b4887e2
|
||||
v0.9.4 fa310d9e2542cf497d92f007baec8fd751ffa99c
|
||||
v0.9.5 3b1e9017c560499786d8a0e46aaaeea65037acac
|
||||
v0.9.6 0b4d08fab8e35a264bc7383e878538f8083c33e5
|
||||
v0.9.7 f8cb04e4a8b032b72a909f68b808a50936184bee
|
||||
10
scripts/lint.sh
Executable file
10
scripts/lint.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
cd $DIR/../
|
||||
|
||||
# TODO: bring back rest of pre-commit checks:
|
||||
# https://github.com/commaai/openpilot/blob/4b11c9e914707df9def598616995be2a5d355a6a/.pre-commit-config.yaml#L2
|
||||
|
||||
ruff check .
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
pip install --upgrade pyupgrade
|
||||
|
||||
git ls-files '*.py' | grep -v 'third_party/' | xargs pyupgrade --py311-plus
|
||||
@@ -7,10 +7,12 @@ from dataclasses import replace
|
||||
import capnp
|
||||
|
||||
from cereal import car
|
||||
from panda.python.uds import SERVICE_TYPE
|
||||
from openpilot.common.numpy_fast import clip, interp
|
||||
from openpilot.common.utils import Freezable
|
||||
from openpilot.selfdrive.car.docs_definitions import CarDocs
|
||||
|
||||
DT_CTRL = 0.01 # car state and control loop timestep (s)
|
||||
|
||||
# kg of standard extra cargo to count for drive, gas, etc...
|
||||
STD_CARGO_KG = 136.
|
||||
@@ -224,8 +226,39 @@ def create_gas_interceptor_command(packer, gas_amount, idx):
|
||||
return packer.make_can_msg("GAS_COMMAND", 0, values)
|
||||
|
||||
|
||||
def apply_center_deadzone(error, deadzone):
|
||||
if (error > - deadzone) and (error < deadzone):
|
||||
error = 0.
|
||||
return error
|
||||
|
||||
|
||||
def rate_limit(new_value, last_value, dw_step, up_step):
|
||||
return clip(new_value, last_value + dw_step, last_value + up_step)
|
||||
|
||||
|
||||
def get_friction(lateral_accel_error: float, lateral_accel_deadzone: float, friction_threshold: float,
|
||||
torque_params: car.CarParams.LateralTorqueTuning, friction_compensation: bool) -> float:
|
||||
friction_interp = interp(
|
||||
apply_center_deadzone(lateral_accel_error, lateral_accel_deadzone),
|
||||
[-friction_threshold, friction_threshold],
|
||||
[-torque_params.friction, torque_params.friction]
|
||||
)
|
||||
friction = float(friction_interp) if friction_compensation else 0.0
|
||||
return friction
|
||||
|
||||
|
||||
def make_can_msg(addr, dat, bus):
|
||||
return [addr, 0, dat, bus]
|
||||
return [addr, dat, bus]
|
||||
|
||||
|
||||
def make_tester_present_msg(addr, bus, subaddr=None, suppress_response=False):
|
||||
dat = [0x02, SERVICE_TYPE.TESTER_PRESENT]
|
||||
if subaddr is not None:
|
||||
dat.insert(0, subaddr)
|
||||
dat.append(0x80 if suppress_response else 0x0) # sub-function
|
||||
|
||||
dat.extend([0x0] * (8 - len(dat)))
|
||||
return make_can_msg(addr, bytes(dat), bus)
|
||||
|
||||
|
||||
def get_safety_config(safety_model, safety_param = None):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from opendbc.can.packer import CANPacker
|
||||
from openpilot.selfdrive.car import DT_CTRL
|
||||
from openpilot.selfdrive.car.body import bodycan
|
||||
from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM
|
||||
from openpilot.selfdrive.car.interfaces import CarControllerBase
|
||||
@@ -17,7 +17,7 @@ MAX_TURN_INTEGRATOR = 0.1 # meters
|
||||
|
||||
class CarController(CarControllerBase):
|
||||
def __init__(self, dbc_name, CP, VM):
|
||||
self.frame = 0
|
||||
super().__init__(dbc_name, CP, VM)
|
||||
self.packer = CANPacker(dbc_name)
|
||||
|
||||
# PIDs
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import math
|
||||
from cereal import car
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from openpilot.selfdrive.car import get_safety_config
|
||||
from openpilot.selfdrive.car import DT_CTRL, get_safety_config
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
||||
from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import threading
|
||||
import time
|
||||
from types import SimpleNamespace
|
||||
|
||||
import cereal.messaging as messaging
|
||||
|
||||
@@ -9,11 +11,13 @@ from cereal import car
|
||||
from panda import ALTERNATIVE_EXPERIENCE
|
||||
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.realtime import config_realtime_process, Priority, Ratekeeper, DT_CTRL
|
||||
from openpilot.common.realtime import config_realtime_process, Priority, Ratekeeper
|
||||
|
||||
from openpilot.selfdrive.pandad import can_list_to_can_capnp
|
||||
from openpilot.selfdrive.car import DT_CTRL
|
||||
from openpilot.selfdrive.car.car_helpers import get_car, get_one_can
|
||||
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
||||
from openpilot.selfdrive.car.param_manager import ParamManager
|
||||
from openpilot.selfdrive.controls.lib.events import Events
|
||||
|
||||
REPLAY = "REPLAY" in os.environ
|
||||
@@ -90,6 +94,10 @@ class Car:
|
||||
|
||||
self.events = Events()
|
||||
|
||||
self.param_manager: ParamManager = ParamManager()
|
||||
self.param_manager.update(self.params)
|
||||
self._params_list: SimpleNamespace = self.param_manager.get_params()
|
||||
|
||||
# card is driven by can recv, expected at 100Hz
|
||||
self.rk = Ratekeeper(100, print_delay_threshold=None)
|
||||
|
||||
@@ -98,7 +106,7 @@ class Car:
|
||||
|
||||
# Update carState from CAN
|
||||
can_strs = messaging.drain_sock_raw(self.can_sock, wait_for_one=True)
|
||||
CS = self.CI.update(self.CC_prev, can_strs)
|
||||
CS = self.CI.update(self.CC_prev, can_strs, self._params_list)
|
||||
|
||||
self.sm.update(0)
|
||||
|
||||
@@ -186,10 +194,23 @@ class Car:
|
||||
self.initialized_prev = initialized
|
||||
self.CS_prev = CS.as_reader()
|
||||
|
||||
def sp_params_thread(self, event: threading.Event) -> None:
|
||||
while not event.is_set():
|
||||
self.param_manager.update(self.params)
|
||||
self._params_list = self.param_manager.get_params()
|
||||
time.sleep(0.1)
|
||||
|
||||
def card_thread(self):
|
||||
while True:
|
||||
self.step()
|
||||
self.rk.monitor_time()
|
||||
event = threading.Event()
|
||||
thread = threading.Thread(target=self.sp_params_thread, args=(event, ))
|
||||
try:
|
||||
thread.start()
|
||||
while True:
|
||||
self.step()
|
||||
self.rk.monitor_time()
|
||||
finally:
|
||||
event.set()
|
||||
thread.join()
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -4,8 +4,7 @@ import cereal.messaging as messaging
|
||||
from common.conversions import Conversions as CV
|
||||
from opendbc.can.packer import CANPacker
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.realtime import DT_CTRL
|
||||
from openpilot.selfdrive.car import apply_meas_steer_torque_limits
|
||||
from openpilot.selfdrive.car import DT_CTRL, apply_meas_steer_torque_limits
|
||||
from openpilot.selfdrive.car.chrysler import chryslercan
|
||||
from openpilot.selfdrive.car.chrysler.values import RAM_CARS, RAM_DT, CarControllerParams, ChryslerFlags, ChryslerFlagsSP
|
||||
from openpilot.selfdrive.car.interfaces import CarControllerBase, FORWARD_GEARS
|
||||
@@ -16,9 +15,8 @@ ButtonType = car.CarState.ButtonEvent.Type
|
||||
|
||||
class CarController(CarControllerBase):
|
||||
def __init__(self, dbc_name, CP, VM):
|
||||
self.CP = CP
|
||||
super().__init__(dbc_name, CP, VM)
|
||||
self.apply_steer_last = 0
|
||||
self.frame = 0
|
||||
|
||||
self.hud_count = 0
|
||||
self.last_lkas_falling_edge = 0
|
||||
@@ -30,9 +28,6 @@ class CarController(CarControllerBase):
|
||||
|
||||
self.sm = messaging.SubMaster(['longitudinalPlanSP'])
|
||||
self.param_s = Params()
|
||||
self.is_metric = self.param_s.get_bool("IsMetric")
|
||||
self.speed_limit_control_enabled = False
|
||||
self.last_speed_limit_sign_tap = False
|
||||
self.last_speed_limit_sign_tap_prev = False
|
||||
self.speed_limit = 0.
|
||||
self.speed_limit_offset = 0
|
||||
@@ -72,23 +67,19 @@ class CarController(CarControllerBase):
|
||||
self.v_tsc = self.sm['longitudinalPlanSP'].visionTurnSpeed
|
||||
self.m_tsc = self.sm['longitudinalPlanSP'].turnSpeed
|
||||
|
||||
if self.frame % 200 == 0:
|
||||
self.speed_limit_control_enabled = self.param_s.get_bool("EnableSlc")
|
||||
self.is_metric = self.param_s.get_bool("IsMetric")
|
||||
self.last_speed_limit_sign_tap = self.param_s.get_bool("LastSpeedLimitSignTap")
|
||||
self.v_cruise_min = FCA_V_CRUISE_MIN[self.is_metric] * (CV.KPH_TO_MPH if not self.is_metric else 1)
|
||||
self.v_cruise_min = FCA_V_CRUISE_MIN[CS.params_list.is_metric] * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1)
|
||||
|
||||
can_sends = []
|
||||
|
||||
if not self.CP.pcmCruiseSpeed:
|
||||
if not self.last_speed_limit_sign_tap_prev and self.last_speed_limit_sign_tap:
|
||||
if not self.last_speed_limit_sign_tap_prev and CS.params_list.last_speed_limit_sign_tap:
|
||||
self.sl_force_active_timer = self.frame
|
||||
self.param_s.put_bool_nonblocking("LastSpeedLimitSignTap", False)
|
||||
self.last_speed_limit_sign_tap_prev = self.last_speed_limit_sign_tap
|
||||
self.last_speed_limit_sign_tap_prev = CS.params_list.last_speed_limit_sign_tap
|
||||
|
||||
sl_force_active = self.speed_limit_control_enabled and (self.frame < (self.sl_force_active_timer * DT_CTRL + 2.0))
|
||||
sl_inactive = not sl_force_active and (not self.speed_limit_control_enabled or (True if self.slc_state == 0 else False))
|
||||
sl_temp_inactive = not sl_force_active and (self.speed_limit_control_enabled and (True if self.slc_state == 1 else False))
|
||||
sl_force_active = CS.params_list.speed_limit_control_enabled and (self.frame < (self.sl_force_active_timer * DT_CTRL + 2.0))
|
||||
sl_inactive = not sl_force_active and (not CS.params_list.speed_limit_control_enabled or (True if self.slc_state == 0 else False))
|
||||
sl_temp_inactive = not sl_force_active and (CS.params_list.speed_limit_control_enabled and (True if self.slc_state == 1 else False))
|
||||
slc_active = not sl_inactive and not sl_temp_inactive
|
||||
|
||||
self.slc_active_stock = slc_active
|
||||
@@ -278,8 +269,8 @@ class CarController(CarControllerBase):
|
||||
return min(target_speed_kph, curve_speed)
|
||||
|
||||
def get_button_control(self, CS, final_speed, v_cruise_kph_prev):
|
||||
self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not self.is_metric else 1))
|
||||
self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not self.is_metric else CV.MS_TO_KPH))
|
||||
self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1))
|
||||
self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not CS.params_list.is_metric else CV.MS_TO_KPH))
|
||||
cruise_button = self.get_button_type(self.button_type)
|
||||
return cruise_button
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user