mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-12 01:45:07 +08:00
Compare commits
190 Commits
master-dev
...
archive/ma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6741877fbd | ||
|
|
100ca65b39 | ||
|
|
519b666e37 | ||
|
|
35da93fa95 | ||
|
|
ff4cce2677 | ||
|
|
87051803ab | ||
|
|
f4e101c67d | ||
|
|
42f8875901 | ||
|
|
f59a1bf003 | ||
|
|
0a1b6c705d | ||
|
|
dae88e1ffb | ||
|
|
fc425042ab | ||
|
|
629dcdcfca | ||
|
|
338b69be11 | ||
|
|
0a737d9a2e | ||
|
|
f037d2216a | ||
|
|
a51b83b4d8 | ||
|
|
fea01767d9 | ||
|
|
282eae3c30 | ||
|
|
b5958ebb60 | ||
|
|
40fb90a8a2 | ||
|
|
930fa18299 | ||
|
|
5bfad23442 | ||
|
|
ac5cd06a3a | ||
|
|
db5c0419ce | ||
|
|
2faa08c2d6 | ||
|
|
341e7a4384 | ||
|
|
d7f4fbc1c2 | ||
|
|
2f71c94847 | ||
|
|
8b7e28d3a1 | ||
|
|
5fe1f5fa87 | ||
|
|
8aff0ce9c7 | ||
|
|
756d64e2c3 | ||
|
|
0af58e1820 | ||
|
|
0656521268 | ||
|
|
5d3f8bb04b | ||
|
|
4e2624783f | ||
|
|
39c64d44a1 | ||
|
|
1c19cbc437 | ||
|
|
48bceb2bbf | ||
|
|
f37ee559fa | ||
|
|
6d392a2e7b | ||
|
|
431fd666fe | ||
|
|
8b074d3ed6 | ||
|
|
4bb00a042a | ||
|
|
4b70cc9286 | ||
|
|
44c3156fa4 | ||
|
|
73d9f6e05e | ||
|
|
95600b00c6 | ||
|
|
5cb7aed8ce | ||
|
|
b87414c749 | ||
|
|
4d9ee68d16 | ||
|
|
7a6e686ec7 | ||
|
|
1a4ff8272b | ||
|
|
908aa525ec | ||
|
|
cf355ecf20 | ||
|
|
bdf9c90951 | ||
|
|
61abc05c8b | ||
|
|
63992fd164 | ||
|
|
e2305d92e3 | ||
|
|
55446438ab | ||
|
|
13e58d33db | ||
|
|
7af3c6dfee | ||
|
|
d8c9822421 | ||
|
|
fe51a2fc62 | ||
|
|
c013d8aa94 | ||
|
|
be8485ca89 | ||
|
|
b644555a1d | ||
|
|
b14fca78e0 | ||
|
|
7b5f76ecf9 | ||
|
|
9b2cafe597 | ||
|
|
2a7c6bc8bd | ||
|
|
799539320d | ||
|
|
7a40c97068 | ||
|
|
ee9977df2f | ||
|
|
08f64ae30a | ||
|
|
ba098f509b | ||
|
|
542f3d1b44 | ||
|
|
e735a7f379 | ||
|
|
bf68eeb596 | ||
|
|
1eda5f4736 | ||
|
|
6a15c42143 | ||
|
|
51fae363e4 | ||
|
|
4baf6c1be9 | ||
|
|
e6b2996478 | ||
|
|
a255b8043a | ||
|
|
c9f9eba614 | ||
|
|
6a5bbb261e | ||
|
|
c2ab62c2b2 | ||
|
|
207c77ea93 | ||
|
|
bce11e393f | ||
|
|
f6780fca2f | ||
|
|
b41f9f2dfe | ||
|
|
72b5c6f61a | ||
|
|
d43bf89978 | ||
|
|
3e9b91a2ac | ||
|
|
424b657376 | ||
|
|
9d0180ca97 | ||
|
|
2ed567b0f5 | ||
|
|
bcfb50d98c | ||
|
|
f118d17659 | ||
|
|
c61d504516 | ||
|
|
406939b9c0 | ||
|
|
b9dec5e3b5 | ||
|
|
2bc5d2b635 | ||
|
|
585f362738 | ||
|
|
7248b00086 | ||
|
|
cb61d0045c | ||
|
|
9f14c447db | ||
|
|
29882b4519 | ||
|
|
63a38dcd4d | ||
|
|
d65e1d9500 | ||
|
|
1dcd660815 | ||
|
|
65fccbf756 | ||
|
|
9734015bbb | ||
|
|
96a658648d | ||
|
|
cf39cc823a | ||
|
|
3d2fbe9aa3 | ||
|
|
37e4a32454 | ||
|
|
4cb1c665e0 | ||
|
|
90ce7781f4 | ||
|
|
4618e8c124 | ||
|
|
8515ac1764 | ||
|
|
5bc5b213a0 | ||
|
|
308000dd82 | ||
|
|
7ec9986340 | ||
|
|
4e122ed2d1 | ||
|
|
96a4877e9f | ||
|
|
093c09a737 | ||
|
|
d330358728 | ||
|
|
2dab8b31f2 | ||
|
|
82c2ec7208 | ||
|
|
118932acd3 | ||
|
|
85d8d0eddd | ||
|
|
ee62b9c88b | ||
|
|
ea05474df2 | ||
|
|
4300f37cc4 | ||
|
|
b9fe84f84d | ||
|
|
c06d975ec4 | ||
|
|
1b554b488e | ||
|
|
4d0b54e80b | ||
|
|
2ff051ba53 | ||
|
|
a8c0c158ad | ||
|
|
80653bfb59 | ||
|
|
a604dcc524 | ||
|
|
ad33cae40e | ||
|
|
9e648e428d | ||
|
|
9880b1393c | ||
|
|
87f183f43c | ||
|
|
bd4f0cec18 | ||
|
|
40e54a3b4f | ||
|
|
eb50f5cae8 | ||
|
|
f8f6c39915 | ||
|
|
51bd368214 | ||
|
|
184519834c | ||
|
|
ba7a60c5a2 | ||
|
|
3af774725f | ||
|
|
30467b44cd | ||
|
|
10f27a6a1b | ||
|
|
8d961a12e5 | ||
|
|
a4de8739e9 | ||
|
|
fb560e81ef | ||
|
|
16c36b0d8b | ||
|
|
ec9149c20e | ||
|
|
1c770c4ed7 | ||
|
|
6c837332ea | ||
|
|
5909bcde62 | ||
|
|
3d02c03001 | ||
|
|
e9e2e97831 | ||
|
|
33bf4bbb13 | ||
|
|
d00a539830 | ||
|
|
5a1596a322 | ||
|
|
d1140cc644 | ||
|
|
86aeb123bc | ||
|
|
04b636e3f2 | ||
|
|
87c6afccf7 | ||
|
|
5c1e111d8a | ||
|
|
06216d43bb | ||
|
|
29b58d4f2f | ||
|
|
44c7144e1c | ||
|
|
c7cf6f6568 | ||
|
|
7a7200cbda | ||
|
|
12a7b7f7fb | ||
|
|
4706d9e2d1 | ||
|
|
3b3ffb7b2b | ||
|
|
8e0a4f2faf | ||
|
|
c8d8db5947 | ||
|
|
3fd4b2f676 | ||
|
|
e1a493e13b | ||
|
|
54cd2a6ed2 |
12
.github/FUNDING.yml
vendored
12
.github/FUNDING.yml
vendored
@@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [sunnyhaibin] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: sunnyhaibin # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ['https://paypal.me/sunnyhaibin0850'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
13
.github/ISSUE_TEMPLATE/config.yml
vendored
13
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,14 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Join the Discord
|
||||
url: https://discord.comma.ai
|
||||
about: The community Discord is for both openpilot development and experience discussion
|
||||
- name: Report model bugs
|
||||
url: https://github.com/commaai/openpilot/discussions/categories/model-feedback
|
||||
about: Provide feedback for the driving or driver monitoring models
|
||||
- name: Discussions
|
||||
url: https://github.com/commaai/openpilot/discussions
|
||||
about: For questions and general discussion about openpilot
|
||||
url: https://discord.com/channels/469524606043160576/1254834193066623017
|
||||
about: Feedback for the driving and driver monitoring models goes in the #driving-feedback in Discord
|
||||
- name: Community Wiki
|
||||
url: https://github.com/commaai/openpilot/wiki
|
||||
about: Check out our community wiki
|
||||
- name: Community Discord
|
||||
url: https://discord.comma.ai
|
||||
about: Check out our community discord
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE/car_port.md
vendored
2
.github/PULL_REQUEST_TEMPLATE/car_port.md
vendored
@@ -8,7 +8,7 @@ assignees: ''
|
||||
|
||||
**Checklist**
|
||||
|
||||
- [ ] added entry to CAR in selfdrive/car/*/values.py and ran `selfdrive/car/docs.py` to generate new docs
|
||||
- [ ] added entry to CAR in selfdrive/car/*/values.py and ran `selfdrive/opcar/docs.py` to generate new docs
|
||||
- [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py)
|
||||
- [ ] route with openpilot:
|
||||
- [ ] route with stock system:
|
||||
|
||||
56
.github/labeler.yaml
vendored
56
.github/labeler.yaml
vendored
@@ -4,59 +4,7 @@ CI / testing:
|
||||
|
||||
car:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/**'
|
||||
|
||||
body:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/body/*'
|
||||
|
||||
chrysler:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/chrysler/*'
|
||||
|
||||
ford:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/ford/*'
|
||||
|
||||
gm:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/gm/*'
|
||||
|
||||
honda:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/honda/*'
|
||||
|
||||
hyundai:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/hyundai/*'
|
||||
|
||||
mazda:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/mazda/*'
|
||||
|
||||
nissan:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/nissan/*'
|
||||
|
||||
subaru:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/subaru/*'
|
||||
|
||||
tesla:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/tesla/*'
|
||||
|
||||
toyota:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/toyota/*'
|
||||
|
||||
volkswagen:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/volkswagen/*'
|
||||
|
||||
fingerprint:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/car/*/fingerprints.py'
|
||||
- any-glob-to-all-files: '{selfdrive/car/**,opendbc_repo}'
|
||||
|
||||
simulation:
|
||||
- changed-files:
|
||||
@@ -74,6 +22,6 @@ multilanguage:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/ui/translations/**'
|
||||
|
||||
research:
|
||||
autonomy:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{selfdrive/modeld/models/**,selfdrive/test/process_replay/model_replay_ref_commit}"
|
||||
|
||||
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
@@ -44,7 +44,7 @@ Explain how you tested this bug fix.
|
||||
|
||||
**Checklist**
|
||||
|
||||
- [ ] added entry to CAR in selfdrive/car/*/values.py and ran `selfdrive/car/docs.py` to generate new docs
|
||||
- [ ] added entry to CAR in selfdrive/car/*/values.py and ran `selfdrive/opcar/docs.py` to generate new docs
|
||||
- [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py)
|
||||
- [ ] route with openpilot:
|
||||
- [ ] route with stock system:
|
||||
|
||||
10
.github/workflows/auto_pr_review.yaml
vendored
10
.github/workflows/auto_pr_review.yaml
vendored
@@ -35,11 +35,12 @@ jobs:
|
||||
already-exists-comment: "Your PR should be made against the `master` branch"
|
||||
|
||||
# Welcome comment
|
||||
- name: comment
|
||||
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6
|
||||
- name: "First timers PR"
|
||||
uses: actions/first-interaction@v1
|
||||
if: github.event.pull_request.head.repo.full_name != 'commaai/openpilot'
|
||||
with:
|
||||
message: |
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
pr-message: |
|
||||
<!-- _(run_id **${{ github.run_id }}**)_ -->
|
||||
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
|
||||
* Convert your PR to a draft unless it's ready to review
|
||||
@@ -49,5 +50,4 @@ jobs:
|
||||
* all the tests are passing
|
||||
* the change is [something we merge](https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md#what-gets-merged)
|
||||
* include a route or your device' dongle ID if relevant
|
||||
comment_tag: run_id
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
2
.github/workflows/badges.yaml
vendored
2
.github/workflows/badges.yaml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- name: Push badges
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc) && python selfdrive/ui/translations/create_badges.py"
|
||||
${{ env.RUN }} "scons -j$(nproc) && python3 selfdrive/ui/translations/create_badges.py"
|
||||
|
||||
rm .gitattributes
|
||||
|
||||
|
||||
6
.github/workflows/ci_weekly_report.yaml
vendored
6
.github/workflows/ci_weekly_report.yaml
vendored
@@ -58,14 +58,14 @@ jobs:
|
||||
const jobName = job.name.split(" / ")[2];
|
||||
const runRegex = /\((.*?)\)/;
|
||||
const run = job.name.match(runRegex)[1];
|
||||
report[jobName] = report[jobName] || { successes: [], failures: [], cancelled: [] };
|
||||
report[jobName] = report[jobName] || { successes: [], failures: [], canceled: [] };
|
||||
switch (job.conclusion) {
|
||||
case "success":
|
||||
report[jobName].successes.push({ "run_number": run, "link": job.html_url}); break;
|
||||
case "failure":
|
||||
report[jobName].failures.push({ "run_number": run, "link": job.html_url }); break;
|
||||
case "cancelled":
|
||||
report[jobName].cancelled.push({ "run_number": run, "link": job.html_url }); break;
|
||||
case "canceled":
|
||||
report[jobName].canceled.push({ "run_number": run, "link": job.html_url }); break;
|
||||
}
|
||||
});
|
||||
return JSON.stringify({"jobs": report});
|
||||
|
||||
97
.github/workflows/codeql.yml
vendored
97
.github/workflows/codeql.yml
vendored
@@ -1,97 +0,0 @@
|
||||
# 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}}"
|
||||
46
.github/workflows/mirror_to_gitlab.yaml
vendored
46
.github/workflows/mirror_to_gitlab.yaml
vendored
@@ -1,46 +0,0 @@
|
||||
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 }}
|
||||
39
.github/workflows/repo-maintenance.yaml
vendored
39
.github/workflows/repo-maintenance.yaml
vendored
@@ -6,33 +6,6 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
bump_submodules:
|
||||
name: bump_submodules
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/commaai/openpilot-base:latest
|
||||
if: github.repository == 'commaai/openpilot'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: bump submodules
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
git -c submodule."tinygrad".update=none submodule update --remote
|
||||
git add .
|
||||
- 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: bump submodules
|
||||
title: '[bot] Bump submodules'
|
||||
branch: auto-bump-submodules
|
||||
base: master
|
||||
delete-branch: true
|
||||
body: 'Automatic PR from repo-maintenance -> bump_submodules'
|
||||
labels: bot
|
||||
package_updates:
|
||||
name: package_updates
|
||||
runs-on: ubuntu-latest
|
||||
@@ -41,11 +14,23 @@ jobs:
|
||||
if: github.repository == 'commaai/openpilot'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: uv lock
|
||||
run: |
|
||||
python3 -m ensurepip --upgrade
|
||||
pip3 install uv
|
||||
uv lock --upgrade
|
||||
- name: bump submodules
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
git -c submodule."tinygrad".update=none submodule update --remote
|
||||
git add .
|
||||
- name: update car docs
|
||||
run: |
|
||||
scons -j$(nproc) --minimal opendbc
|
||||
PYTHONPATH=. python selfdrive/car/docs.py
|
||||
git add docs/CARS.md
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83
|
||||
with:
|
||||
|
||||
34
.github/workflows/selfdrive_tests.yaml
vendored
34
.github/workflows/selfdrive_tests.yaml
vendored
@@ -54,20 +54,20 @@ jobs:
|
||||
timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 10 || 30) }} # allow more time when we missed the scons cache
|
||||
run: |
|
||||
cd $STRIPPED_DIR
|
||||
${{ env.RUN }} "python system/manager/build.py"
|
||||
${{ env.RUN }} "python3 system/manager/build.py"
|
||||
- name: Run tests
|
||||
timeout-minutes: 3
|
||||
run: |
|
||||
cd $STRIPPED_DIR
|
||||
${{ env.RUN }} "release/check-dirty.sh && \
|
||||
MAX_EXAMPLES=5 $PYTEST -m 'not slow' selfdrive/car"
|
||||
- name: static analysis
|
||||
- name: Static analysis
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
cp pyproject.toml $STRIPPED_DIR
|
||||
cd $STRIPPED_DIR
|
||||
${{ env.RUN }} "scripts/lint.sh"
|
||||
${{ env.RUN }} "scripts/lint/lint.sh --skip check_added_large_files"
|
||||
|
||||
build:
|
||||
strategy:
|
||||
@@ -139,17 +139,16 @@ jobs:
|
||||
name: static analysis
|
||||
runs-on: ${{ ((github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-latest' }}
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
|
||||
env:
|
||||
PYTHONWARNINGS: default
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- name: Build openpilot
|
||||
run: ${{ env.RUN }} "scons -j$(nproc)"
|
||||
- name: static analysis
|
||||
- name: Setup
|
||||
run: tools/op.sh setup
|
||||
- name: Static analysis
|
||||
timeout-minutes: 1
|
||||
run: ${{ env.RUN }} "scripts/lint.sh"
|
||||
run: tools/op.sh lint
|
||||
|
||||
unit_tests:
|
||||
name: unit tests
|
||||
@@ -170,7 +169,6 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
run: |
|
||||
${{ env.RUN }} "source selfdrive/test/setup_xvfb.sh && \
|
||||
export MAPBOX_TOKEN='pk.eyJ1Ijoiam5ld2IiLCJhIjoiY2xxNW8zZXprMGw1ZzJwbzZneHd2NHljbSJ9.gV7VPRfbXFetD-1OVF0XZg' && \
|
||||
$PYTEST --timeout 60 -m 'not slow' && \
|
||||
./selfdrive/ui/tests/create_test_translations.sh && \
|
||||
QT_QPA_PLATFORM=offscreen ./selfdrive/ui/tests/test_translations && \
|
||||
@@ -223,7 +221,7 @@ jobs:
|
||||
- name: Upload reference logs
|
||||
if: ${{ failure() && steps.print-diff.outcome == 'success' && github.repository == 'commaai/openpilot' && env.AZURE_TOKEN != '' }}
|
||||
run: |
|
||||
${{ env.RUN }} "unset PYTHONWARNINGS && AZURE_TOKEN='$AZURE_TOKEN' python selfdrive/test/process_replay/test_processes.py -j$(nproc) --upload-only"
|
||||
${{ env.RUN }} "unset PYTHONWARNINGS && AZURE_TOKEN='$AZURE_TOKEN' python3 selfdrive/test/process_replay/test_processes.py -j$(nproc) --upload-only"
|
||||
# PYTHONWARNINGS triggers a SyntaxError in onnxruntime
|
||||
- name: Run model replay with ONNX
|
||||
timeout-minutes: 4
|
||||
@@ -283,7 +281,8 @@ jobs:
|
||||
car_docs_diff:
|
||||
name: PR comments
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'pull_request'
|
||||
#if: github.event_name == 'pull_request'
|
||||
if: false # TODO: run this in opendbc?
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -293,7 +292,7 @@ jobs:
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
- name: Get base car info
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc) && python selfdrive/debug/dump_car_docs.py --path /tmp/openpilot_cache/base_car_docs"
|
||||
${{ env.RUN }} "scons -j$(nproc) && python3 selfdrive/debug/dump_car_docs.py --path /tmp/openpilot_cache/base_car_docs"
|
||||
sudo chown -R $USER:$USER ${{ github.workspace }}
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -305,7 +304,7 @@ jobs:
|
||||
run: |
|
||||
cd current
|
||||
${{ env.RUN }} "scons -j$(nproc)"
|
||||
output=$(${{ env.RUN }} "python selfdrive/debug/print_docs_diff.py --path /tmp/openpilot_cache/base_car_docs")
|
||||
output=$(${{ env.RUN }} "python3 selfdrive/debug/print_docs_diff.py --path /tmp/openpilot_cache/base_car_docs")
|
||||
output="${output//$'\n'/'%0A'}"
|
||||
echo "::set-output name=diff::$output"
|
||||
- name: Find comment
|
||||
@@ -350,8 +349,7 @@ jobs:
|
||||
run: >
|
||||
${{ env.RUN }} "PYTHONWARNINGS=ignore &&
|
||||
source selfdrive/test/setup_xvfb.sh &&
|
||||
export MAPBOX_TOKEN='pk.eyJ1Ijoiam5ld2IiLCJhIjoiY2xxNW8zZXprMGw1ZzJwbzZneHd2NHljbSJ9.gV7VPRfbXFetD-1OVF0XZg' &&
|
||||
python selfdrive/ui/tests/test_ui/run.py"
|
||||
python3 selfdrive/ui/tests/test_ui/run.py"
|
||||
- name: Upload Test Report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
3
.github/workflows/tools_tests.yaml
vendored
3
.github/workflows/tools_tests.yaml
vendored
@@ -39,8 +39,7 @@ jobs:
|
||||
${{ env.RUN }} "scons -j$(nproc)"
|
||||
- name: Run bridge test
|
||||
run: |
|
||||
${{ env.RUN }} "export MAPBOX_TOKEN='pk.eyJ1Ijoiam5ld2IiLCJhIjoiY2xxNW8zZXprMGw1ZzJwbzZneHd2NHljbSJ9.gV7VPRfbXFetD-1OVF0XZg' && \
|
||||
source selfdrive/test/setup_xvfb.sh && \
|
||||
${{ env.RUN }} "source selfdrive/test/setup_xvfb.sh && \
|
||||
source selfdrive/test/setup_vsound.sh && \
|
||||
CI=1 pytest tools/sim/tests/test_metadrive_bridge.py"
|
||||
|
||||
|
||||
19
.github/workflows/ui_preview.yaml
vendored
19
.github/workflows/ui_preview.yaml
vendored
@@ -6,6 +6,7 @@ on:
|
||||
- 'master'
|
||||
paths:
|
||||
- 'selfdrive/ui/**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
UI_JOB_NAME: "Create UI Report"
|
||||
@@ -75,15 +76,27 @@ jobs:
|
||||
<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>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/settings_network.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.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 }}/onroad_wide.png"></td>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad_wide_sidebar.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/settings_device.png"></td>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad_alert_small.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad_alert_mid.png"></td>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad_alert_full.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/driver_camera.png"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
comment_tag: run_id_screenshots
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -56,7 +56,6 @@ selfdrive/car/tests/cars_dump
|
||||
system/camerad/camerad
|
||||
system/camerad/test/ae_gray_test
|
||||
selfdrive/modeld/_modeld
|
||||
selfdrive/modeld/_navmodeld
|
||||
selfdrive/modeld/_dmonitoringmodeld
|
||||
/src/
|
||||
|
||||
|
||||
240
.gitlab-ci.yml
240
.gitlab-ci.yml
@@ -1,240 +0,0 @@
|
||||
variables:
|
||||
BUILD_DIR: "/data/openpilot"
|
||||
OUTPUT_DIR: "${CI_PROJECT_DIR}/output"
|
||||
CI_DIR: "${CI_PROJECT_DIR}/release/ci"
|
||||
VERSION: 'echo $(date "+%Y.%m.%d")'
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
|
||||
DEV_C3_SOURCE_BRANCH: "master-dev-c3"
|
||||
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
|
||||
- sanity
|
||||
- publish
|
||||
- notify
|
||||
|
||||
default:
|
||||
retry: 2
|
||||
tags:
|
||||
- sunnypilot
|
||||
- x86
|
||||
|
||||
.default_before_script: &default_before_script
|
||||
- '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}"'
|
||||
|
||||
|
||||
workflow: # If running on any branch other than main.
|
||||
rules:
|
||||
# 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
|
||||
|
||||
# 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}"
|
||||
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"
|
||||
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"
|
||||
AUTO_BUILD: true
|
||||
- when: always
|
||||
|
||||
|
||||
build:
|
||||
stage: build
|
||||
cache:
|
||||
key: "${CI_COMMIT_REF_SLUG}"
|
||||
paths:
|
||||
- "${CI_DIR}/scons_cache"
|
||||
before_script:
|
||||
- find $BUILD_DIR/ -mindepth 1 -delete
|
||||
- *default_before_script
|
||||
- "echo Starting build stage..."
|
||||
- "echo BUILD_DIR: ${BUILD_DIR}"
|
||||
- "echo CI_DIR: ${CI_DIR}"
|
||||
- "echo VERSION: ${VERSION}"
|
||||
- "echo CI_COMMIT_REF_NAME: ${CI_COMMIT_REF_NAME}"
|
||||
- git config --global --add safe.directory ${CI_PROJECT_DIR}
|
||||
script:
|
||||
- export PYTHONPATH="$BUILD_DIR"
|
||||
- "echo Building Panda..."
|
||||
- scons -j$(nproc) cache_dir=${CI_DIR}/scons_cache ${CI_PROJECT_DIR}/panda
|
||||
- mkdir -p ${BUILD_DIR}
|
||||
- ls -la ${BUILD_DIR}
|
||||
- "echo Building Rest..."
|
||||
- ./release/release_files.py | sort | uniq | rsync -vrRl --files-from=- . $BUILD_DIR/
|
||||
# - cp -pR --parents $(cat release/files_common release/files_tici | sort | uniq) $BUILD_DIR/ 2> >(grep -v 'warning:' >&2)
|
||||
- cd $BUILD_DIR
|
||||
- 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}
|
||||
- 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
|
||||
--include='**/panda/board/'
|
||||
--include='**/panda/board/obj'
|
||||
--include='**/panda/board/obj/panda.bin.signed'
|
||||
--include='**/panda/board/obj/panda_h7.bin.signed'
|
||||
--include='**/panda/board/obj/bootstub.panda.bin'
|
||||
--include='**/panda/board/obj/bootstub.panda_h7.bin'
|
||||
--exclude='.sconsign.dblite'
|
||||
--exclude='*.a'
|
||||
--exclude='*.A'
|
||||
--exclude='*.o'
|
||||
--exclude='*.O'
|
||||
--exclude='*.os'
|
||||
--exclude='*.OS'
|
||||
--exclude='*.pyc'
|
||||
--exclude='*.PYC'
|
||||
--exclude='moc_*'
|
||||
--exclude='MOC_*'
|
||||
--exclude='*.cc'
|
||||
--exclude='*.CC'
|
||||
--exclude='Jenkinsfile'
|
||||
--exclude='supercombo.onnx'
|
||||
--exclude='**/panda/board/*'
|
||||
--exclude='**/panda/board/obj/**'
|
||||
--exclude='**/panda/certs/'
|
||||
--exclude='**/panda/crypto/'
|
||||
--exclude='**/release/'
|
||||
--exclude='**/.github/'
|
||||
--exclude='**/selfdrive/ui/replay/'
|
||||
--exclude='**/__pycache__/'
|
||||
--exclude='**/selfdrive/ui/*.h'
|
||||
--exclude='**/selfdrive/ui/**/*.h'
|
||||
--exclude='**/selfdrive/ui/qt/offroad/sunnypilot/'
|
||||
--exclude='**/.git/'
|
||||
--exclude='**/SConstruct'
|
||||
--exclude='**/SConscript'
|
||||
--delete-excluded
|
||||
--chown=comma:comma
|
||||
${BUILD_DIR}/ ${OUTPUT_DIR}/
|
||||
after_script:
|
||||
# cleanup build dir after doing work
|
||||
- find $BUILD_DIR/ -mindepth 1 -delete
|
||||
artifacts:
|
||||
paths:
|
||||
- ${OUTPUT_DIR}/
|
||||
tags: [ 'sunnypilot', 'tici' ]
|
||||
rules:
|
||||
- if: $AUTO_BUILD
|
||||
when: always
|
||||
- when: manual
|
||||
|
||||
.publish_base: &publish_base
|
||||
image: alpine
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: normal
|
||||
stage: publish
|
||||
needs:
|
||||
- job: build
|
||||
artifacts: true
|
||||
before_script:
|
||||
- 'apk update && apk upgrade'
|
||||
- 'apk add git bash openssh'
|
||||
- 'eval $(ssh-agent -s)'
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- 'mkdir -p ~/.ssh/'
|
||||
- 'chmod 700 ~/.ssh'
|
||||
- export HOST=$(echo ${GIT_ORIGIN} | cut -d'@' -f2 | cut -d':' -f1)
|
||||
- echo fetching ssh pub keys for ${HOST}
|
||||
- 'ssh-keyscan -H ${HOST} >> ~/.ssh/known_hosts' # Adding gitlab to trusted
|
||||
- 'chmod 644 ~/.ssh/known_hosts'
|
||||
- *default_before_script
|
||||
script:
|
||||
- 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}"
|
||||
allow_failure: false
|
||||
|
||||
publish to private gitlab prebuilt:
|
||||
extends: ".publish_base"
|
||||
variables:
|
||||
GIT_ORIGIN: git@gitlab.com:sunnypilot/public/sunnypilot-prebuilts.git
|
||||
rules:
|
||||
- if: $AUTO_BUILD
|
||||
when: on_success
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
when: on_success
|
||||
- when: manual
|
||||
|
||||
publish to public github prebuilt:
|
||||
extends: ".publish_base"
|
||||
variables:
|
||||
GIT_ORIGIN: git@github.com:sunnyhaibin/sunnypilot.git
|
||||
GIT_CONFIG_USER_EMAIL: "jason.wen@sunnypilot.ai"
|
||||
GIT_CONFIG_USER_NAME: "Jason Wen"
|
||||
rules:
|
||||
- if: $AUTO_PUBLISH
|
||||
when: on_success
|
||||
- when: manual
|
||||
|
||||
.notify_discord: ¬ify_discord
|
||||
image: alpine
|
||||
stage: notify
|
||||
needs: ["build"]
|
||||
variables:
|
||||
DISCORD_HOOK: "${DISCORD_MANUAL_BUILD_WEBHOOK_URL}" # Default hook if not overriden by children
|
||||
before_script:
|
||||
- 'apk add curl jq envsubst'
|
||||
script:
|
||||
- echo using [${TEMPLATE}]
|
||||
- cat release/ci/${TEMPLATE} | envsubst | tee payload.json
|
||||
- 'curl -X POST -H "Content-Type: application/json" -d "$(cat payload.json)" ${DISCORD_HOOK} | jq .'
|
||||
rules:
|
||||
- if: $NEW_BRANCH
|
||||
when: on_success
|
||||
- when: never
|
||||
allow_failure: true
|
||||
|
||||
notify pending action:
|
||||
extends: ".notify_discord"
|
||||
variables:
|
||||
TEMPLATE: "discord_template_notify_dev_private.json"
|
||||
before_script:
|
||||
- !reference [".notify_discord", "before_script"]
|
||||
- export AVATAR_URL=$(curl -s -X GET "https://gitlab.com/api/v4/avatar?email=${GITLAB_USER_EMAIL}" | jq -r '.avatar_url')
|
||||
|
||||
notify new dev build:
|
||||
extends: ".notify_discord"
|
||||
stage: notify
|
||||
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:
|
||||
DISCORD_HOOK: "${DISCORD_NEW_BUILD_WEBHOOK_URL}" # Overriding hook because we know we are dev-c3
|
||||
- !reference [".notify_discord", "rules"]
|
||||
10
.gitmodules
vendored
10
.gitmodules
vendored
@@ -1,18 +1,18 @@
|
||||
[submodule "panda"]
|
||||
path = panda
|
||||
url = https://github.com/sunnyhaibin/panda.git
|
||||
url = ../../commaai/panda.git
|
||||
[submodule "opendbc"]
|
||||
path = opendbc_repo
|
||||
url = https://github.com/sunnypilot/opendbc.git
|
||||
url = ../../commaai/opendbc.git
|
||||
[submodule "msgq"]
|
||||
path = msgq_repo
|
||||
url = https://github.com/sunnypilot/msgq.git
|
||||
url = ../../commaai/msgq.git
|
||||
[submodule "rednose_repo"]
|
||||
path = rednose_repo
|
||||
url = https://github.com/commaai/rednose.git
|
||||
url = ../../commaai/rednose.git
|
||||
[submodule "teleoprtc_repo"]
|
||||
path = teleoprtc_repo
|
||||
url = https://github.com/commaai/teleoprtc
|
||||
url = ../../commaai/teleoprtc
|
||||
[submodule "tinygrad"]
|
||||
path = tinygrad_repo
|
||||
url = https://github.com/tinygrad/tinygrad.git
|
||||
|
||||
25
.idea/customTargets.xml
generated
25
.idea/customTargets.xml
generated
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CLionExternalBuildManager">
|
||||
<target id="a62f99e8-5ec4-434c-8122-49efed5af108" name="Poetry SCons Build Debug" defaultType="TOOL">
|
||||
<configuration id="b93ec964-16e5-4962-a12e-3ed360ce8f02" name="Poetry SCons Build Debug">
|
||||
<build type="TOOL">
|
||||
<tool actionId="Tool_External Tools_Poetry SCons Build Debug" />
|
||||
</build>
|
||||
<clean type="TOOL">
|
||||
<tool actionId="Tool_External Tools_Poetry SCons Clean" />
|
||||
</clean>
|
||||
</configuration>
|
||||
</target>
|
||||
<target id="edd8ad9d-183b-467c-a355-0d9a0ecab026" name="Poetry SCons Build Release" defaultType="TOOL">
|
||||
<configuration id="09523339-5ce3-4223-ab9e-904f38ad7752" name="Poetry SCons Build Release">
|
||||
<build type="TOOL">
|
||||
<tool actionId="Tool_External Tools_Poetry SCons Build Release" />
|
||||
</build>
|
||||
<clean type="TOOL">
|
||||
<tool actionId="Tool_External Tools_Poetry SCons Clean" />
|
||||
</clean>
|
||||
</configuration>
|
||||
</target>
|
||||
</component>
|
||||
</project>
|
||||
23
.idea/tools/External Tools.xml
generated
23
.idea/tools/External Tools.xml
generated
@@ -1,23 +0,0 @@
|
||||
<toolSet name="External Tools">
|
||||
<tool name="Poetry SCons Build Debug" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
|
||||
<exec>
|
||||
<option name="COMMAND" value="bash" />
|
||||
<option name="PARAMETERS" value="-c "source .venv/bin/activate && scons -u -j$(nproc) --compile_db --ccflags=\"-fno-inline\""" />
|
||||
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
||||
</exec>
|
||||
</tool>
|
||||
<tool name="Poetry SCons Clean" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
|
||||
<exec>
|
||||
<option name="COMMAND" value="bash" />
|
||||
<option name="PARAMETERS" value="-c "source .venv/bin/activate && scons -c" " />
|
||||
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
||||
</exec>
|
||||
</tool>
|
||||
<tool name="Poetry SCons Build Release" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
|
||||
<exec>
|
||||
<option name="COMMAND" value="bash" />
|
||||
<option name="PARAMETERS" value="-c "source .venv/bin/activate && scons -u -j$(nproc) --compile_db" " />
|
||||
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
||||
</exec>
|
||||
</tool>
|
||||
</toolSet>
|
||||
@@ -1,41 +0,0 @@
|
||||
[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,4 +1,4 @@
|
||||
[lfs]
|
||||
url = https://gitlab.com/sunnypilot/public/sunnypilot-lfs.git/info/lfs
|
||||
pushurl = ssh://git@gitlab.com/sunnypilot/public/sunnypilot-lfs.git
|
||||
url = https://gitlab.com/commaai/openpilot-lfs.git/info/lfs
|
||||
pushurl = ssh://git@gitlab.com/commaai/openpilot-lfs.git
|
||||
locksverify = false
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
[lfs]
|
||||
url = https://gitlab.com/commaai/openpilot-lfs.git/info/lfs
|
||||
pushurl = ssh://git@gitlab.com/commaai/openpilot-lfs.git
|
||||
locksverify = false
|
||||
@@ -1,10 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build Debug" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" WORKING_DIR="file://$ProjectFileDir$/selfdrive/ui" PASS_PARENT_ENVS_2="true" PROJECT_NAME="openpilot-special" TARGET_NAME="Poetry SCons Build Debug" CONFIG_NAME="Poetry SCons Build Debug" RUN_PATH="ui">
|
||||
<envs>
|
||||
<env name="QT_DBL_CLICK_DIST" value="150" />
|
||||
</envs>
|
||||
<method v="2">
|
||||
<option name="CLION.EXTERNAL.BUILD" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,10 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build Release" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" WORKING_DIR="file://$ProjectFileDir$/selfdrive/ui" PASS_PARENT_ENVS_2="true" PROJECT_NAME="openpilot-special" TARGET_NAME="Poetry SCons Build Release" CONFIG_NAME="Poetry SCons Build Release" RUN_PATH="ui">
|
||||
<envs>
|
||||
<env name="QT_DBL_CLICK_DIST" value="150" />
|
||||
</envs>
|
||||
<method v="2">
|
||||
<option name="CLION.EXTERNAL.BUILD" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
1
.vscode/launch.json
vendored
1
.vscode/launch.json
vendored
@@ -7,7 +7,6 @@
|
||||
"description": "Select the process to debug",
|
||||
"options": [
|
||||
"selfdrive/controls/controlsd.py",
|
||||
"selfdrive/navd/navd.py",
|
||||
"system/timed/timed.py",
|
||||
"tools/sim/run_bridge.py"
|
||||
]
|
||||
|
||||
989
CHANGELOGS.md
989
CHANGELOGS.md
@@ -1,989 +0,0 @@
|
||||
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! (CTV 2.0: GlideTech)
|
||||
* 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❗: Toyota - Drive Mode Selector
|
||||
* When enabled you can control acceleration personality just with press of button!
|
||||
* UPDATED: Dynamic Experimental Control
|
||||
* Switched to weighted moving averages to enhance responsiveness to recent data.
|
||||
* Goal is to improve real-time detection accuracy in dynamic conditions.
|
||||
* Capable of handling the increased complexity that comes with this approach.
|
||||
* Particularly beneficial in environments where recent changes are critical to performance.
|
||||
* 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❗: Hyundai CAN: Enable Cruise Main by Default
|
||||
* Set CRUISE MAIN to ON by default when the car starts, without engaging MADS
|
||||
* This feature only applies when "openpilot Longitudinal Control (Alpha)" is enabled under the "Toggles" menu
|
||||
* 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 (CTV 2.0: GlideTech)
|
||||
* Re-tuned and tested by the community (September 29, 2024)
|
||||
* UPDATED: Driving Model Selector v5
|
||||
* NEW❗: Driving Model additions
|
||||
* Notre Dame (July 01, 2024) - NDv3
|
||||
* UPDATED: Neural Network Lateral Control (NNLC)
|
||||
* NEW❗: Remove Lateral Jerk Response (Alpha)
|
||||
* FIXED: Hotfix for "lazy" steering performance in tighter curves thanks to twilsonco!
|
||||
* 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
|
||||
* FIXED: Experimental Model Distance Button Hold
|
||||
* Experimental Model toggle with distance button hold no longer changes Personality
|
||||
* Personality setting remains consistent when switching between Chill and Experimental Mode
|
||||
* 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
|
||||
* Ford F-150 2022-23 support
|
||||
* Ford F-150 Lightning 2021-23 support
|
||||
* Ford Mustang Mach-E 2021-23 support
|
||||
* Hyundai Kona Electric Non-SCC 2019 support thanks to NikitaNekrasov!
|
||||
* 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
|
||||
* NEW❗: Ford CAN-FD longitudinal
|
||||
* NEW❗: Parse speed limit sign recognition from camera for certain supported platforms
|
||||
* 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 Radar-based SCC
|
||||
* Longitudinal support for CAN-FD Radar-based SCC cars
|
||||
* 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
|
||||
@@ -13,7 +13,7 @@ ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
COPY tools/install_ubuntu_dependencies.sh /tmp/tools/
|
||||
RUN INSTALL_EXTRA_PACKAGES=no /tmp/tools/install_ubuntu_dependencies.sh && \
|
||||
RUN /tmp/tools/install_ubuntu_dependencies.sh && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* && \
|
||||
cd /usr/lib/gcc/arm-none-eabi/* && \
|
||||
rm -rf arm/ thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
|
||||
|
||||
77
HOW-TOS.md
77
HOW-TOS.md
@@ -1,77 +0,0 @@
|
||||
# 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>
|
||||
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
@@ -26,7 +26,6 @@ export SOURCE_DIR=${env.SOURCE_DIR}
|
||||
export GIT_BRANCH=${env.GIT_BRANCH}
|
||||
export GIT_COMMIT=${env.GIT_COMMIT}
|
||||
export AZURE_TOKEN='${env.AZURE_TOKEN}'
|
||||
export MAPBOX_TOKEN='${env.MAPBOX_TOKEN}'
|
||||
# only use 1 thread for tici tests since most require HIL
|
||||
export PYTEST_ADDOPTS="-n 0"
|
||||
|
||||
@@ -96,49 +95,11 @@ def deviceStage(String stageName, String deviceType, List extra_env, def steps)
|
||||
}
|
||||
}
|
||||
|
||||
def pcStage(String stageName, Closure body) {
|
||||
node {
|
||||
stage(stageName) {
|
||||
if (currentBuild.result != null) {
|
||||
return
|
||||
}
|
||||
|
||||
checkout scm
|
||||
|
||||
def dockerArgs = "--user=batman -v /tmp/comma_download_cache:/tmp/comma_download_cache -v /tmp/scons_cache:/tmp/scons_cache -e PYTHONPATH=${env.WORKSPACE} --cpus=8 --memory 16g -e PYTEST_ADDOPTS='-n8'";
|
||||
|
||||
def openpilot_base = retryWithDelay (3, 15) {
|
||||
return docker.build("openpilot-base:build-${env.GIT_COMMIT}", "-f Dockerfile.openpilot_base .")
|
||||
}
|
||||
|
||||
lock(resource: "", label: 'pc', inversePrecedence: true, quantity: 1) {
|
||||
openpilot_base.inside(dockerArgs) {
|
||||
timeout(time: 20, unit: 'MINUTES') {
|
||||
try {
|
||||
retryWithDelay (3, 15) {
|
||||
sh "git config --global --add safe.directory '*'"
|
||||
sh "git submodule update --init --recursive"
|
||||
sh "git lfs pull"
|
||||
}
|
||||
body()
|
||||
} finally {
|
||||
sh "rm -rf ${env.WORKSPACE}/* || true"
|
||||
sh "rm -rf .* || true"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def setupCredentials() {
|
||||
withCredentials([
|
||||
string(credentialsId: 'azure_token', variable: 'AZURE_TOKEN'),
|
||||
string(credentialsId: 'mapbox_token', variable: 'MAPBOX_TOKEN')
|
||||
]) {
|
||||
env.AZURE_TOKEN = "${AZURE_TOKEN}"
|
||||
env.MAPBOX_TOKEN = "${MAPBOX_TOKEN}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
21
LICENSE.md
21
LICENSE.md
@@ -1,21 +0,0 @@
|
||||
# Custom MIT License
|
||||
|
||||
Copyright (c) 2024, Haibin Wen, SUNNYPILOT LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to view and modify the Software, subject to the following conditions:
|
||||
|
||||
1. **Permission Required**: Permission Required for Commercial, For-Profit, or Closed Source Use: Use of the Software, in whole or in part, for any commercial purposes, for-profit projects, or in closed source projects requires explicit written permission from the original author(s).
|
||||
|
||||
2. **Redistribution**: Any redistribution of the Software, modified or unmodified, must retain this license notice and the following acknowledgment:
|
||||
"This software is licensed under a custom license requiring permission for use."
|
||||
|
||||
3. **Visibility**: Any project that uses the Software must visibly mention the following acknowledgment:
|
||||
"This project uses software from Haibin Wen and SUNNYPILOT LLC and is licensed under a custom license requiring permission for use."
|
||||
|
||||
4. **No Warranty**: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Contact sunnypilot Support <support@sunnypilot.ai> for permission requests.
|
||||
|
||||
---
|
||||
|
||||
Haibin Wen, SUNNYPILOT LLC
|
||||
502
README.md
502
README.md
@@ -1,460 +1,98 @@
|
||||

|
||||
<div align="center" style="text-align: center;">
|
||||
|
||||
Table of Contents
|
||||
=======================
|
||||
<h1>openpilot</h1>
|
||||
|
||||
* [Join our Discord](#-join-our-discord)
|
||||
* [What is sunnypilot?](#-what-is-sunnypilot)
|
||||
* [Running in a car](#-running-on-a-dedicated-device-in-a-car)
|
||||
* [Read Before Installing](#-read-before-installing)
|
||||
* [Prohibited Safety Modifications](#-prohibited-safety-modifications)
|
||||
* [Installation](#-installation)
|
||||
* [Highlight Features](#-highlight-features)
|
||||
* [Driving Enhancements](#-driving-enhancements)
|
||||
* [Branch Definitions](#-branch-definitions)
|
||||
* [Recommended Branches](#-recommended-branches)
|
||||
* [How-To's](#-How-Tos)
|
||||
* [Pull Requests](#-Pull-Requests)
|
||||
* [Special Thanks](#-special-thanks)
|
||||
* [User Data](#-user-data)
|
||||
* [Licensing](#licensing)
|
||||
* [Donate](#-support-sunnypilot)
|
||||
|
||||
---
|
||||
|
||||
<details><summary><h3>💭 Join our Discord</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
Join the official sunnypilot Discord server to stay up to date with all the latest features and be a part of shaping the future of sunnypilot!
|
||||
* https://discord.gg/sunnypilot
|
||||
|
||||
 
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>🌞 What is sunnypilot?</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
[sunnypilot](https://github.com/sunnyhaibin/sunnypilot) is a fork of comma.ai's 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.
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>🚘 Running on a dedicated device in a car</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
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
|
||||
|
||||
Detailed instructions for [how to mount the device in a car](https://comma.ai/setup).
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>🚨 Read Before Installing</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
It is recommended to read this **entire page** before proceeding. This will ensure that you fully understand each added feature on sunnypilot, and you are selecting the right branch for your car to have the best driving experience.
|
||||
|
||||
This is a fork of [comma.ai's openpilot](https://github.com/commaai/openpilot). By installing this software, you accept all responsibility for anything that might occur while you use it. All contributors to sunnypilot are not liable. ❗<ins>**Use at your own risk.**</ins>❗
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>⛔ Prohibited Safety Modifications</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
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 a **VIOLATION** of this policy and **ARE NOT** included in any sunnypilot branches:
|
||||
* Driver Monitoring:
|
||||
* ❌ "Nerfing" or reducing monitoring parameters.
|
||||
* Panda safety:
|
||||
* ❌ No preventing disengaging of <ins>**LONGITUDINAL CONTROL**</ins> (acceleration/brake) on brake pedal press.
|
||||
* ❌ No auto re-engaging of <ins>**LONGITUDINAL CONTROL**</ins> (acceleration/brake) on brake pedal release.
|
||||
* ❌ No disengaging on ACC MAIN in OFF state.
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details><summary><h3>⚒ Installation</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
<details><summary>URL (Easy)</summary>
|
||||
|
||||
comma three
|
||||
------
|
||||
|
||||
Please refer to [Recommended Branches](#-recommended-branches) to find your preferred/supported branch. This guide will assume you want to install the latest `release-c3` branch.
|
||||
|
||||
* sunnypilot not installed or you installed a version before 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 and upon reboot, select `Custom Software` when given the option.
|
||||
3. Input the installation URL per [Recommended Branches](#-recommended-branches). Example: ```release-c3.sunnypilot.ai``` [^4] (note: `https://` is not requirement on the comma three)
|
||||
4. Complete the rest of the installation following the onscreen instructions.
|
||||
|
||||
* sunnypilot already installed and you installed a version after 0.8.17?
|
||||
1. On the comma three, go to `Settings` ▶️ `Software`.
|
||||
2. At the `Download` option, press `CHECK`. This will fetch the list of latest branches from sunnypilot.
|
||||
3. At the `Target Branch` option, press `SELECT` to open the Target Branch selector.
|
||||
4. Scroll to select the desired branch per [Recommended Branches](#-recommended-branches). Example: `release-c3`
|
||||
|
||||
| Branch | Installation URL |
|
||||
|:------------:|:--------------------------------:|
|
||||
| `release-c3` | https://release-c3.sunnypilot.ai |
|
||||
| `staging-c3` | https://staging-c3.sunnypilot.ai |
|
||||
| `dev-c3` | https://dev-c3.sunnypilot.ai |
|
||||
|
||||
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>
|
||||
<p>
|
||||
<b>openpilot is an operating system for robotics.</b>
|
||||
<br>
|
||||
Currently, it upgrades the driver assistance system in 275+ supported cars.
|
||||
</p>
|
||||
|
||||
Prerequisites: [How to SSH](https://github.com/commaai/openpilot/wiki/SSH)
|
||||
<h3>
|
||||
<a href="https://docs.comma.ai">Docs</a>
|
||||
<span> · </span>
|
||||
<a href="https://docs.comma.ai/contributing/roadmap/">Roadmap</a>
|
||||
<span> · </span>
|
||||
<a href="https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md">Contribute</a>
|
||||
<span> · </span>
|
||||
<a href="https://discord.comma.ai">Community</a>
|
||||
<span> · </span>
|
||||
<a href="https://comma.ai/shop">Try it on a comma 3X</a>
|
||||
</h3>
|
||||
|
||||
If you are looking to install sunnypilot via SSH, run the following command in an SSH terminal after connecting to your device:
|
||||
Quick start: `bash <(curl -fsSL openpilot.comma.ai)`
|
||||
|
||||
comma three:
|
||||

|
||||
[](https://codecov.io/gh/commaai/openpilot)
|
||||
[](LICENSE)
|
||||
[](https://x.com/comma_ai)
|
||||
[](https://discord.comma.ai)
|
||||
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="https://youtu.be/NmBfgOanCyk" title="Video By Greer Viau"><img src="https://github.com/commaai/openpilot/assets/8762862/2f7112ae-f748-4f39-b617-fabd689c3772"></a></td>
|
||||
<td><a href="https://youtu.be/VHKyqZ7t8Gw" title="Video By Logan LeGrand"><img src="https://github.com/commaai/openpilot/assets/8762862/92351544-2833-40d7-9e0b-7ef7ae37ec4c"></a></td>
|
||||
<td><a href="https://youtu.be/SUIZYzxtMQs" title="A drive to Taco Bell"><img src="https://github.com/commaai/openpilot/assets/8762862/05ceefc5-2628-439c-a9b2-89ce77dc6f63"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
To start using openpilot in a car
|
||||
------
|
||||
* [`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
|
||||
```
|
||||
To use openpilot 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 `openpilot.comma.ai` to install the release version.
|
||||
3. **Supported Car:** Ensure that you have one of [the 275+ supported cars](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 two:
|
||||
We have detailed instructions for [how to install the harness and device in a car](https://comma.ai/setup). Note that it's possible to run openpilot on [other hardware](https://blog.comma.ai/self-driving-car-for-free/), although it's not plug-and-play.
|
||||
|
||||
To start developing openpilot
|
||||
------
|
||||
* [`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
|
||||
```
|
||||
openpilot is developed by [comma](https://comma.ai/) and by users like you. We welcome both pull requests and issues on [GitHub](http://github.com/commaai/openpilot).
|
||||
|
||||
After running the command to install the desired branch, your comma device should reboot.
|
||||
</details>
|
||||
* Join the [community Discord](https://discord.comma.ai)
|
||||
* Check out [the contributing docs](docs/CONTRIBUTING.md)
|
||||
* Check out the [openpilot tools](tools/)
|
||||
* Read about the [development workflow](docs/WORKFLOW.md)
|
||||
* Code documentation lives at https://docs.comma.ai
|
||||
* Information about running openpilot lives on the [community wiki](https://github.com/commaai/openpilot/wiki)
|
||||
|
||||
</details>
|
||||
Want to get paid to work on openpilot? [comma is hiring](https://comma.ai/jobs#open-positions) and offers lots of [bounties](https://comma.ai/bounties) for external contributors.
|
||||
|
||||
Safety and Testing
|
||||
----
|
||||
|
||||
<details><summary><h3>🚗 Highlight Features</h3></summary>
|
||||
* openpilot observes [ISO26262](https://en.wikipedia.org/wiki/ISO_26262) guidelines, see [SAFETY.md](docs/SAFETY.md) for more details.
|
||||
* openpilot has software-in-the-loop [tests](.github/workflows/selfdrive_tests.yaml) that run on every commit.
|
||||
* The code enforcing the safety model lives in panda and is written in C, see [code rigor](https://github.com/commaai/panda#code-rigor) for more details.
|
||||
* panda has software-in-the-loop [safety tests](https://github.com/commaai/panda/tree/master/tests/safety).
|
||||
* Internally, we have a hardware-in-the-loop Jenkins test suite that builds and unit tests the various processes.
|
||||
* panda has additional hardware-in-the-loop [tests](https://github.com/commaai/panda/blob/master/Jenkinsfile).
|
||||
* We run the latest openpilot in a testing closet containing 10 comma devices continuously replaying routes.
|
||||
|
||||
---
|
||||
|
||||
### Quality of Life Enhancements
|
||||
- [**Modified Assistive Driving Safety (MADS)**](#modified-assistive-driving-safety-mads) - Automatic Lane Centering (ALC) / Lane Keep Assist System (LKAS) and Adaptive Cruise Control (ACC) / Smart Cruise Control (SCC) can be engaged independently of each other
|
||||
- [**Dynamic Lane Profile (DLP)**](#dynamic-lane-profile-dlp) - Dynamically switch lane profile (between Laneful and Laneless) based on lane recognition confidence
|
||||
- [**Enhanced Speed Control**](#enhanced-speed-control) - Automatically adjust cruise control speed using vision model, OpenStreetMap (OSM) data, and/or Speed Limit control (SLC) without user interaction
|
||||
* Vision-based Turn Speed Control (V-TSC) - lower speed when going around corners using vision model
|
||||
* Map-Data-based Turn Speed Control (M-TSC) - lower speed when going around corners using OSM data[^1]
|
||||
* 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.
|
||||
|
||||
### Visual Enhancements
|
||||
* **M.A.D.S Status Icon** - Dedicated icon to display M.A.D.S. engagement status
|
||||
* Green🟢: M.A.D.S. engaged
|
||||
* White⚪: M.A.D.S. suspended or disengaged
|
||||
* **Lane Path Color** - Various lane path colors to display real-time Lane Model and M.A.D.S. engagement status
|
||||
* 0.8.14 and later:
|
||||
* Blue🔵: Laneful mode & M.A.D.S. engaged
|
||||
* Green🟢: Laneless mode & M.A.D.S. engaged
|
||||
* Yellow🟡: Experimental e2e & M.A.D.S. engaged
|
||||
* Pre 0.8.14:
|
||||
* Green🟢: Laneful mode & M.A.D.S. engaged
|
||||
* Red🔴: Laneless mode & M.A.D.S. engaged
|
||||
* White⚪: M.A.D.S. suspended or disengaged
|
||||
* Black⚫: M.A.D.S. engaged, steering is being manually overridden by user
|
||||
* **Developer (Dev) UI** - Display various real-time metrics on screen while driving
|
||||
* **Stand Still Timer** - Display time spent at a stop with M.A.D.S engaged (i.e., at traffic lights, stop signs, traffic congestions)
|
||||
* **Braking Status** - Current car speed text turns red when the car is braking by the driver or ACC/SCC
|
||||
|
||||
### Operational Enhancements
|
||||
* **Fast Boot** - sunnypilot will fast boot by creating a Prebuilt file
|
||||
* **Disable Onroad Uploads** - Disable uploads completely when onroad. Necessary to avoid high data usage when connected to Wi-Fi hotspot
|
||||
* **Brightness Control (Global)** - Manually adjusts the global brightness of the screen
|
||||
* **Driving Screen Off Timer** - Turns off the device screen or reduces brightness to protect the screen after car starts
|
||||
* **Driving Screen Off Brightness (%)** - When using the Driving Screen Off feature, the brightness is reduced according to the automatic brightness ratio
|
||||
* **Max Time Offroad** - Device is automatically turned off after a set time when the engine is turned off (off-road) after driving (on-road)
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>🚗 Driving Enhancements</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
### Modified Assistive Driving Safety (MADS)
|
||||
The goal of Modified Assistive Driving Safety (MADS) is to enhance the user driving experience with modified behaviors of driving assist engagements. This feature complies with comma.ai's safety rules as accurately as possible with the following changes:
|
||||
* sunnypilot Automatic Lane Centering (ALC) and ACC/SCC can be engaged independently of each other
|
||||
* Dedicated button to toggle sunnypilot ALC:
|
||||
* `CRUISE (MAIN)` button: All supported cars on sunnypilot
|
||||
* `LFA` button: Newer HKG cars with `LFA` button
|
||||
* `LKAS` button: Honda, Toyota, Global Subaru
|
||||
* `SET-` button enables ACC/SCC
|
||||
* `CANCEL` button only disables ACC/SCC
|
||||
* `CRUISE (MAIN)` must be `ON` to use ACC/SCC
|
||||
* `CRUISE (MAIN)` button disables ACC/SCC completely when `OFF` **(strictly enforced in panda safety code)**
|
||||
|
||||
### Disengage Lateral ALC on Brake Press Mode toggle
|
||||
Dedicated toggle to handle Lateral state on brake pedal press and release:
|
||||
1. `ON`: `BRAKE pedal` press will pause Automatic Lane Centering; `BRAKE pedal` release will resume Automatic Lane Centering. Note: `BRAKE pedal` release will NOT resume ACC/SCC/Long control without explicit user engagement **(strictly enforced in panda safety code)**
|
||||
2. `OFF`: `BRAKE pedal` press will NOT pause Automatic Lane Centering; `BRAKE pedal` release will NOT resume ACC/SCC/Long control without explicit user engagement **(strictly enforced in panda safety code)**
|
||||
|
||||
### Miscellaneous
|
||||
* `TURN SIGNALS` (`Left` or `Right`) will pause Automatic Lane Centering if the vehicle speed is below the [threshold](https://github.com/commaai/openpilot/blob/master/selfdrive/controls/lib/desire_helper.py#L8) for Automatic Lane Change
|
||||
* Event audible alerts are more relaxed to match manufacturer's stock behavior
|
||||
* Critical events trigger disengagement of Automatic Lane Centering completely. The disengagement is enforced in sunnypilot and panda safety
|
||||
|
||||
### Dynamic Lane Profile (DLP)
|
||||
|
||||
Dynamic Lane Profile (DLP) aims to provide the best driving experience at staying within a lane confidently. Dynamic Lane Profile allows sunnypilot to dynamically switch between lane profiles based on lane recognition confidence level on road.
|
||||
|
||||
There are 3 modes to select on the onroad camera screen:
|
||||
* **Auto Lane**: sunnypilot dynamically chooses between `Laneline` or `Laneless` model
|
||||
* **Laneline**: sunnypilot uses Laneline model only.
|
||||
* **Laneless**: sunnypilot uses Laneless model only.
|
||||
|
||||
To use Dynamic Lane Profile, do the following:
|
||||
```
|
||||
1. sunnypilot Settings -> `SP - Controls` -> Enable Dynamic Lane Profile -> ON toggle
|
||||
2. Reboot.
|
||||
3. Before driving, on the onroad camera screen, toggle between the 3 modes by pressing on the button.
|
||||
4. Drive.
|
||||
```
|
||||
|
||||
### Enhanced Speed Control
|
||||
This fork now allows supported cars to dynamically adjust the longitudinal plan based on the fetched map data. Big thanks to the Move Fast team for the amazing implementation!
|
||||
|
||||
**Supported cars:**
|
||||
* sunnypilot Longitudinal Control capable
|
||||
* Stock Longitudinal Control
|
||||
* Hyundai/Kia/Genesis (non CAN-FD)
|
||||
* Honda Bosch
|
||||
* Volkswagen MQB
|
||||
|
||||
Certain features are only available with an active data connection, via:
|
||||
* [comma Prime](https://comma.ai/prime) - Intuitive service provided directly by comma, or
|
||||
* Personal Hotspot - From your mobile device, or a dedicated hotspot from a cellular carrier.
|
||||
|
||||
**Features:**
|
||||
* Vision-based Turn Speed Control (VTSC) - Use vision path predictions to estimate the appropriate speed to drive through turns ahead - i.e. slowing down for curves
|
||||
* Map-Data-based Turn Speed Control (MTSC) - Use curvature information from map data to define speed limits to take turns ahead - i.e. slowing down for curves[^1]
|
||||
* Speed Limit Control (SLC) - Use speed limit signs information from map data and car interface to automatically adapt cruise speed to road limits
|
||||
* HKG only: Highway Driving Assist (HDA) status integration - on applicable HKG cars only[^1]
|
||||
* Speed Limit Offset - When Speed Limit Control is enabled, set speed limit slightly higher than the actual speed limit for a more natural drive[^1]
|
||||
* Toggle Hands on Wheel Monitoring - Monitors and alerts the driver when their hands have not been on the steering wheel for an extended time
|
||||
|
||||
### Custom Stock Longitudinal Control
|
||||
While using stock Adaptive/Smart Cruise Control, Custom Stock Longitudinal Control in sunnypilot allows sunnypilot to manipulate and take over the set speed on the car's dashboard.
|
||||
|
||||
**Supported Cars:**
|
||||
* Hyundai/Kia/Genesis
|
||||
* CAN platform
|
||||
* CAN-FD platform with 0x1CF broadcasted in CAN traffic
|
||||
* Honda Bosch
|
||||
* Volkswagen MQB
|
||||
|
||||
**Instruction**
|
||||
|
||||
**📗 How to use Custom Longitudinal Control on sunnypilot **
|
||||
|
||||
When using Speed Limit, Vision, or Map based Turn control, you will be setting the "MAX" ACC speed on the sunnypilot display instead of the one in the dashboard. The car will then set the ACC setting in the dashboard to the targeted speed, but will never exceed the max speed set on the sunnypilot display. A quick press of the RES+ or SET- buttons will change this speed by 5 MPH or KM/H on the sunnypilot display, while a long deliberate press (about a 1/2 second press) changes it by 1 MPH or KM/H. DO NOT hold the RES+ or SET- buttons for longer that a 1 second. Either make quick or long deliberate presses only.
|
||||
|
||||
**‼ Where to look when setting ACC speed ‼**
|
||||
|
||||
Do not look at the dashboard when setting your ACC max speed. Instead, only look at the one on the sunnypilot display, "MAX". The reason you need to look at the sunnypilot display is because sunnypilot will be changing the one in the dashboard. It will be adjusting it as needed, never raising it above the one set on the sunnypilot display. ONLY look at the MAX speed on the sunnypilot display when setting the ACC speed instead of the dashboard!
|
||||
|
||||
(Courtesy instructions from John, author of jvePilot)
|
||||
|
||||
### Gap Adjust Cruise
|
||||
This fork now allows supported openpilot longitudinal cars to adjust the cruise gap between the car and the lead car.
|
||||
|
||||
**Supported cars:**
|
||||
* sunnypilot Longitudinal Control capable
|
||||
|
||||
🚨**PROCEED WITH EXTREME CAUTION AND BE READY TO MANUALLY TAKE OVER AT ALL TIMES**
|
||||
|
||||
There are 4 modes to select on the steering wheel and/or the onroad camera screen:
|
||||
* **Stock Gap**: Stock sunnypilot distance - 1.45 second profile
|
||||
* **Mild Gap**: Semi-aggressive distance - 1.25 second profile
|
||||
* 🚨**Aggro Gap**🚨: Aggressive distance - 1.0 second profile
|
||||
|
||||
**Availability**
|
||||
|
||||
| Car Make | Stock Gap | Mild Gap | Aggro Gap |
|
||||
|:-------------------:|:---------:|:--------:|:---------:|
|
||||
| Honda/Acura | ✅ | ✅ | ✅ |
|
||||
| Hyundai/Kia/Genesis | ✅ | ✅ | ✅ |
|
||||
| Toyota/Lexus | ✅ | ✅ | ✅ |
|
||||
| Volkswagen MQB/PQ | ✅ | ✅ | ✅ |
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details><summary><h3>⚒ Branch Definitions</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
| Tag | Definition | Description |
|
||||
|:---------:|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `release` | Release branches | Include features that are **verified** by trusted testers and the community. Ready to use. ✅ |
|
||||
| `staging` | Staging branches | Include new features that are **tested** by trusted testers and the community. Stability may vary. ⚠ |
|
||||
| `dev` | Development branches | All features are gathered in respective versions. Reviewed and merged features will be committed to `dev`. Stability may vary. ⚠ |
|
||||
| `master` | Main branch | Syncs with [commaai's openpilot `master`](https://github.com/commaai/openpilot) upstream branch. Accepts all pull requests. Does not include all sunnypilot features. Stability may vary. ⚠ |
|
||||
|
||||
Example:
|
||||
* [`release-c3`](https://github.com/sunnyhaibin/sunnypilot/tree/release-c3): Latest release branch for comma three that are verified by trusted testers and the community. Ready to use.
|
||||
* [`staging-c3`](https://github.com/sunnyhaibin/sunnypilot/tree/staging-c3): Latest staging branch for comma three that are tested by trusted testers and the community. Verification required.
|
||||
* [`dev-c3`](https://github.com/sunnyhaibin/sunnypilot/tree/dev-c3): Latest development branch for comma three that include all sunnypilot features. Testing required.
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>✅ Recommended Branches</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
| Branch | Definition | Compatible Device | Changelogs |
|
||||
|:------------------------------------------------------------------------------------|---------------------------------------------------------|-------------------|--------------------------------------------------------------------------------------------|
|
||||
| [`release-c3`](https://github.com/sunnyhaibin/sunnypilot/tree/release-c3) | • Latest release/stable branch | comma three | [`CHANGELOGS.md`](https://github.com/sunnyhaibin/sunnypilot/blob/release-c3/CHANGELOGS.md) |
|
||||
| [`staging-c3`](https://github.com/sunnyhaibin/sunnypilot/tree/staging-c3) | • Latest staging branch | comma three | [`CHANGELOGS.md`](https://github.com/sunnyhaibin/sunnypilot/blob/staging-c3/CHANGELOGS.md) |
|
||||
| [`dev-c3`](https://github.com/sunnyhaibin/sunnypilot/tree/dev-c3) | • Latest development branch with experimental features | comma three | [`CHANGELOGS.md`](https://github.com/sunnyhaibin/sunnypilot/blob/dev-c3/CHANGELOGS.md) |
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>📗 How To's</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
How-To instructions can be found in [HOW-TOS.md](https://github.com/sunnyhaibin/openpilot/blob/(!)README/HOW-TOS.md).
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details><summary><h3>🎆 Pull Requests</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
We welcome both pull requests and issues on GitHub. Bug fixes are encouraged.
|
||||
|
||||
Pull requests should be against the most current `master` branch.
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>🏆 Special Thanks</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
* [spektor56](https://github.com/spektor56/openpilot)
|
||||
* [rav4kumar](https://github.com/rav4kumar/openpilot)
|
||||
* [mob9221](https://github.com/mob9221/opendbc)
|
||||
* [briantran33](https://github.com/briantran33/openpilot)
|
||||
* [Aragon7777](https://github.com/aragon7777/openpilot)
|
||||
* [sshane](https://github.com/sshane/openpilot-installer-generator)
|
||||
* [jung](https://github.com/chanhojung/openpilot)
|
||||
* [dri94](https://github.com/dri94/openpilot)
|
||||
* [FrogAi](https://github.com/frogAi/FrogPilot/)
|
||||
* [twilsonco](https://github.com/twilsonco/openpilot)
|
||||
* [martinl](https://github.com/martinl/openpilot)
|
||||
* [multikyd](https://github.com/openpilotkr)
|
||||
* [Move Fast GmbH](https://github.com/move-fast/openpilot)
|
||||
* [dragonpilot](https://github.com/dragonpilot-community/dragonpilot)
|
||||
* [neokii](https://github.com/neokii/openpilot)
|
||||
* [AlexandreSato](https://github.com/AlexandreSato/openpilot)
|
||||
* [Moodkiller](https://github.com/moodkiller)
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>📊 User Data</h3></summary>
|
||||
|
||||
---
|
||||
|
||||
By default, sunnypilot uploads the driving data to comma servers. You can also access your data through [comma connect](https://connect.comma.ai/).
|
||||
|
||||
sunnypilot is open source software. The user is free to disable data collection if they wish to do so.
|
||||
|
||||
sunnypilot logs the road-facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
|
||||
The driver-facing camera is only logged if you explicitly opt-in in settings. The microphone is not recorded.
|
||||
|
||||
By using this software, you understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><h3>Licensing</h3></summary>
|
||||
Licensing
|
||||
------
|
||||
|
||||
openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
|
||||
|
||||
Any user of this software shall indemnify and hold harmless comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys’ fees and costs) which arise out of, relate to or result from any use of this software by user.
|
||||
Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys’ fees and costs) which arise out of, relate to or result from any use of this software by user.
|
||||
|
||||
**THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT.
|
||||
YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS.
|
||||
NO WARRANTY EXPRESSED OR IMPLIED.**
|
||||
|
||||
</details>
|
||||
User Data and comma Account
|
||||
------
|
||||
|
||||
<h3>💰 Support sunnypilot</h3>
|
||||
By default, openpilot uploads the driving data to our servers. You can also access your data through [comma connect](https://connect.comma.ai/). We use your data to train better models and improve openpilot for everyone.
|
||||
|
||||
---
|
||||
openpilot is open source software: the user is free to disable data collection if they wish to do so.
|
||||
|
||||
If you find any of the features useful, consider becoming a [patron on Patreon](https://www.patreon.com/sunnyhaibin) or a [sponsor on GitHub](https://github.com/sponsors/sunnyhaibin) to support future feature development and improvements.
|
||||
openpilot logs the road-facing cameras, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
|
||||
The driver-facing camera is only logged if you explicitly opt-in in settings. The microphone is not recorded.
|
||||
|
||||
|
||||
By becoming a patron/sponsor, you will gain access to exclusive content, early access to new features, and the opportunity to directly influence the project's development.
|
||||
|
||||
<h3>Patreon</h3>
|
||||
|
||||
<a href="https://www.patreon.com/sunnyhaibin">
|
||||
<img src="https://user-images.githubusercontent.com/47793918/244128051-bc7e913e-a196-4455-926e-23aec9a4bd3b.png" alt="Become a Patron" width="300" style="max-width: 100%; height: auto;">
|
||||
</a>
|
||||
<br>
|
||||
|
||||
<h3>GitHub Sponsor</h3>
|
||||
|
||||
<a href="https://github.com/sponsors/sunnyhaibin">
|
||||
<img src="https://user-images.githubusercontent.com/47793918/244135584-9800acbd-69fd-4b2b-bec9-e5fa2d85c817.png" alt="Become a Sponsor" width="300" style="max-width: 100%; height: auto;">
|
||||
</a>
|
||||
<br>
|
||||
|
||||
<h3>PayPal</h3>
|
||||
|
||||
<a href="https://paypal.me/sunnyhaibin0850" target="_blank">
|
||||
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="PayPal this" title="PayPal - The safer, easier way to pay online!" border="0" />
|
||||
</a>
|
||||
<br></br>
|
||||
|
||||
Your continuous love and support are greatly appreciated! Enjoy 🥰
|
||||
|
||||
<span>-</span> Jason, Founder of sunnypilot
|
||||
|
||||
[^1]:Requires data connection if not using Offline Maps data
|
||||
[^2]:At least 50 GB of storage space is required. If you have the 32 GB version of comma three, upgrading with a compatible 250 GB or 1 TB SSD is strongly recommended
|
||||
[^4]:Shortened URL for convenience. Full URL is ```smiskol.com/fork/sunnyhaibin/release-c3```
|
||||
By using openpilot, you agree to [our Privacy Policy](https://comma.ai/privacy). You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.
|
||||
|
||||
48
SConstruct
48
SConstruct
@@ -14,8 +14,6 @@ SCons.Warnings.warningAsException(True)
|
||||
|
||||
TICI = os.path.isfile('/TICI')
|
||||
AGNOS = TICI
|
||||
UBUNTU_FOCAL = int(subprocess.check_output('[ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "20.04" ] && echo 1 || echo 0', shell=True, encoding='utf-8').rstrip())
|
||||
Export('UBUNTU_FOCAL')
|
||||
|
||||
Decider('MD5-timestamp')
|
||||
|
||||
@@ -72,12 +70,6 @@ AddOption('--minimal',
|
||||
default=os.path.exists(File('#.lfsconfig').abspath), # minimal by default on release branch (where there's no LFS)
|
||||
help='the minimum build to run openpilot. no tests, tools, etc.')
|
||||
|
||||
AddOption('--stock-ui',
|
||||
action='store_true',
|
||||
dest='stock_ui',
|
||||
default=False,
|
||||
help='Build stock UI instead of sunnypilot UI')
|
||||
|
||||
## Architecture name breakdown (arch)
|
||||
## - larch64: linux tici aarch64
|
||||
## - aarch64: linux pc aarch64
|
||||
@@ -176,13 +168,6 @@ else:
|
||||
if arch != "Darwin":
|
||||
ldflags += ["-Wl,--as-needed", "-Wl,--no-undefined"]
|
||||
|
||||
# Enable swaglog include in submodules
|
||||
cxxflags += ['-DSWAGLOG="\\"common/swaglog.h\\""']
|
||||
|
||||
if not GetOption('stock_ui'):
|
||||
cflags += ["-DSUNNYPILOT"]
|
||||
cxxflags += ["-DSUNNYPILOT"]
|
||||
|
||||
ccflags_option = GetOption('ccflags')
|
||||
if ccflags_option:
|
||||
ccflags += ccflags_option.split(' ')
|
||||
@@ -197,12 +182,9 @@ env = Environment(
|
||||
"-Werror",
|
||||
"-Wshadow",
|
||||
"-Wno-unknown-warning-option",
|
||||
"-Wno-deprecated-register",
|
||||
"-Wno-register",
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Wno-c99-designator",
|
||||
"-Wno-reorder-init-list",
|
||||
"-Wno-error=unused-but-set-variable",
|
||||
"-Wno-vla-cxx-extension",
|
||||
] + cflags + ccflags,
|
||||
|
||||
@@ -217,11 +199,7 @@ env = Environment(
|
||||
"#third_party/linux/include",
|
||||
"#third_party/snpe/include",
|
||||
"#third_party",
|
||||
"#cereal",
|
||||
"#msgq",
|
||||
"#opendbc/can",
|
||||
"#third_party/maplibre-native-qt/include",
|
||||
f"#third_party/maplibre-native-qt/{arch}/include"
|
||||
],
|
||||
|
||||
CC='clang',
|
||||
@@ -255,8 +233,7 @@ if GetOption('compile_db'):
|
||||
env.CompilationDatabase('compile_commands.json')
|
||||
|
||||
# Setup cache dir
|
||||
default_cache_dir = '/data/scons_cache' if AGNOS else '/tmp/scons_cache'
|
||||
cache_dir = ARGUMENTS.get('cache_dir', default_cache_dir)
|
||||
cache_dir = '/data/scons_cache' if AGNOS else '/tmp/scons_cache'
|
||||
CacheDir(cache_dir)
|
||||
Clean(["."], cache_dir)
|
||||
|
||||
@@ -288,7 +265,7 @@ Export('envCython', 'np_version')
|
||||
|
||||
# Qt build environment
|
||||
qt_env = env.Clone()
|
||||
qt_modules = ["Widgets", "Gui", "Core", "Network", "Concurrent", "Multimedia", "Quick", "Qml", "QuickWidgets", "Location", "Positioning", "DBus", "Xml"]
|
||||
qt_modules = ["Widgets", "Gui", "Core", "Network", "Concurrent", "DBus", "Xml"]
|
||||
|
||||
qt_libs = []
|
||||
if arch == "Darwin":
|
||||
@@ -334,15 +311,11 @@ qt_flags = [
|
||||
"-DQT_NO_DEBUG",
|
||||
"-DQT_WIDGETS_LIB",
|
||||
"-DQT_GUI_LIB",
|
||||
"-DQT_QUICK_LIB",
|
||||
"-DQT_QUICKWIDGETS_LIB",
|
||||
"-DQT_QML_LIB",
|
||||
"-DQT_CORE_LIB",
|
||||
"-DQT_MESSAGELOGCONTEXT",
|
||||
]
|
||||
qt_env['CXXFLAGS'] += qt_flags
|
||||
qt_env['LIBPATH'] += ['#selfdrive/ui', f"#third_party/maplibre-native-qt/{arch}/lib"]
|
||||
qt_env['RPATH'] += [Dir(f"#third_party/maplibre-native-qt/{arch}/lib").srcnode().abspath]
|
||||
qt_env['LIBPATH'] += ['#selfdrive/ui', ]
|
||||
qt_env['LIBS'] = qt_libs
|
||||
|
||||
if GetOption("clazy"):
|
||||
@@ -362,24 +335,27 @@ Export('env', 'qt_env', 'arch', 'real_arch')
|
||||
SConscript(['common/SConscript'])
|
||||
Import('_common', '_gpucommon')
|
||||
|
||||
common = [_common, 'json11']
|
||||
common = [_common, 'json11', 'zmq']
|
||||
gpucommon = [_gpucommon]
|
||||
|
||||
Export('common', 'gpucommon')
|
||||
|
||||
# Build messaging (cereal + msgq + socketmaster + their dependencies)
|
||||
SConscript(['msgq_repo/SConscript'])
|
||||
# Enable swaglog include in submodules
|
||||
env_swaglog = env.Clone()
|
||||
env_swaglog['CXXFLAGS'].append('-DSWAGLOG="\\"common/swaglog.h\\""')
|
||||
SConscript(['msgq_repo/SConscript'], exports={'env': env_swaglog})
|
||||
SConscript(['opendbc/can/SConscript'], exports={'env': env_swaglog})
|
||||
|
||||
SConscript(['cereal/SConscript'])
|
||||
|
||||
Import('socketmaster', 'msgq')
|
||||
messaging = [socketmaster, msgq, 'zmq', 'capnp', 'kj',]
|
||||
Export('messaging')
|
||||
|
||||
|
||||
# Build other submodules
|
||||
SConscript([
|
||||
'opendbc/can/SConscript',
|
||||
'panda/SConscript',
|
||||
])
|
||||
SConscript(['panda/SConscript'])
|
||||
|
||||
# Build rednose library
|
||||
SConscript(['rednose/SConscript'])
|
||||
|
||||
@@ -1,31 +1,20 @@
|
||||
Import('env', 'envCython', 'arch', 'common', 'msgq')
|
||||
|
||||
import shutil
|
||||
Import('env', 'common', 'msgq')
|
||||
|
||||
cereal_dir = Dir('.')
|
||||
gen_dir = Dir('gen')
|
||||
other_dir = Dir('#msgq')
|
||||
|
||||
# Build cereal
|
||||
schema_files = ['log.capnp', 'car.capnp', 'legacy.capnp', 'custom.capnp']
|
||||
env.Command(["gen/c/include/c++.capnp.h"], [], "mkdir -p " + gen_dir.path + "/c/include && touch $TARGETS")
|
||||
env.Command([f'gen/cpp/{s}.c++' for s in schema_files] + [f'gen/cpp/{s}.h' for s in schema_files],
|
||||
schema_files,
|
||||
f"capnpc --src-prefix={cereal_dir.path} $SOURCES -o c++:{gen_dir.path}/cpp/")
|
||||
|
||||
# TODO: remove non shared cereal and messaging
|
||||
cereal_objects = env.SharedObject([f'gen/cpp/{s}.c++' for s in schema_files])
|
||||
|
||||
cereal = env.Library('cereal', cereal_objects)
|
||||
env.SharedLibrary('cereal_shared', cereal_objects)
|
||||
cereal = env.Library('cereal', [f'gen/cpp/{s}.c++' for s in schema_files])
|
||||
|
||||
# Build messaging
|
||||
|
||||
services_h = env.Command(['services.h'], ['services.py'], 'python3 ' + cereal_dir.path + '/services.py > $TARGET')
|
||||
env.Program('messaging/bridge', ['messaging/bridge.cc'], LIBS=[msgq, 'zmq', common])
|
||||
env.Program('messaging/bridge', ['messaging/bridge.cc', 'messaging/msgq_to_zmq.cc'], LIBS=[msgq, common, 'pthread'])
|
||||
|
||||
|
||||
socketmaster = env.SharedObject(['messaging/socketmaster.cc'])
|
||||
socketmaster = env.Library('socketmaster', socketmaster)
|
||||
socketmaster = env.Library('socketmaster', ['messaging/socketmaster.cc'])
|
||||
|
||||
Export('cereal', 'socketmaster')
|
||||
|
||||
@@ -117,27 +117,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
paramsdPermanentError @119;
|
||||
actuatorsApiUnavailable @120;
|
||||
espActive @121;
|
||||
manualSteeringRequired @122;
|
||||
manualLongitudinalRequired @123;
|
||||
silentPedalPressed @124;
|
||||
silentButtonEnable @125;
|
||||
silentBrakeHold @126;
|
||||
silentWrongGear @127;
|
||||
spReverseGear @128;
|
||||
preKeepHandsOnWheel @129;
|
||||
promptKeepHandsOnWheel @130;
|
||||
keepHandsOnWheel @131;
|
||||
speedLimitActive @132;
|
||||
speedLimitValueChange @133;
|
||||
e2eLongStop @134;
|
||||
e2eLongStart @135;
|
||||
controlsMismatchLong @136;
|
||||
cruiseEngageBlocked @137;
|
||||
laneChangeRoadEdge @138;
|
||||
speedLimitPreActive @139;
|
||||
speedLimitConfirmed @140;
|
||||
torqueNNLoad @141;
|
||||
hyundaiRadarTracksAvailable @142;
|
||||
personalityChanged @122;
|
||||
|
||||
radarCanErrorDEPRECATED @15;
|
||||
communityFeatureDisallowedDEPRECATED @62;
|
||||
@@ -217,6 +197,7 @@ struct CarState {
|
||||
accFaulted @42 :Bool;
|
||||
carFaultedNonCritical @47 :Bool; # some ECU is faulted, but car remains controllable
|
||||
espActive @51 :Bool;
|
||||
vehicleSensorsInvalid @52 :Bool; # invalid steering angle readings, etc.
|
||||
|
||||
# cruise state
|
||||
cruiseState @10 :CruiseState;
|
||||
@@ -237,27 +218,6 @@ struct CarState {
|
||||
# clutch (manual transmission only)
|
||||
clutchPressed @28 :Bool;
|
||||
|
||||
madsEnabled @52 :Bool;
|
||||
leftBlinkerOn @53 :Bool;
|
||||
rightBlinkerOn @54 :Bool;
|
||||
disengageByBrake @55 :Bool;
|
||||
belowLaneChangeSpeed @56 :Bool;
|
||||
accEnabled @57 :Bool;
|
||||
latActive @58 :Bool;
|
||||
gapAdjustCruiseTr @59 :Int32;
|
||||
endToEndLong @60 :Bool;
|
||||
customStockLong @61 :CustomStockLong;
|
||||
|
||||
struct CustomStockLong {
|
||||
cruiseButton @0 :Int16;
|
||||
finalSpeedKph @1 :Float32;
|
||||
vCruiseKphPrevDEPRECATED @2 :Float32;
|
||||
targetSpeed @3 :Float32;
|
||||
vSetDis @4 :Float32;
|
||||
speedDiff @5 :Float32;
|
||||
buttonType @6 :Int16;
|
||||
}
|
||||
|
||||
# blindspot sensors
|
||||
leftBlindspot @33 :Bool; # Is there something blocking the left lane change
|
||||
rightBlindspot @34 :Bool; # Is there something blocking the right lane change
|
||||
@@ -284,7 +244,6 @@ struct CarState {
|
||||
speedOffset @3 :Float32;
|
||||
standstill @4 :Bool;
|
||||
nonAdaptive @5 :Bool;
|
||||
speedLimit @7 :Float32;
|
||||
}
|
||||
|
||||
enum GearShifter {
|
||||
@@ -370,7 +329,6 @@ struct CarControl {
|
||||
enabled @0 :Bool;
|
||||
latActive @11: Bool;
|
||||
longActive @12: Bool;
|
||||
vCruise @17 :Float32; # actual set speed
|
||||
|
||||
# Actuator commands as computed by controlsd
|
||||
actuators @6 :Actuators;
|
||||
@@ -458,9 +416,6 @@ struct CarControl {
|
||||
prompt @6;
|
||||
promptRepeat @7;
|
||||
promptDistracted @8;
|
||||
promptStarting @9;
|
||||
promptSingleLow @10;
|
||||
promptSingleHigh @11;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,9 +448,6 @@ struct CarParams {
|
||||
enableBsm @56 :Bool; # blind spot monitoring
|
||||
flags @64 :UInt32; # flags for car specific quirks
|
||||
experimentalLongitudinalAvailable @71 :Bool;
|
||||
pcmCruiseSpeed @74 :Bool; # is openpilot's state tied to the PCM's cruise speed?
|
||||
customStockLongAvailable @75 :Bool;
|
||||
spFlags @76 :UInt32; # flags for car specific quirks in sunnypilot
|
||||
|
||||
minEnableSpeed @7 :Float32;
|
||||
minSteerSpeed @8 :Float32;
|
||||
@@ -585,8 +537,6 @@ struct CarParams {
|
||||
steeringAngleDeadzoneDeg @5 :Float32;
|
||||
latAccelFactor @6 :Float32;
|
||||
latAccelOffset @7 :Float32;
|
||||
nnModelName @8 :Text;
|
||||
nnModelFuzzyMatch @9 :Bool;
|
||||
}
|
||||
|
||||
struct LongitudinalPIDTuning {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Cxx = import "./include/c++.capnp";
|
||||
$Cxx.namespace("cereal");
|
||||
|
||||
using Car = import "car.capnp";
|
||||
|
||||
@0xb526ba661d550a59;
|
||||
|
||||
# custom.capnp: a home for empty structs reserved for custom forks
|
||||
@@ -10,206 +8,25 @@ using Car = import "car.capnp";
|
||||
# cereal, so use these if you want custom events in your fork.
|
||||
|
||||
# you can rename the struct, but don't change the identifier
|
||||
|
||||
enum LongitudinalPersonalitySP {
|
||||
aggressive @0;
|
||||
moderate @1;
|
||||
standard @2;
|
||||
relaxed @3;
|
||||
overtake @4;
|
||||
struct CustomReserved0 @0x81c2f05a394cf4af {
|
||||
}
|
||||
|
||||
enum AccelerationPersonality {
|
||||
sport @0;
|
||||
normal @1;
|
||||
eco @2;
|
||||
stock @3;
|
||||
struct CustomReserved1 @0xaedffd8f31e7b55d {
|
||||
}
|
||||
|
||||
enum ModelGeneration {
|
||||
default @0;
|
||||
one @1;
|
||||
two @2;
|
||||
three @3;
|
||||
four @4;
|
||||
five @5;
|
||||
struct CustomReserved2 @0xf35cc4560bbf6ec2 {
|
||||
}
|
||||
|
||||
enum MpcSource {
|
||||
acc @0;
|
||||
blended @1;
|
||||
struct CustomReserved3 @0xda96579883444c35 {
|
||||
}
|
||||
|
||||
struct ControlsStateSP @0x81c2f05a394cf4af {
|
||||
lateralState @0 :Text;
|
||||
personality @8 :LongitudinalPersonalitySP;
|
||||
dynamicPersonality @9 :Bool;
|
||||
accelPersonality @10 :AccelerationPersonality;
|
||||
overtakingAccelerationAssist @11 :Bool;
|
||||
|
||||
lateralControlState :union {
|
||||
indiState @1 :LateralINDIState;
|
||||
pidState @2 :LateralPIDState;
|
||||
angleState @3 :LateralAngleState;
|
||||
debugState @4 :LateralDebugState;
|
||||
torqueState @5 :LateralTorqueState;
|
||||
curvatureState @6 :LateralCurvatureState;
|
||||
|
||||
lqrStateDEPRECATED @7 :LateralLQRState;
|
||||
}
|
||||
|
||||
struct LateralINDIState {
|
||||
}
|
||||
|
||||
struct LateralPIDState {
|
||||
}
|
||||
|
||||
struct LateralAngleState {
|
||||
}
|
||||
|
||||
struct LateralDebugState {
|
||||
}
|
||||
|
||||
struct LateralTorqueState {
|
||||
nnLog @0 :List(Float32);
|
||||
}
|
||||
|
||||
struct LateralCurvatureState {
|
||||
}
|
||||
|
||||
struct LateralLQRState {
|
||||
}
|
||||
struct CustomReserved4 @0x80ae746ee2596b11 {
|
||||
}
|
||||
|
||||
struct LongitudinalPlanSP @0xaedffd8f31e7b55d {
|
||||
visionTurnControllerState @0 :VisionTurnControllerState;
|
||||
visionTurnSpeed @1 :Float32;
|
||||
visionCurrentLatAcc @16 :Float32;
|
||||
visionMaxPredLatAcc @17 :Float32;
|
||||
|
||||
speedLimitControlState @2 :SpeedLimitControlState;
|
||||
speedLimit @3 :Float32;
|
||||
speedLimitOffset @4 :Float32;
|
||||
distToSpeedLimit @5 :Float32;
|
||||
isMapSpeedLimit @6 :Bool;
|
||||
speedLimitPercOffset @11 :Bool;
|
||||
speedLimitValueOffset @12 :Float32;
|
||||
desiredTF @13 :Float32;
|
||||
notSpeedLimit @14 :Int16;
|
||||
e2eX @15 :List(Float32);
|
||||
e2eBlendedDEPRECATED @18 :Text;
|
||||
e2eStatus @22 :Bool;
|
||||
mpcSource @23 :MpcSource;
|
||||
dynamicExperimentalControl @24 :Bool;
|
||||
|
||||
distToTurn @7 :Float32;
|
||||
turnSpeed @8 :Float32;
|
||||
turnSpeedControlState @9 :SpeedLimitControlState;
|
||||
turnSign @10 :Int16;
|
||||
|
||||
events @19 :List(Car.CarEvent);
|
||||
longitudinalPlanSource @20 :LongitudinalPlanSource;
|
||||
|
||||
personalityDEPRECATED @21 :LongitudinalPersonalitySP;
|
||||
|
||||
enum SpeedLimitControlState {
|
||||
inactive @0; # No speed limit set or not enabled by parameter.
|
||||
tempInactive @1; # User wants to ignore speed limit until it changes.
|
||||
adapting @2; # Reducing speed to match new speed limit.
|
||||
active @3; # Cruising at speed limit.
|
||||
preActive @4;
|
||||
}
|
||||
|
||||
enum VisionTurnControllerState {
|
||||
disabled @0; # No predicted substantial turn on vision range or feature disabled.
|
||||
entering @1; # A substantial turn is predicted ahead, adapting speed to turn comfort levels.
|
||||
turning @2; # Actively turning. Managing acceleration to provide a roll on turn feeling.
|
||||
leaving @3; # Road ahead straightens. Start to allow positive acceleration.
|
||||
}
|
||||
|
||||
enum LongitudinalPlanSource {
|
||||
cruise @0;
|
||||
lead0 @1;
|
||||
lead1 @2;
|
||||
lead2 @3;
|
||||
e2e @4;
|
||||
turn @5;
|
||||
limit @6;
|
||||
turnlimit @7;
|
||||
}
|
||||
struct CustomReserved5 @0xa5cd762cd951a455 {
|
||||
}
|
||||
|
||||
struct LateralPlanSP @0xf35cc4560bbf6ec2 {
|
||||
laneWidth @0 :Float32;
|
||||
lProb @1 :Float32;
|
||||
rProb @2 :Float32;
|
||||
|
||||
dProb @3 :Float32;
|
||||
|
||||
dynamicLaneProfile @4 :Int8;
|
||||
standstillElapsed @5 :Float32;
|
||||
dynamicLaneProfileStatus @9 :Bool;
|
||||
|
||||
dPathWLinesXDEPRECATED @6 :List(Float32);
|
||||
dPathWLinesYDEPRECATED @7 :List(Float32);
|
||||
laneChangePrevDEPRECATED @8 :Bool;
|
||||
laneChangeEdgeBlockDEPRECATED @10 :Bool;
|
||||
}
|
||||
|
||||
struct DriverMonitoringStateSP @0xda96579883444c35 {
|
||||
handsOnWheelState @0 :HandsOnWheelState;
|
||||
notModified @1 :Float32;
|
||||
|
||||
enum HandsOnWheelState {
|
||||
none @0; # hand on wheel monitoring inactive
|
||||
ok @1; # driver has hands on steering wheel
|
||||
minor @2; # hands off steering wheel for acceptable period
|
||||
warning @3; # hands off steering wheel for warning period
|
||||
critical @4; # # hands off steering wheel for critical period
|
||||
terminal @5; # # hands off steering wheel for terminal period
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveMapDataSP @0x80ae746ee2596b11 {
|
||||
speedLimitValid @0 :Bool;
|
||||
speedLimit @1 :Float32;
|
||||
speedLimitAheadValid @2 :Bool;
|
||||
speedLimitAhead @3 :Float32;
|
||||
speedLimitAheadDistance @4 :Float32;
|
||||
turnSpeedLimitValid @5 :Bool;
|
||||
turnSpeedLimit @6 :Float32;
|
||||
turnSpeedLimitEndDistance @7 :Float32;
|
||||
turnSpeedLimitSign @8 :Int16;
|
||||
turnSpeedLimitsAhead @9 :List(Float32);
|
||||
turnSpeedLimitsAheadDistances @10 :List(Float32);
|
||||
turnSpeedLimitsAheadSigns @11 :List(Int16);
|
||||
lastGpsTimestamp @12 :Int64; # Milliseconds since January 1, 1970.
|
||||
currentRoadName @13 :Text;
|
||||
lastGpsLatitude @14 :Float64;
|
||||
lastGpsLongitude @15 :Float64;
|
||||
lastGpsSpeed @16 :Float32;
|
||||
lastGpsBearingDeg @17 :Float32;
|
||||
lastGpsAccuracy @18 :Float32;
|
||||
lastGpsBearingAccuracyDeg @19 :Float32;
|
||||
dataType @20 :DataType;
|
||||
|
||||
enum DataType {
|
||||
default @0;
|
||||
offline @1;
|
||||
online @2;
|
||||
}
|
||||
}
|
||||
|
||||
struct E2eLongStateSP @0xa5cd762cd951a455 {
|
||||
status @0 :UInt16;
|
||||
}
|
||||
|
||||
struct ModelDataV2SP @0xf98d843bfd7004a3 {
|
||||
laneChangePrev @0 :Bool;
|
||||
laneChangeEdgeBlock @1 :Bool;
|
||||
customModel @2 :Bool;
|
||||
modelGeneration @3 :ModelGeneration;
|
||||
modelCapabilities @4 :UInt32;
|
||||
struct CustomReserved6 @0xf98d843bfd7004a3 {
|
||||
}
|
||||
|
||||
struct CustomReserved7 @0xb86e6369214c01c8 {
|
||||
|
||||
116
cereal/log.capnp
116
cereal/log.capnp
@@ -684,18 +684,53 @@ struct LiveTracks {
|
||||
oncoming @9 :Bool;
|
||||
}
|
||||
|
||||
struct SelfdriveState {
|
||||
# high level system state
|
||||
state @0 :OpenpilotState;
|
||||
enabled @1 :Bool;
|
||||
active @2 :Bool;
|
||||
engageable @9 :Bool; # can OP be engaged?
|
||||
|
||||
# UI alerts
|
||||
alertText1 @3 :Text;
|
||||
alertText2 @4 :Text;
|
||||
alertStatus @5 :AlertStatus;
|
||||
alertSize @6 :AlertSize;
|
||||
alertType @7 :Text;
|
||||
alertSound @8 :Car.CarControl.HUDControl.AudibleAlert;
|
||||
|
||||
# configurable driving settings
|
||||
experimentalMode @10 :Bool;
|
||||
personality @11 :LongitudinalPersonality;
|
||||
|
||||
enum OpenpilotState @0xdbe58b96d2d1ac61 {
|
||||
disabled @0;
|
||||
preEnabled @1;
|
||||
enabled @2;
|
||||
softDisabling @3;
|
||||
overriding @4; # superset of overriding with steering or accelerator
|
||||
}
|
||||
|
||||
enum AlertStatus @0xa0d0dcd113193c62 {
|
||||
normal @0;
|
||||
userPrompt @1;
|
||||
critical @2;
|
||||
}
|
||||
|
||||
enum AlertSize @0xe98bb99d6e985f64 {
|
||||
none @0;
|
||||
small @1;
|
||||
mid @2;
|
||||
full @3;
|
||||
}
|
||||
}
|
||||
|
||||
struct ControlsState @0x97ff69c53601abf1 {
|
||||
cumLagMs @15 :Float32;
|
||||
startMonoTime @48 :UInt64;
|
||||
longitudinalPlanMonoTime @28 :UInt64;
|
||||
lateralPlanMonoTime @50 :UInt64;
|
||||
|
||||
state @31 :OpenpilotState;
|
||||
enabled @19 :Bool;
|
||||
active @36 :Bool;
|
||||
|
||||
experimentalMode @64 :Bool;
|
||||
personality @66 :LongitudinalPersonality;
|
||||
|
||||
longControlState @30 :Car.CarControl.Actuators.LongControlState;
|
||||
vTargetLead @3 :Float32;
|
||||
vCruise @22 :Float32; # actual set speed
|
||||
@@ -706,19 +741,21 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
aTarget @35 :Float32;
|
||||
curvature @37 :Float32; # path curvature from vehicle model
|
||||
desiredCurvature @61 :Float32; # lag adjusted curvatures used by lateral controllers
|
||||
forceDecel @51 :Bool;
|
||||
|
||||
# UI alerts
|
||||
# TODO: remove these, they're now in selfdriveState
|
||||
alertText1 @24 :Text;
|
||||
alertText2 @25 :Text;
|
||||
alertStatus @38 :AlertStatus;
|
||||
alertSize @39 :AlertSize;
|
||||
alertBlinkingRate @42 :Float32;
|
||||
alertStatus @38 :SelfdriveState.AlertStatus;
|
||||
alertSize @39 :SelfdriveState.AlertSize;
|
||||
alertType @44 :Text;
|
||||
alertSound @56 :Car.CarControl.HUDControl.AudibleAlert;
|
||||
engageable @41 :Bool; # can OP be engaged?
|
||||
|
||||
cumLagMs @15 :Float32;
|
||||
forceDecel @51 :Bool;
|
||||
state @31 :SelfdriveState.OpenpilotState;
|
||||
enabled @19 :Bool;
|
||||
active @36 :Bool;
|
||||
experimentalMode @64 :Bool;
|
||||
personality @66 :LongitudinalPersonality;
|
||||
|
||||
lateralControlState :union {
|
||||
indiState @52 :LateralINDIState;
|
||||
@@ -731,27 +768,6 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
lqrStateDEPRECATED @55 :LateralLQRState;
|
||||
}
|
||||
|
||||
enum OpenpilotState @0xdbe58b96d2d1ac61 {
|
||||
disabled @0;
|
||||
preEnabled @1;
|
||||
enabled @2;
|
||||
softDisabling @3;
|
||||
overriding @4; # superset of overriding with steering or accelerator
|
||||
}
|
||||
|
||||
enum AlertStatus {
|
||||
normal @0; # low priority alert for user's convenience
|
||||
userPrompt @1; # mid priority alert that might require user intervention
|
||||
critical @2; # high priority alert that needs immediate user intervention
|
||||
}
|
||||
|
||||
enum AlertSize {
|
||||
none @0; # don't display the alert
|
||||
small @1; # small box
|
||||
mid @2; # mid screen
|
||||
full @3; # full screen
|
||||
}
|
||||
|
||||
struct LateralINDIState {
|
||||
active @0 :Bool;
|
||||
steeringAngleDeg @1 :Float32;
|
||||
@@ -865,6 +881,7 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||
desiredCurvatureRateDEPRECATED @62 :Float32;
|
||||
canErrorCounterDEPRECATED @57 :UInt32;
|
||||
vPidDEPRECATED @2 :Float32;
|
||||
alertBlinkingRateDEPRECATED @42 :Float32;
|
||||
}
|
||||
|
||||
struct DrivingModelData {
|
||||
@@ -1010,6 +1027,8 @@ struct ModelDataV2 {
|
||||
brake3MetersPerSecondSquaredProbs @4 :List(Float32);
|
||||
brake4MetersPerSecondSquaredProbs @5 :List(Float32);
|
||||
brake5MetersPerSecondSquaredProbs @6 :List(Float32);
|
||||
gasPressProbs @7 :List(Float32);
|
||||
brakePressProbs @8 :List(Float32);
|
||||
}
|
||||
|
||||
struct Pose {
|
||||
@@ -2082,9 +2101,15 @@ struct LiveParametersData {
|
||||
stiffnessFactorStd @12 :Float32;
|
||||
steerRatioStd @13 :Float32;
|
||||
roll @14 :Float32;
|
||||
filterState @15 :LiveLocationKalman.Measurement;
|
||||
debugFilterState @16 :FilterState;
|
||||
|
||||
yawRateDEPRECATED @7 :Float32;
|
||||
filterStateDEPRECATED @15 :LiveLocationKalman.Measurement;
|
||||
|
||||
struct FilterState {
|
||||
value @0 : List(Float64);
|
||||
std @1 : List(Float64);
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveTorqueParametersData {
|
||||
@@ -2292,6 +2317,7 @@ struct Event {
|
||||
gpsNMEA @3 :GPSNMEAData;
|
||||
can @5 :List(CanData);
|
||||
controlsState @7 :ControlsState;
|
||||
selfdriveState @130 :SelfdriveState;
|
||||
gyroscope @99 :SensorEventData;
|
||||
gyroscope2 @100 :SensorEventData;
|
||||
accelerometer @98 :SensorEventData;
|
||||
@@ -2323,7 +2349,6 @@ struct Event {
|
||||
onroadEvents @68: List(Car.CarEvent);
|
||||
carParams @69: Car.CarParams;
|
||||
driverMonitoringState @71: DriverMonitoringState;
|
||||
liveLocationKalman @72 :LiveLocationKalman;
|
||||
livePose @129 :LivePose;
|
||||
modelV2 @75 :ModelDataV2;
|
||||
drivingModelData @128 :DrivingModelData;
|
||||
@@ -2381,13 +2406,13 @@ struct Event {
|
||||
customReservedRawData2 @126 :Data;
|
||||
|
||||
# *********** Custom: reserved for forks ***********
|
||||
controlsStateSP @107 :Custom.ControlsStateSP;
|
||||
longitudinalPlanSP @108 :Custom.LongitudinalPlanSP;
|
||||
lateralPlanSPDEPRECATED @109 :Custom.LateralPlanSP;
|
||||
driverMonitoringStateSP @110 :Custom.DriverMonitoringStateSP;
|
||||
liveMapDataSP @111 :Custom.LiveMapDataSP;
|
||||
e2eLongStateSP @112 :Custom.E2eLongStateSP;
|
||||
modelV2SP @113 :Custom.ModelDataV2SP;
|
||||
customReserved0 @107 :Custom.CustomReserved0;
|
||||
customReserved1 @108 :Custom.CustomReserved1;
|
||||
customReserved2 @109 :Custom.CustomReserved2;
|
||||
customReserved3 @110 :Custom.CustomReserved3;
|
||||
customReserved4 @111 :Custom.CustomReserved4;
|
||||
customReserved5 @112 :Custom.CustomReserved5;
|
||||
customReserved6 @113 :Custom.CustomReserved6;
|
||||
customReserved7 @114 :Custom.CustomReserved7;
|
||||
customReserved8 @115 :Custom.CustomReserved8;
|
||||
customReserved9 @116 :Custom.CustomReserved9;
|
||||
@@ -2396,7 +2421,7 @@ struct Event {
|
||||
model @9 :Legacy.ModelData; # TODO: rename modelV2 and mark this as deprecated
|
||||
liveMpcDEPRECATED @36 :LiveMpcData;
|
||||
liveLongitudinalMpcDEPRECATED @37 :LiveLongitudinalMpcData;
|
||||
liveLocationKalmanDEPRECATED @51 :Legacy.LiveLocationData;
|
||||
liveLocationKalmanLegacyDEPRECATED @51 :Legacy.LiveLocationData;
|
||||
orbslamCorrectionDEPRECATED @45 :Legacy.OrbslamCorrection;
|
||||
liveUIDEPRECATED @14 :Legacy.LiveUI;
|
||||
sensorEventDEPRECATED @4 :SensorEventData;
|
||||
@@ -2433,5 +2458,6 @@ struct Event {
|
||||
lateralPlanDEPRECATED @64 :LateralPlan;
|
||||
navModelDEPRECATED @104 :NavModelData;
|
||||
uiPlanDEPRECATED @106 :UiPlan;
|
||||
liveLocationKalmanDEPRECATED @72 :LiveLocationKalman;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,26 +92,63 @@ def recv_one_retry(sock: SubSocket) -> capnp.lib.capnp._DynamicStructReader:
|
||||
return log_from_bytes(dat)
|
||||
|
||||
|
||||
class FrequencyTracker:
|
||||
def __init__(self, service_freq: float, update_freq: float, is_poll: bool):
|
||||
freq = max(min(service_freq, update_freq), 1.)
|
||||
if is_poll:
|
||||
min_freq = max_freq = freq
|
||||
else:
|
||||
max_freq = min(freq, update_freq)
|
||||
if service_freq >= 2 * update_freq:
|
||||
min_freq = update_freq
|
||||
elif update_freq >= 2* service_freq:
|
||||
min_freq = freq
|
||||
else:
|
||||
min_freq = min(freq, freq / 2.)
|
||||
|
||||
self.min_freq = min_freq * 0.8
|
||||
self.max_freq = max_freq * 1.2
|
||||
self.recv_dts: Deque[float] = deque(maxlen=int(10 * freq))
|
||||
self.prev_time = 0.0
|
||||
|
||||
def record_recv_time(self, cur_time: float) -> None:
|
||||
# TODO: Handle case where cur_time is less than prev_time
|
||||
if self.prev_time > 1e-5:
|
||||
self.recv_dts.append(cur_time - self.prev_time)
|
||||
self.prev_time = cur_time
|
||||
|
||||
@property
|
||||
def valid(self) -> bool:
|
||||
if not self.recv_dts:
|
||||
return False
|
||||
|
||||
avg_freq = len(self.recv_dts) / sum(self.recv_dts)
|
||||
if self.min_freq <= avg_freq <= self.max_freq:
|
||||
return True
|
||||
|
||||
recent_dts = list(self.recv_dts)[-int(self.recv_dts.maxlen / 10):]
|
||||
avg_freq_recent = len(recent_dts) / sum(recent_dts)
|
||||
return self.min_freq <= avg_freq_recent <= self.max_freq
|
||||
|
||||
|
||||
class SubMaster:
|
||||
def __init__(self, services: List[str], poll: Optional[str] = None,
|
||||
ignore_alive: Optional[List[str]] = None, ignore_avg_freq: Optional[List[str]] = None,
|
||||
ignore_valid: Optional[List[str]] = None, addr: str = "127.0.0.1", frequency: Optional[float] = None):
|
||||
self.frame = -1
|
||||
self.services = services
|
||||
self.seen = {s: False for s in services}
|
||||
self.updated = {s: False for s in services}
|
||||
self.recv_time = {s: 0. for s in services}
|
||||
self.recv_frame = {s: 0 for s in services}
|
||||
self.alive = {s: False for s in services}
|
||||
self.freq_ok = {s: False for s in services}
|
||||
self.recv_dts: Dict[str, Deque[float]] = {}
|
||||
self.sock = {}
|
||||
self.data = {}
|
||||
self.valid = {}
|
||||
self.logMonoTime = {}
|
||||
|
||||
self.max_freq = {}
|
||||
self.min_freq = {}
|
||||
|
||||
self.freq_tracker: Dict[str, FrequencyTracker] = {}
|
||||
self.poller = Poller()
|
||||
polled_services = set([poll, ] if poll is not None else services)
|
||||
self.non_polled_services = set(services) - polled_services
|
||||
@@ -138,22 +175,7 @@ class SubMaster:
|
||||
self.data[s] = getattr(data.as_reader(), s)
|
||||
self.logMonoTime[s] = 0
|
||||
self.valid[s] = True # FIXME: this should default to False
|
||||
|
||||
freq = max(min([SERVICE_LIST[s].frequency, self.update_freq]), 1.)
|
||||
if s == poll:
|
||||
max_freq = freq
|
||||
min_freq = freq
|
||||
else:
|
||||
max_freq = min(freq, self.update_freq)
|
||||
if SERVICE_LIST[s].frequency >= 2*self.update_freq:
|
||||
min_freq = self.update_freq
|
||||
elif self.update_freq >= 2*SERVICE_LIST[s].frequency:
|
||||
min_freq = freq
|
||||
else:
|
||||
min_freq = min(freq, freq / 2.)
|
||||
self.max_freq[s] = max_freq*1.2
|
||||
self.min_freq[s] = min_freq*0.8
|
||||
self.recv_dts[s] = deque(maxlen=int(10*freq))
|
||||
self.freq_tracker[s] = FrequencyTracker(SERVICE_LIST[s].frequency, self.update_freq, s == poll)
|
||||
|
||||
def __getitem__(self, s: str) -> capnp.lib.capnp._DynamicStructReader:
|
||||
return self.data[s]
|
||||
@@ -173,7 +195,7 @@ class SubMaster:
|
||||
|
||||
def update_msgs(self, cur_time: float, msgs: List[capnp.lib.capnp._DynamicStructReader]) -> None:
|
||||
self.frame += 1
|
||||
self.updated = dict.fromkeys(self.updated, False)
|
||||
self.updated = dict.fromkeys(self.services, False)
|
||||
for msg in msgs:
|
||||
if msg is None:
|
||||
continue
|
||||
@@ -182,54 +204,30 @@ class SubMaster:
|
||||
self.seen[s] = True
|
||||
self.updated[s] = True
|
||||
|
||||
if self.recv_time[s] > 1e-5:
|
||||
self.recv_dts[s].append(cur_time - self.recv_time[s])
|
||||
self.freq_tracker[s].record_recv_time(cur_time)
|
||||
self.recv_time[s] = cur_time
|
||||
self.recv_frame[s] = self.frame
|
||||
self.data[s] = getattr(msg, s)
|
||||
self.logMonoTime[s] = msg.logMonoTime
|
||||
self.valid[s] = msg.valid
|
||||
|
||||
for s in self.data:
|
||||
for s in self.services:
|
||||
if SERVICE_LIST[s].frequency > 1e-5 and not self.simulation:
|
||||
# alive if delay is within 10x the expected frequency
|
||||
self.alive[s] = (cur_time - self.recv_time[s]) < (10. / SERVICE_LIST[s].frequency)
|
||||
|
||||
# check average frequency; slow to fall, quick to recover
|
||||
dts = self.recv_dts[s]
|
||||
assert dts.maxlen is not None
|
||||
recent_dts = list(dts)[-int(dts.maxlen / 10):]
|
||||
try:
|
||||
avg_freq = 1 / (sum(dts) / len(dts))
|
||||
avg_freq_recent = 1 / (sum(recent_dts) / len(recent_dts))
|
||||
except ZeroDivisionError:
|
||||
avg_freq = 0
|
||||
avg_freq_recent = 0
|
||||
|
||||
avg_freq_ok = self.min_freq[s] <= avg_freq <= self.max_freq[s]
|
||||
recent_freq_ok = self.min_freq[s] <= avg_freq_recent <= self.max_freq[s]
|
||||
self.freq_ok[s] = avg_freq_ok or recent_freq_ok
|
||||
self.freq_ok[s] = self.freq_tracker[s].valid
|
||||
else:
|
||||
self.freq_ok[s] = True
|
||||
if self.simulation:
|
||||
self.alive[s] = self.seen[s] # alive is defined as seen when simulation flag set
|
||||
else:
|
||||
self.alive[s] = True
|
||||
self.alive[s] = self.seen[s] if self.simulation else True
|
||||
|
||||
def all_alive(self, service_list: Optional[List[str]] = None) -> bool:
|
||||
if service_list is None:
|
||||
service_list = list(self.sock.keys())
|
||||
return all(self.alive[s] for s in service_list if s not in self.ignore_alive)
|
||||
return all(self.alive[s] for s in (service_list or self.services) if s not in self.ignore_alive)
|
||||
|
||||
def all_freq_ok(self, service_list: Optional[List[str]] = None) -> bool:
|
||||
if service_list is None:
|
||||
service_list = list(self.sock.keys())
|
||||
return all(self.freq_ok[s] for s in service_list if self._check_avg_freq(s))
|
||||
return all(self.freq_ok[s] for s in (service_list or self.services) if self._check_avg_freq(s))
|
||||
|
||||
def all_valid(self, service_list: Optional[List[str]] = None) -> bool:
|
||||
if service_list is None:
|
||||
service_list = list(self.sock.keys())
|
||||
return all(self.valid[s] for s in service_list if s not in self.ignore_valid)
|
||||
return all(self.valid[s] for s in (service_list or self.services) if s not in self.ignore_valid)
|
||||
|
||||
def all_checks(self, service_list: Optional[List[str]] = None) -> bool:
|
||||
return self.all_alive(service_list) and self.all_freq_ok(service_list) and self.all_valid(service_list)
|
||||
|
||||
@@ -1,25 +1,10 @@
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <csignal>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
typedef void (*sighandler_t)(int sig);
|
||||
|
||||
#include "cereal/messaging/msgq_to_zmq.h"
|
||||
#include "cereal/services.h"
|
||||
#include "msgq/impl_msgq.h"
|
||||
#include "msgq/impl_zmq.h"
|
||||
#include "common/util.h"
|
||||
|
||||
std::atomic<bool> do_exit = false;
|
||||
static void set_do_exit(int sig) {
|
||||
do_exit = true;
|
||||
}
|
||||
|
||||
void sigpipe_handler(int sig) {
|
||||
assert(sig == SIGPIPE);
|
||||
std::cout << "SIGPIPE received" << std::endl;
|
||||
}
|
||||
ExitHandler do_exit;
|
||||
|
||||
static std::vector<std::string> get_services(std::string whitelist_str, bool zmq_to_msgq) {
|
||||
std::vector<std::string> service_list;
|
||||
@@ -34,41 +19,22 @@ static std::vector<std::string> get_services(std::string whitelist_str, bool zmq
|
||||
return service_list;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
signal(SIGPIPE, (sighandler_t)sigpipe_handler);
|
||||
signal(SIGINT, (sighandler_t)set_do_exit);
|
||||
signal(SIGTERM, (sighandler_t)set_do_exit);
|
||||
void msgq_to_zmq(const std::vector<std::string> &endpoints, const std::string &ip) {
|
||||
MsgqToZmq bridge;
|
||||
bridge.run(endpoints, ip);
|
||||
}
|
||||
|
||||
bool zmq_to_msgq = argc > 2;
|
||||
std::string ip = zmq_to_msgq ? argv[1] : "127.0.0.1";
|
||||
std::string whitelist_str = zmq_to_msgq ? std::string(argv[2]) : "";
|
||||
void zmq_to_msgq(const std::vector<std::string> &endpoints, const std::string &ip) {
|
||||
auto poller = std::make_unique<ZMQPoller>();
|
||||
auto pub_context = std::make_unique<MSGQContext>();
|
||||
auto sub_context = std::make_unique<ZMQContext>();
|
||||
std::map<SubSocket *, PubSocket *> sub2pub;
|
||||
|
||||
Poller *poller;
|
||||
Context *pub_context;
|
||||
Context *sub_context;
|
||||
if (zmq_to_msgq) { // republishes zmq debugging messages as msgq
|
||||
poller = new ZMQPoller();
|
||||
pub_context = new MSGQContext();
|
||||
sub_context = new ZMQContext();
|
||||
} else {
|
||||
poller = new MSGQPoller();
|
||||
pub_context = new ZMQContext();
|
||||
sub_context = new MSGQContext();
|
||||
}
|
||||
|
||||
std::map<SubSocket*, PubSocket*> sub2pub;
|
||||
for (auto endpoint : get_services(whitelist_str, zmq_to_msgq)) {
|
||||
PubSocket * pub_sock;
|
||||
SubSocket * sub_sock;
|
||||
if (zmq_to_msgq) {
|
||||
pub_sock = new MSGQPubSocket();
|
||||
sub_sock = new ZMQSubSocket();
|
||||
} else {
|
||||
pub_sock = new ZMQPubSocket();
|
||||
sub_sock = new MSGQSubSocket();
|
||||
}
|
||||
pub_sock->connect(pub_context, endpoint);
|
||||
sub_sock->connect(sub_context, endpoint, ip, false);
|
||||
for (auto endpoint : endpoints) {
|
||||
auto pub_sock = new MSGQPubSocket();
|
||||
auto sub_sock = new ZMQSubSocket();
|
||||
pub_sock->connect(pub_context.get(), endpoint);
|
||||
sub_sock->connect(sub_context.get(), endpoint, ip, false);
|
||||
|
||||
poller->registerSocket(sub_sock);
|
||||
sub2pub[sub_sock] = pub_sock;
|
||||
@@ -76,17 +42,30 @@ int main(int argc, char** argv) {
|
||||
|
||||
while (!do_exit) {
|
||||
for (auto sub_sock : poller->poll(100)) {
|
||||
Message * msg = sub_sock->receive();
|
||||
if (msg == NULL) continue;
|
||||
int ret;
|
||||
do {
|
||||
ret = sub2pub[sub_sock]->sendMessage(msg);
|
||||
} while (ret == -1 && errno == EINTR && !do_exit);
|
||||
assert(ret >= 0 || do_exit);
|
||||
delete msg;
|
||||
|
||||
if (do_exit) break;
|
||||
std::unique_ptr<Message> msg(sub_sock->receive(true));
|
||||
if (msg) {
|
||||
sub2pub[sub_sock]->sendMessage(msg.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up allocated sockets
|
||||
for (auto &[sub_sock, pub_sock] : sub2pub) {
|
||||
delete sub_sock;
|
||||
delete pub_sock;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
bool is_zmq_to_msgq = argc > 2;
|
||||
std::string ip = is_zmq_to_msgq ? argv[1] : "127.0.0.1";
|
||||
std::string whitelist_str = is_zmq_to_msgq ? std::string(argv[2]) : "";
|
||||
std::vector<std::string> endpoints = get_services(whitelist_str, is_zmq_to_msgq);
|
||||
|
||||
if (is_zmq_to_msgq) {
|
||||
zmq_to_msgq(endpoints, ip);
|
||||
} else {
|
||||
msgq_to_zmq(endpoints, ip);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
143
cereal/messaging/msgq_to_zmq.cc
Normal file
143
cereal/messaging/msgq_to_zmq.cc
Normal file
@@ -0,0 +1,143 @@
|
||||
#include "cereal/messaging/msgq_to_zmq.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "common/util.h"
|
||||
|
||||
extern ExitHandler do_exit;
|
||||
|
||||
// Max messages to process per socket per poll
|
||||
constexpr int MAX_MESSAGES_PER_SOCKET = 50;
|
||||
|
||||
static std::string recv_zmq_msg(void *sock) {
|
||||
zmq_msg_t msg;
|
||||
zmq_msg_init(&msg);
|
||||
std::string ret;
|
||||
if (zmq_msg_recv(&msg, sock, 0) > 0) {
|
||||
ret.assign((char *)zmq_msg_data(&msg), zmq_msg_size(&msg));
|
||||
}
|
||||
zmq_msg_close(&msg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void MsgqToZmq::run(const std::vector<std::string> &endpoints, const std::string &ip) {
|
||||
zmq_context = std::make_unique<ZMQContext>();
|
||||
msgq_context = std::make_unique<MSGQContext>();
|
||||
|
||||
// Create ZMQPubSockets for each endpoint
|
||||
for (const auto &endpoint : endpoints) {
|
||||
auto &socket_pair = socket_pairs.emplace_back();
|
||||
socket_pair.endpoint = endpoint;
|
||||
socket_pair.pub_sock = std::make_unique<ZMQPubSocket>();
|
||||
int ret = socket_pair.pub_sock->connect(zmq_context.get(), endpoint);
|
||||
if (ret != 0) {
|
||||
printf("Failed to create ZMQ publisher for [%s]: %s\n", endpoint.c_str(), zmq_strerror(zmq_errno()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Start ZMQ monitoring thread to monitor socket events
|
||||
std::thread thread(&MsgqToZmq::zmqMonitorThread, this);
|
||||
|
||||
// Main loop for processing messages
|
||||
while (!do_exit) {
|
||||
{
|
||||
std::unique_lock lk(mutex);
|
||||
cv.wait(lk, [this]() { return do_exit || !sub2pub.empty(); });
|
||||
if (do_exit) break;
|
||||
|
||||
for (auto sub_sock : msgq_poller->poll(100)) {
|
||||
// Process messages for each socket
|
||||
for (int i = 0; i < MAX_MESSAGES_PER_SOCKET; ++i) {
|
||||
auto msg = std::unique_ptr<Message>(sub_sock->receive(true));
|
||||
if (!msg) break;
|
||||
|
||||
while (sub2pub[sub_sock]->sendMessage(msg.get()) == -1) {
|
||||
if (errno != EINTR) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
util::sleep_for(1); // Give zmqMonitorThread a chance to acquire the mutex
|
||||
}
|
||||
|
||||
thread.join();
|
||||
}
|
||||
|
||||
void MsgqToZmq::zmqMonitorThread() {
|
||||
std::vector<zmq_pollitem_t> pollitems;
|
||||
|
||||
// Set up ZMQ monitor for each pub socket
|
||||
for (int i = 0; i < socket_pairs.size(); ++i) {
|
||||
std::string addr = "inproc://op-bridge-monitor-" + std::to_string(i);
|
||||
zmq_socket_monitor(socket_pairs[i].pub_sock->sock, addr.c_str(), ZMQ_EVENT_ACCEPTED | ZMQ_EVENT_DISCONNECTED);
|
||||
|
||||
void *monitor_socket = zmq_socket(zmq_context->getRawContext(), ZMQ_PAIR);
|
||||
zmq_connect(monitor_socket, addr.c_str());
|
||||
pollitems.emplace_back(zmq_pollitem_t{.socket = monitor_socket, .events = ZMQ_POLLIN});
|
||||
}
|
||||
|
||||
while (!do_exit) {
|
||||
int ret = zmq_poll(pollitems.data(), pollitems.size(), 1000);
|
||||
if (ret < 0) {
|
||||
if (errno == EINTR) {
|
||||
// Due to frequent EINTR signals from msgq, introduce a brief delay (200 ms)
|
||||
// to reduce CPU usage during retry attempts.
|
||||
util::sleep_for(200);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
for (int i = 0; i < pollitems.size(); ++i) {
|
||||
if (pollitems[i].revents & ZMQ_POLLIN) {
|
||||
// First frame in message contains event number and value
|
||||
std::string frame = recv_zmq_msg(pollitems[i].socket);
|
||||
if (frame.empty()) continue;
|
||||
|
||||
uint16_t event_type = *(uint16_t *)(frame.data());
|
||||
|
||||
// Second frame in message contains event address
|
||||
frame = recv_zmq_msg(pollitems[i].socket);
|
||||
if (frame.empty()) continue;
|
||||
|
||||
std::unique_lock lk(mutex);
|
||||
auto &pair = socket_pairs[i];
|
||||
if (event_type & ZMQ_EVENT_ACCEPTED) {
|
||||
printf("socket [%s] connected\n", pair.endpoint.c_str());
|
||||
if (++pair.connected_clients == 1) {
|
||||
// Create new MSGQ subscriber socket and map to ZMQ publisher
|
||||
pair.sub_sock = std::make_unique<MSGQSubSocket>();
|
||||
pair.sub_sock->connect(msgq_context.get(), pair.endpoint, "127.0.0.1");
|
||||
sub2pub[pair.sub_sock.get()] = pair.pub_sock.get();
|
||||
registerSockets();
|
||||
}
|
||||
} else if (event_type & ZMQ_EVENT_DISCONNECTED) {
|
||||
printf("socket [%s] disconnected\n", pair.endpoint.c_str());
|
||||
if (pair.connected_clients == 0 || --pair.connected_clients == 0) {
|
||||
// Remove MSGQ subscriber socket from mapping and reset it
|
||||
sub2pub.erase(pair.sub_sock.get());
|
||||
pair.sub_sock.reset(nullptr);
|
||||
registerSockets();
|
||||
}
|
||||
}
|
||||
cv.notify_one();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up monitor sockets
|
||||
for (int i = 0; i < pollitems.size(); ++i) {
|
||||
zmq_socket_monitor(socket_pairs[i].pub_sock->sock, nullptr, 0);
|
||||
zmq_close(pollitems[i].socket);
|
||||
}
|
||||
cv.notify_one();
|
||||
}
|
||||
|
||||
void MsgqToZmq::registerSockets() {
|
||||
msgq_poller = std::make_unique<MSGQPoller>();
|
||||
for (const auto &socket_pair : socket_pairs) {
|
||||
if (socket_pair.sub_sock) {
|
||||
msgq_poller->registerSocket(socket_pair.sub_sock.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
37
cereal/messaging/msgq_to_zmq.h
Normal file
37
cereal/messaging/msgq_to_zmq.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <condition_variable>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#define private public
|
||||
#include "msgq/impl_msgq.h"
|
||||
#include "msgq/impl_zmq.h"
|
||||
|
||||
class MsgqToZmq {
|
||||
public:
|
||||
MsgqToZmq() {}
|
||||
void run(const std::vector<std::string> &endpoints, const std::string &ip);
|
||||
|
||||
protected:
|
||||
void registerSockets();
|
||||
void zmqMonitorThread();
|
||||
|
||||
struct SocketPair {
|
||||
std::string endpoint;
|
||||
std::unique_ptr<ZMQPubSocket> pub_sock;
|
||||
std::unique_ptr<MSGQSubSocket> sub_sock;
|
||||
int connected_clients = 0;
|
||||
};
|
||||
|
||||
std::unique_ptr<MSGQContext> msgq_context;
|
||||
std::unique_ptr<ZMQContext> zmq_context;
|
||||
std::mutex mutex;
|
||||
std::condition_variable cv;
|
||||
std::unique_ptr<MSGQPoller> msgq_poller;
|
||||
std::map<SubSocket *, ZMQPubSocket *> sub2pub;
|
||||
std::vector<SocketPair> socket_pairs;
|
||||
};
|
||||
@@ -89,8 +89,8 @@ class TestSubMaster:
|
||||
for service, (max_freq, min_freq) in checks.items():
|
||||
if max_freq is not None:
|
||||
assert sm._check_avg_freq(service)
|
||||
assert sm.max_freq[service] == max_freq*1.2
|
||||
assert sm.min_freq[service] == min_freq*0.8
|
||||
assert sm.freq_tracker[service].max_freq == max_freq*1.2
|
||||
assert sm.freq_tracker[service].min_freq == min_freq*0.8
|
||||
else:
|
||||
assert not sm._check_avg_freq(service)
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ _services: dict[str, tuple] = {
|
||||
"deviceState": (True, 2., 1),
|
||||
"can": (True, 100., 2053), # decimation gives ~3 msgs in a full segment
|
||||
"controlsState": (True, 100., 10),
|
||||
"selfdriveState": (True, 100., 10),
|
||||
"pandaStates": (True, 10., 1),
|
||||
"peripheralState": (True, 2., 1),
|
||||
"radarState": (True, 20., 5),
|
||||
@@ -48,10 +49,8 @@ _services: dict[str, tuple] = {
|
||||
"clocks": (True, 0.1, 1),
|
||||
"ubloxRaw": (True, 20.),
|
||||
"livePose": (True, 20., 4),
|
||||
"liveLocationKalman": (True, 20.),
|
||||
"liveParameters": (True, 20., 5),
|
||||
"cameraOdometry": (True, 20., 10),
|
||||
"lateralPlanDEPRECATED": (True, 20., 5),
|
||||
"thumbnail": (True, 0.2, 1),
|
||||
"onroadEvents": (True, 1., 1),
|
||||
"carParams": (True, 0.02, 1),
|
||||
@@ -69,21 +68,10 @@ _services: dict[str, tuple] = {
|
||||
"navInstruction": (True, 1., 10),
|
||||
"navRoute": (True, 0.),
|
||||
"navThumbnail": (True, 0.),
|
||||
"navModelDEPRECATED": (True, 2., 4.),
|
||||
"mapRenderState": (True, 2., 1.),
|
||||
"uiPlanDEPRECATED": (True, 20., 40.),
|
||||
"qRoadEncodeIdx": (False, 20.),
|
||||
"userFlag": (True, 0., 1),
|
||||
"microphone": (True, 10., 10),
|
||||
|
||||
"controlsStateSP": (True, 100., 10),
|
||||
"longitudinalPlanSP": (True, 20., 5),
|
||||
"lateralPlanSPDEPRECATED": (True, 20., 5),
|
||||
"driverMonitoringStateSP": (True, 20., 10),
|
||||
"liveMapDataSP": (True, 0.),
|
||||
"e2eLongStateSP": (True, 0.),
|
||||
"modelV2SP": (True, 20., 40),
|
||||
|
||||
# debug
|
||||
"uiDebug": (True, 0., 1),
|
||||
"testJoystick": (True, 0.),
|
||||
|
||||
@@ -1,27 +1,46 @@
|
||||
from .comma_connect import CommaConnectApi
|
||||
from .sunnylink import SunnylinkApi
|
||||
import jwt
|
||||
import os
|
||||
import requests
|
||||
from datetime import datetime, timedelta, UTC
|
||||
from openpilot.system.hardware.hw import Paths
|
||||
from openpilot.system.version import get_version
|
||||
|
||||
API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com')
|
||||
|
||||
class Api:
|
||||
def __init__(self, dongle_id, use_sunnylink=False):
|
||||
if use_sunnylink:
|
||||
self.service = SunnylinkApi(dongle_id)
|
||||
else:
|
||||
self.service = CommaConnectApi(dongle_id)
|
||||
|
||||
def request(self, method, endpoint, **params):
|
||||
return self.service.request(method, endpoint, **params)
|
||||
def __init__(self, dongle_id):
|
||||
self.dongle_id = dongle_id
|
||||
with open(Paths.persist_root()+'/comma/id_rsa') as f:
|
||||
self.private_key = f.read()
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
return self.service.get(*args, **kwargs)
|
||||
return self.request('GET', *args, **kwargs)
|
||||
|
||||
def post(self, *args, **kwargs):
|
||||
return self.service.post(*args, **kwargs)
|
||||
return self.request('POST', *args, **kwargs)
|
||||
|
||||
def request(self, method, endpoint, timeout=None, access_token=None, **params):
|
||||
return api_get(endpoint, method=method, timeout=timeout, access_token=access_token, **params)
|
||||
|
||||
def get_token(self, expiry_hours=1):
|
||||
return self.service.get_token(expiry_hours)
|
||||
now = datetime.now(UTC).replace(tzinfo=None)
|
||||
payload = {
|
||||
'identity': self.dongle_id,
|
||||
'nbf': now,
|
||||
'iat': now,
|
||||
'exp': now + timedelta(hours=expiry_hours)
|
||||
}
|
||||
token = jwt.encode(payload, self.private_key, algorithm='RS256')
|
||||
if isinstance(token, bytes):
|
||||
token = token.decode('utf8')
|
||||
return token
|
||||
|
||||
|
||||
def api_get(endpoint, method='GET', timeout=None, access_token=None, use_sunnylink=False, **params):
|
||||
return CommaConnectApi(None).api_get(endpoint, method, timeout, access_token, **params) if not use_sunnylink else \
|
||||
SunnylinkApi(None).api_get(endpoint, method, timeout, access_token, **params)
|
||||
def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
|
||||
headers = {}
|
||||
if access_token is not None:
|
||||
headers['Authorization'] = "JWT " + access_token
|
||||
|
||||
headers['User-Agent'] = "openpilot-" + get_version()
|
||||
|
||||
return requests.request(method, API_HOST + "/" + endpoint, timeout=timeout, headers=headers, params=params)
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
import jwt
|
||||
import requests
|
||||
import unicodedata
|
||||
from datetime import datetime, timedelta, UTC
|
||||
from openpilot.system.hardware.hw import Paths
|
||||
from openpilot.system.version import get_version
|
||||
|
||||
|
||||
class BaseApi:
|
||||
def __init__(self, dongle_id, api_host, user_agent="openpilot-"):
|
||||
self.dongle_id = dongle_id
|
||||
self.api_host = api_host
|
||||
self.user_agent = user_agent
|
||||
with open(Paths.persist_root()+'/comma/id_rsa') as f:
|
||||
self.private_key = f.read()
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
return self.request('GET', *args, **kwargs)
|
||||
|
||||
def post(self, *args, **kwargs):
|
||||
return self.request('POST', *args, **kwargs)
|
||||
|
||||
def request(self, method, endpoint, timeout=None, access_token=None, **params):
|
||||
return self.api_get(endpoint, method=method, timeout=timeout, access_token=access_token, **params)
|
||||
|
||||
def _get_token(self, expiry_hours=1, **extra_payload):
|
||||
now = datetime.now(UTC).replace(tzinfo=None)
|
||||
payload = {
|
||||
'identity': self.dongle_id,
|
||||
'nbf': now,
|
||||
'iat': now,
|
||||
'exp': now + timedelta(hours=expiry_hours),
|
||||
**extra_payload
|
||||
}
|
||||
token = jwt.encode(payload, self.private_key, algorithm='RS256')
|
||||
if isinstance(token, bytes):
|
||||
token = token.decode('utf8')
|
||||
return token
|
||||
|
||||
def get_token(self, expiry_hours=1):
|
||||
return self._get_token(expiry_hours)
|
||||
|
||||
def remove_non_ascii_chars(self, text):
|
||||
normalized_text = unicodedata.normalize('NFD', text)
|
||||
ascii_encoded_text = normalized_text.encode('ascii', 'ignore')
|
||||
return ascii_encoded_text.decode()
|
||||
|
||||
def api_get(self, endpoint, method='GET', timeout=None, access_token=None, **params):
|
||||
headers = {}
|
||||
if access_token is not None:
|
||||
headers['Authorization'] = "JWT " + access_token
|
||||
|
||||
version = self.remove_non_ascii_chars(get_version())
|
||||
headers['User-Agent'] = self.user_agent + version
|
||||
|
||||
return requests.request(method, self.api_host + "/" + endpoint, timeout=timeout, headers=headers, params=params)
|
||||
@@ -1,11 +0,0 @@
|
||||
import os
|
||||
|
||||
from openpilot.common.api.base import BaseApi
|
||||
|
||||
API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com')
|
||||
|
||||
|
||||
class CommaConnectApi(BaseApi):
|
||||
def __init__(self, dongle_id):
|
||||
super().__init__(dongle_id, API_HOST)
|
||||
self.user_agent = "openpilot-"
|
||||
@@ -1,155 +0,0 @@
|
||||
import os
|
||||
import time
|
||||
import jwt
|
||||
import json
|
||||
from pathlib import Path
|
||||
from datetime import datetime, timedelta
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.system.hardware import HARDWARE
|
||||
from openpilot.system.hardware.hw import Paths
|
||||
|
||||
from openpilot.common.api.base import BaseApi
|
||||
|
||||
API_HOST = os.getenv('SUNNYLINK_API_HOST', 'https://stg.api.sunnypilot.ai')
|
||||
UNREGISTERED_SUNNYLINK_DONGLE_ID = "UnregisteredDevice"
|
||||
MAX_RETRIES = 6
|
||||
CRASH_LOG_DIR = '/data/community/crashes'
|
||||
|
||||
class SunnylinkApi(BaseApi):
|
||||
def __init__(self, dongle_id):
|
||||
super().__init__(dongle_id, API_HOST)
|
||||
self.user_agent = "sunnypilot-"
|
||||
self.spinner = None
|
||||
self.params = Params()
|
||||
|
||||
def api_get(self, endpoint, method='GET', timeout=10, access_token=None, **kwargs):
|
||||
if not self.params.get_bool("SunnylinkEnabled"):
|
||||
return None
|
||||
|
||||
return super().api_get(endpoint, method, timeout, access_token, **kwargs)
|
||||
|
||||
def resume_queued(self, timeout=10, **kwargs):
|
||||
sunnylinkId, commaId = self._resolve_dongle_ids()
|
||||
return self.api_get(f"ws/{sunnylinkId}/resume_queued", "POST", timeout, access_token=self.get_token(), **kwargs)
|
||||
|
||||
def get_token(self, expiry_hours=1):
|
||||
# Add your additional data here
|
||||
additional_data = {}
|
||||
return super()._get_token(expiry_hours, **additional_data)
|
||||
|
||||
def _status_update(self, message):
|
||||
print(message)
|
||||
if self.spinner:
|
||||
self.spinner.update(message)
|
||||
time.sleep(0.5)
|
||||
|
||||
def _resolve_dongle_ids(self):
|
||||
sunnylink_dongle_id = self.params.get("SunnylinkDongleId", encoding='utf-8')
|
||||
comma_dongle_id = self.dongle_id or self.params.get("DongleId", encoding='utf-8')
|
||||
return sunnylink_dongle_id, comma_dongle_id
|
||||
|
||||
def _resolve_imeis(self):
|
||||
imei1, imei2 = None, None
|
||||
imei_try = 0
|
||||
while imei1 is None and imei2 is None and imei_try < MAX_RETRIES:
|
||||
try:
|
||||
imei1, imei2 = self.params.get("IMEI", encoding='utf8') or HARDWARE.get_imei(0), HARDWARE.get_imei(1)
|
||||
except Exception:
|
||||
self._status_update(f"Error getting imei, trying again... [{imei_try+1}/{MAX_RETRIES}]")
|
||||
time.sleep(1)
|
||||
imei_try += 1
|
||||
return imei1, imei2
|
||||
|
||||
def _resolve_serial(self):
|
||||
serial = self.params.get("HardwareSerial", encoding='utf8') or HARDWARE.get_serial()
|
||||
return serial
|
||||
|
||||
def register_device(self, spinner=None, timeout=60, verbose=False):
|
||||
self.spinner = spinner
|
||||
|
||||
sunnylink_dongle_id, comma_dongle_id = self._resolve_dongle_ids()
|
||||
|
||||
if comma_dongle_id is None:
|
||||
self._status_update("Comma dongle ID not found, deferring sunnylink's registration to comma's registration process.")
|
||||
return None
|
||||
|
||||
imei1, imei2 = self._resolve_imeis()
|
||||
serial = self._resolve_serial()
|
||||
|
||||
if sunnylink_dongle_id not in (None, UNREGISTERED_SUNNYLINK_DONGLE_ID):
|
||||
return sunnylink_dongle_id
|
||||
|
||||
privkey_path = Path(Paths.persist_root()+"/comma/id_rsa")
|
||||
pubkey_path = Path(Paths.persist_root()+"/comma/id_rsa.pub")
|
||||
|
||||
start_time = time.monotonic()
|
||||
successful_registration = False
|
||||
if not pubkey_path.is_file():
|
||||
sunnylink_dongle_id = UNREGISTERED_SUNNYLINK_DONGLE_ID
|
||||
self._status_update("Public key not found, setting dongle ID to unregistered.")
|
||||
else:
|
||||
Params().put("LastSunnylinkPingTime", "0") # Reset the last ping time to 0 if we are trying to register
|
||||
with pubkey_path.open() as f1, privkey_path.open() as f2:
|
||||
public_key = f1.read()
|
||||
private_key = f2.read()
|
||||
|
||||
backoff = 1
|
||||
while True:
|
||||
register_token = jwt.encode({'register': True, 'exp': datetime.utcnow() + timedelta(hours=1)}, private_key, algorithm='RS256')
|
||||
try:
|
||||
if verbose or time.monotonic() - start_time < timeout / 2:
|
||||
self._status_update("Registering device to sunnylink...")
|
||||
elif time.monotonic() - start_time >= timeout / 2:
|
||||
self._status_update("Still registering device to sunnylink...")
|
||||
|
||||
resp = self.api_get("v2/pilotauth/", method='POST', timeout=15, imei=imei1, imei2=imei2, serial=serial, comma_dongle_id=comma_dongle_id, public_key=public_key, register_token=register_token)
|
||||
|
||||
if resp is None:
|
||||
raise Exception("Unable to register device, request was None")
|
||||
|
||||
if resp.status_code in (409, 412):
|
||||
timeout = time.monotonic() - start_time # Don't retry if the public key is already in use
|
||||
key_in_use = "Public key is already in use, is your key unique? Contact your vendor for a new key."
|
||||
unsafe_key = "Public key is known to not be unique and it's unsafe. Contact your vendor for a new key."
|
||||
error_message = key_in_use if resp.status_code == 409 else unsafe_key
|
||||
raise Exception(error_message)
|
||||
|
||||
if resp.status_code != 200:
|
||||
raise Exception(f"Failed to register with sunnylink. Status code: {resp.status_code}\nData\n:{resp.text}")
|
||||
|
||||
dongleauth = json.loads(resp.text)
|
||||
sunnylink_dongle_id = dongleauth["device_id"]
|
||||
if sunnylink_dongle_id:
|
||||
self._status_update("Device registered successfully.")
|
||||
successful_registration = True
|
||||
break
|
||||
except Exception as e:
|
||||
if verbose:
|
||||
self._status_update(f"Waiting {backoff}s before retry, Exception occurred during registration: [{str(e)}]")
|
||||
|
||||
if not os.path.exists(CRASH_LOG_DIR):
|
||||
os.makedirs(CRASH_LOG_DIR)
|
||||
|
||||
with open(f'{CRASH_LOG_DIR}/error.txt', 'a') as f:
|
||||
f.write(f"[{datetime.now()}] sunnylink: {str(e)}\n")
|
||||
|
||||
backoff = min(backoff * 2, 60)
|
||||
time.sleep(backoff)
|
||||
|
||||
if time.monotonic() - start_time > timeout:
|
||||
self._status_update(f"Giving up on sunnylink's registration after {timeout}s. Will retry on next boot.")
|
||||
time.sleep(3)
|
||||
break
|
||||
|
||||
self.params.put("SunnylinkDongleId", sunnylink_dongle_id or UNREGISTERED_SUNNYLINK_DONGLE_ID)
|
||||
|
||||
# Set the last ping time to the current time since we were just talking to the API
|
||||
last_ping = int(time.monotonic() * 1e9) if successful_registration else start_time
|
||||
Params().put("LastSunnylinkPingTime", str(last_ping))
|
||||
|
||||
# Disable sunnylink if registration was not successful
|
||||
if not successful_registration:
|
||||
Params().put_bool("SunnylinkEnabled", False)
|
||||
|
||||
self.spinner = None
|
||||
return sunnylink_dongle_id
|
||||
8
common/gps.py
Normal file
8
common/gps.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from openpilot.common.params import Params
|
||||
|
||||
|
||||
def get_gps_location_service(params: Params) -> str:
|
||||
if params.get_bool("UbloxAvailable"):
|
||||
return "gpsLocationExternal"
|
||||
else:
|
||||
return "gpsLocation"
|
||||
@@ -8,12 +8,12 @@ import functools
|
||||
import threading
|
||||
from cereal.messaging import PubMaster
|
||||
from cereal.services import SERVICE_LIST
|
||||
from openpilot.common.mock.generators import generate_liveLocationKalman
|
||||
from openpilot.common.mock.generators import generate_livePose
|
||||
from openpilot.common.realtime import Ratekeeper
|
||||
|
||||
|
||||
MOCK_GENERATOR = {
|
||||
"liveLocationKalman": generate_liveLocationKalman
|
||||
"livePose": generate_livePose
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
from cereal import messaging
|
||||
|
||||
|
||||
LOCATION1 = (32.7174, -117.16277)
|
||||
LOCATION2 = (32.7558, -117.2037)
|
||||
|
||||
LLK_DECIMATION = 10
|
||||
RENDER_FRAMES = 15
|
||||
DEFAULT_ITERATIONS = RENDER_FRAMES * LLK_DECIMATION
|
||||
|
||||
|
||||
def generate_liveLocationKalman(location=LOCATION1):
|
||||
msg = messaging.new_message('liveLocationKalman')
|
||||
msg.liveLocationKalman.positionGeodetic = {'value': [*location, 0], 'std': [0., 0., 0.], 'valid': True}
|
||||
msg.liveLocationKalman.positionECEF = {'value': [0., 0., 0.], 'std': [0., 0., 0.], 'valid': True}
|
||||
msg.liveLocationKalman.calibratedOrientationNED = {'value': [0., 0., 0.], 'std': [0., 0., 0.], 'valid': True}
|
||||
msg.liveLocationKalman.velocityCalibrated = {'value': [0., 0., 0.], 'std': [0., 0., 0.], 'valid': True}
|
||||
msg.liveLocationKalman.status = 'valid'
|
||||
msg.liveLocationKalman.gpsOK = True
|
||||
def generate_livePose():
|
||||
msg = messaging.new_message('livePose')
|
||||
meas = {'x': 0.0, 'y': 0.0, 'z': 0.0, 'xStd': 0.0, 'yStd': 0.0, 'zStd': 0.0, 'valid': True}
|
||||
msg.livePose.orientationNED = meas
|
||||
msg.livePose.velocityDevice = meas
|
||||
msg.livePose.angularVelocityDevice = meas
|
||||
msg.livePose.accelerationDevice = meas
|
||||
msg.livePose.inputsOK = True
|
||||
msg.livePose.posenetOK = True
|
||||
msg.livePose.sensorsOK = True
|
||||
return msg
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#define CURRENT_MODEL "Notre Dame (July 1, 2024)"
|
||||
202
common/params.cc
202
common/params.cc
@@ -91,7 +91,6 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"AccessToken", CLEAR_ON_MANAGER_START | DONT_LOG},
|
||||
{"AlwaysOnDM", PERSISTENT},
|
||||
{"ApiCache_Device", PERSISTENT},
|
||||
{"ApiCache_NavDestinations", PERSISTENT},
|
||||
{"AssistNowToken", PERSISTENT},
|
||||
{"AthenadPid", PERSISTENT},
|
||||
{"AthenadUploadQueue", PERSISTENT},
|
||||
@@ -105,52 +104,50 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"CarParamsCache", CLEAR_ON_MANAGER_START},
|
||||
{"CarParamsPersistent", PERSISTENT},
|
||||
{"CarParamsPrevRoute", PERSISTENT},
|
||||
{"CarVin", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"CompletedTrainingVersion", PERSISTENT},
|
||||
{"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"CurrentBootlog", PERSISTENT},
|
||||
{"CurrentRoute", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"DisablePowerDown", PERSISTENT | BACKUP},
|
||||
{"DisableUpdates", PERSISTENT | BACKUP},
|
||||
{"DisengageOnAccelerator", PERSISTENT | BACKUP},
|
||||
{"DisablePowerDown", PERSISTENT},
|
||||
{"DisableUpdates", PERSISTENT},
|
||||
{"DisengageOnAccelerator", PERSISTENT},
|
||||
{"DmModelInitialized", CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"DongleId", PERSISTENT},
|
||||
{"DoReboot", CLEAR_ON_MANAGER_START},
|
||||
{"DoShutdown", CLEAR_ON_MANAGER_START},
|
||||
{"DoUninstall", CLEAR_ON_MANAGER_START},
|
||||
{"ExperimentalLongitudinalEnabled", PERSISTENT | DEVELOPMENT_ONLY | BACKUP},
|
||||
{"ExperimentalMode", PERSISTENT | BACKUP},
|
||||
{"ExperimentalModeConfirmed", PERSISTENT | BACKUP},
|
||||
{"ExperimentalLongitudinalEnabled", PERSISTENT | DEVELOPMENT_ONLY},
|
||||
{"ExperimentalMode", PERSISTENT},
|
||||
{"ExperimentalModeConfirmed", PERSISTENT},
|
||||
{"FirmwareQueryDone", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"ForcePowerDown", PERSISTENT},
|
||||
{"GitBranch", PERSISTENT},
|
||||
{"GitCommit", PERSISTENT},
|
||||
{"GitCommitDate", PERSISTENT},
|
||||
{"GitDiff", PERSISTENT},
|
||||
{"GithubSshKeys", PERSISTENT | BACKUP},
|
||||
{"GithubUsername", PERSISTENT | BACKUP},
|
||||
{"GithubSshKeys", PERSISTENT},
|
||||
{"GithubUsername", PERSISTENT},
|
||||
{"GitRemote", PERSISTENT},
|
||||
{"GsmApn", PERSISTENT | BACKUP},
|
||||
{"GsmMetered", PERSISTENT | BACKUP},
|
||||
{"GsmRoaming", PERSISTENT | BACKUP},
|
||||
{"GsmApn", PERSISTENT},
|
||||
{"GsmMetered", PERSISTENT},
|
||||
{"GsmRoaming", PERSISTENT},
|
||||
{"HardwareSerial", PERSISTENT},
|
||||
{"HasAcceptedTerms", PERSISTENT},
|
||||
{"IMEI", PERSISTENT},
|
||||
{"InstallDate", PERSISTENT},
|
||||
{"IsDriverViewEnabled", CLEAR_ON_MANAGER_START},
|
||||
{"IsEngaged", PERSISTENT},
|
||||
{"IsLdwEnabled", PERSISTENT | BACKUP},
|
||||
{"IsMetric", PERSISTENT | BACKUP},
|
||||
{"IsLdwEnabled", PERSISTENT},
|
||||
{"IsMetric", PERSISTENT},
|
||||
{"IsOffroad", CLEAR_ON_MANAGER_START},
|
||||
{"IsOnroad", PERSISTENT},
|
||||
{"IsRhdDetected", PERSISTENT},
|
||||
{"IsReleaseBranch", CLEAR_ON_MANAGER_START},
|
||||
{"IsReleaseSPBranch", CLEAR_ON_MANAGER_START},
|
||||
{"IsTakingSnapshot", CLEAR_ON_MANAGER_START},
|
||||
{"IsTestedBranch", CLEAR_ON_MANAGER_START},
|
||||
{"JoystickDebugMode", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
|
||||
{"LanguageSetting", PERSISTENT | BACKUP},
|
||||
{"LanguageSetting", PERSISTENT},
|
||||
{"LastAthenaPingTime", CLEAR_ON_MANAGER_START},
|
||||
{"LastGPSPosition", PERSISTENT},
|
||||
{"LastManagerExitReason", CLEAR_ON_MANAGER_START},
|
||||
@@ -160,12 +157,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"LastUpdateTime", PERSISTENT},
|
||||
{"LiveParameters", PERSISTENT},
|
||||
{"LiveTorqueParameters", PERSISTENT | DONT_LOG},
|
||||
{"LongitudinalPersonality", PERSISTENT | BACKUP},
|
||||
{"NavDestination", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
|
||||
{"NavDestinationWaypoints", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
|
||||
{"NavPastDestinations", PERSISTENT},
|
||||
{"NavSettingLeftSide", PERSISTENT | BACKUP},
|
||||
{"NavSettingTime24h", PERSISTENT | BACKUP},
|
||||
{"LongitudinalPersonality", PERSISTENT},
|
||||
{"NetworkMetered", PERSISTENT},
|
||||
{"ObdMultiplexingChanged", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"ObdMultiplexingEnabled", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
|
||||
@@ -181,18 +173,17 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"Offroad_TemperatureTooHigh", CLEAR_ON_MANAGER_START},
|
||||
{"Offroad_UnofficialHardware", CLEAR_ON_MANAGER_START},
|
||||
{"Offroad_UpdateFailed", CLEAR_ON_MANAGER_START},
|
||||
{"Offroad_OSMUpdateRequired", CLEAR_ON_MANAGER_START},
|
||||
{"OpenpilotEnabledToggle", PERSISTENT | BACKUP},
|
||||
{"OpenpilotEnabledToggle", PERSISTENT},
|
||||
{"PandaHeartbeatLost", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
|
||||
{"PandaSomResetTriggered", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
|
||||
{"PandaSignatures", CLEAR_ON_MANAGER_START},
|
||||
{"PrimeType", PERSISTENT},
|
||||
{"RecordFront", PERSISTENT | BACKUP},
|
||||
{"RecordFront", PERSISTENT},
|
||||
{"RecordFrontLock", PERSISTENT}, // for the internal fleet
|
||||
{"ReplayControlsState", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"RouteCount", PERSISTENT},
|
||||
{"SnoozeUpdate", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
|
||||
{"SshEnabled", PERSISTENT | BACKUP},
|
||||
{"SshEnabled", PERSISTENT},
|
||||
{"TermsVersion", PERSISTENT},
|
||||
{"TrainingVersion", PERSISTENT},
|
||||
{"UbloxAvailable", PERSISTENT},
|
||||
@@ -208,163 +199,6 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"UpdaterTargetBranch", CLEAR_ON_MANAGER_START},
|
||||
{"UpdaterLastFetchTime", PERSISTENT},
|
||||
{"Version", PERSISTENT},
|
||||
|
||||
{"AccelPersonality", PERSISTENT | BACKUP},
|
||||
{"AccMadsCombo", PERSISTENT | BACKUP},
|
||||
{"AmapKey1", PERSISTENT | BACKUP},
|
||||
{"AmapKey2", PERSISTENT | BACKUP},
|
||||
{"ApiCache_DriveStats", PERSISTENT | BACKUP},
|
||||
{"AutoLaneChangeTimer", PERSISTENT | BACKUP},
|
||||
{"AutoLaneChangeBsmDelay", PERSISTENT | BACKUP},
|
||||
{"BelowSpeedPause", PERSISTENT | BACKUP},
|
||||
{"BrakeLights", PERSISTENT | BACKUP},
|
||||
{"BrightnessControl", PERSISTENT | BACKUP},
|
||||
{"ButtonAutoHide", PERSISTENT | BACKUP},
|
||||
{"CameraControl", PERSISTENT | BACKUP},
|
||||
{"CameraControlToggle", PERSISTENT | BACKUP},
|
||||
{"CameraOffset", PERSISTENT | BACKUP},
|
||||
{"CarModel", PERSISTENT | BACKUP},
|
||||
{"CarModelText", PERSISTENT | BACKUP},
|
||||
{"ChevronInfo", PERSISTENT | BACKUP},
|
||||
{"CustomBootScreen", PERSISTENT | BACKUP},
|
||||
{"CustomDrivingModel", PERSISTENT},
|
||||
{"CustomMapboxTokenPk", PERSISTENT | BACKUP},
|
||||
{"CustomMapboxTokenSk", PERSISTENT | BACKUP},
|
||||
{"CustomOffsets", PERSISTENT | BACKUP},
|
||||
{"CustomStockLong", PERSISTENT | BACKUP},
|
||||
{"CustomStockLongPlanner", PERSISTENT | BACKUP},
|
||||
{"CustomTorqueLateral", PERSISTENT | BACKUP},
|
||||
{"DevUIInfo", PERSISTENT | BACKUP},
|
||||
{"DisableOnroadUploads", PERSISTENT | BACKUP},
|
||||
{"DisengageLateralOnBrake", PERSISTENT | BACKUP},
|
||||
{"DrivingModelGeneration", PERSISTENT},
|
||||
{"DrivingModelMetadataText", PERSISTENT},
|
||||
{"DrivingModelName", PERSISTENT},
|
||||
{"DrivingModelText", PERSISTENT},
|
||||
{"DrivingModelUrl", PERSISTENT},
|
||||
{"DynamicExperimentalControl", PERSISTENT | BACKUP},
|
||||
{"DynamicLaneProfile", PERSISTENT | BACKUP},
|
||||
{"DynamicPersonality", PERSISTENT | BACKUP},
|
||||
{"EnableAmap", PERSISTENT | BACKUP},
|
||||
{"EnableGmap", PERSISTENT | BACKUP},
|
||||
{"EnableMads", PERSISTENT | BACKUP},
|
||||
{"EnableSlc", PERSISTENT | BACKUP},
|
||||
{"EndToEndLongAlertLead", PERSISTENT | BACKUP},
|
||||
{"EndToEndLongAlertLight", PERSISTENT | BACKUP},
|
||||
{"EndToEndLongAlertUI", PERSISTENT | BACKUP},
|
||||
{"EndToEndLongToggle", PERSISTENT | BACKUP},
|
||||
{"EnforceTorqueLateral", PERSISTENT | BACKUP},
|
||||
{"EnhancedScc", PERSISTENT | BACKUP},
|
||||
{"FeatureStatus", PERSISTENT | BACKUP},
|
||||
{"FleetManagerPin", PERSISTENT},
|
||||
{"ForceOffroad", CLEAR_ON_MANAGER_START},
|
||||
{"GmapKey", PERSISTENT | BACKUP},
|
||||
{"HandsOnWheelMonitoring", PERSISTENT | BACKUP},
|
||||
{"HasAcceptedTermsSP", PERSISTENT},
|
||||
{"HideVEgoUi", PERSISTENT | BACKUP},
|
||||
{"HyundaiCruiseMainDefault", PERSISTENT | BACKUP},
|
||||
{"HkgCustomLongTuning", PERSISTENT | BACKUP},
|
||||
{"HkgSmoothStop", PERSISTENT | BACKUP},
|
||||
{"HyundaiCruiseMainDefault", PERSISTENT | BACKUP},
|
||||
{"HotspotOnBoot", PERSISTENT},
|
||||
{"HotspotOnBootConfirmed", PERSISTENT},
|
||||
{"HyundaiRadarTracksAvailable", PERSISTENT},
|
||||
{"HyundaiRadarTracksAvailableCache", PERSISTENT},
|
||||
{"HyundaiRadarTracksAvailablePersistent", PERSISTENT},
|
||||
{"LastCarModel", PERSISTENT | BACKUP},
|
||||
{"LastSpeedLimitSignTap", PERSISTENT},
|
||||
{"LastSunnylinkPingTime", CLEAR_ON_MANAGER_START},
|
||||
{"LiveTorque", PERSISTENT | BACKUP},
|
||||
{"LiveTorqueRelaxed", PERSISTENT | BACKUP},
|
||||
{"LkasToggle", PERSISTENT | BACKUP},
|
||||
{"MadsCruiseMain", PERSISTENT | BACKUP},
|
||||
{"MadsIconToggle", PERSISTENT | BACKUP},
|
||||
{"MapboxFullScreen", PERSISTENT | BACKUP},
|
||||
{"MapTargetVelocities", PERSISTENT},
|
||||
{"Map3DBuildings", PERSISTENT | BACKUP},
|
||||
{"MaxTimeOffroad", PERSISTENT | BACKUP},
|
||||
{"NavModelText", PERSISTENT | BACKUP},
|
||||
{"NavModelUrl", PERSISTENT | BACKUP},
|
||||
{"NNFF", PERSISTENT | BACKUP},
|
||||
{"NNFFCarModel", PERSISTENT | BACKUP},
|
||||
{"NNFFNoLateralJerk", PERSISTENT | BACKUP},
|
||||
{"OnroadScreenOff", PERSISTENT | BACKUP},
|
||||
{"OnroadScreenOffBrightness", PERSISTENT | BACKUP},
|
||||
{"OnroadScreenOffEvent", PERSISTENT | BACKUP},
|
||||
{"OnroadSettings", PERSISTENT | BACKUP},
|
||||
{"OsmLocal", PERSISTENT},
|
||||
{"OsmLocationName", PERSISTENT},
|
||||
{"OsmLocationTitle", PERSISTENT},
|
||||
{"OsmLocationUrl", PERSISTENT},
|
||||
{"OsmWayTest", PERSISTENT},
|
||||
{"OsmDownloadedDate", PERSISTENT},
|
||||
{"OvertakingAccelerationAssist", PERSISTENT},
|
||||
{"PathOffset", PERSISTENT | BACKUP},
|
||||
{"PauseLateralSpeed", PERSISTENT | BACKUP},
|
||||
{"PCMVCruiseOverride", PERSISTENT | BACKUP},
|
||||
{"PCMVCruiseOverrideSpeed", PERSISTENT | BACKUP},
|
||||
{"QuietDrive", PERSISTENT | BACKUP},
|
||||
{"RoadEdge", PERSISTENT | BACKUP},
|
||||
{"ReverseAccChange", PERSISTENT | BACKUP},
|
||||
{"ReverseDmCam", PERSISTENT | BACKUP},
|
||||
{"ScreenRecorder", PERSISTENT | BACKUP},
|
||||
{"ShowDebugUI", PERSISTENT | BACKUP},
|
||||
{"SidebarTemperatureOptions", PERSISTENT | BACKUP},
|
||||
{"SpeedLimitControlPolicy", PERSISTENT | BACKUP},
|
||||
{"SpeedLimitEngageType", PERSISTENT | BACKUP},
|
||||
{"SpeedLimitValueOffset", PERSISTENT | BACKUP},
|
||||
{"SpeedLimitOffsetType", PERSISTENT | BACKUP},
|
||||
{"SpeedLimitWarningFlash", PERSISTENT | BACKUP},
|
||||
{"SpeedLimitWarningType", PERSISTENT | BACKUP},
|
||||
{"SpeedLimitWarningValueOffset", PERSISTENT | BACKUP},
|
||||
{"SpeedLimitWarningOffsetType", PERSISTENT | BACKUP},
|
||||
{"StandStillTimer", PERSISTENT | BACKUP},
|
||||
{"StockLongToyota", PERSISTENT | BACKUP},
|
||||
{"SubaruManualParkingBrakeSng", PERSISTENT | BACKUP},
|
||||
{"SunnylinkDongleId", PERSISTENT},
|
||||
{"SunnylinkEnabled", PERSISTENT},
|
||||
{"SunnylinkdPid", PERSISTENT},
|
||||
{"TermsVersionSunnypilot", PERSISTENT},
|
||||
{"TorqueDeadzoneDeg", PERSISTENT | BACKUP},
|
||||
{"TorqueFriction", PERSISTENT | BACKUP},
|
||||
{"TorqueLateralJerk", PERSISTENT | BACKUP},
|
||||
{"TorqueMaxLatAccel", PERSISTENT | BACKUP},
|
||||
{"TorquedOverride", PERSISTENT | BACKUP},
|
||||
{"ToyotaAutoLockBySpeed", PERSISTENT | BACKUP},
|
||||
{"ToyotaAutoUnlockByShifter", PERSISTENT | BACKUP},
|
||||
{"ToyotaDriveMode", PERSISTENT | BACKUP},
|
||||
{"ToyotaEnhancedBsm", PERSISTENT | BACKUP},
|
||||
{"ToyotaSnG", PERSISTENT | BACKUP},
|
||||
{"ToyotaTSS2Long", PERSISTENT | BACKUP},
|
||||
{"TrueVEgoUi", PERSISTENT | BACKUP},
|
||||
{"TurnSpeedControl", PERSISTENT | BACKUP},
|
||||
{"TurnVisionControl", PERSISTENT | BACKUP},
|
||||
{"DriverCameraHardwareMissing", PERSISTENT},
|
||||
{"VisionCurveLaneless", PERSISTENT | BACKUP},
|
||||
{"VwAccType", PERSISTENT | BACKUP},
|
||||
{"VwCCOnly", PERSISTENT | BACKUP},
|
||||
{"Offroad_ForceStatus", CLEAR_ON_MANAGER_START},
|
||||
{"Offroad_SupersededUpdate", PERSISTENT},
|
||||
|
||||
{"SunnylinkCache_Users", PERSISTENT},
|
||||
{"SunnylinkCache_Roles", PERSISTENT},
|
||||
{"EnableGitlabRunner", PERSISTENT | BACKUP},
|
||||
{"EnableSunnylinkUploader", PERSISTENT | BACKUP},
|
||||
|
||||
// PFEIFER - MAPD {{
|
||||
{"MapdVersion", PERSISTENT},
|
||||
{"RoadName", CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"MapSpeedLimit", CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"MapAdvisorySpeedLimit", CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"NextMapSpeedLimit", CLEAR_ON_ONROAD_TRANSITION},
|
||||
{"OSMDownloadBounds", PERSISTENT},
|
||||
{"OSMDownloadLocations", PERSISTENT},
|
||||
{"OsmDownloadedDate", PERSISTENT},
|
||||
{"OsmStateTitle", PERSISTENT},
|
||||
{"OsmStateName", PERSISTENT},
|
||||
{"OSMDownloadProgress", CLEAR_ON_MANAGER_START},
|
||||
{"OsmDbUpdatesCheck", CLEAR_ON_MANAGER_START}, // mapd database update happens with device ON, reset on boot
|
||||
// }} PFEIFER - MAPD
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -16,7 +16,6 @@ enum ParamKeyType {
|
||||
CLEAR_ON_OFFROAD_TRANSITION = 0x10,
|
||||
DONT_LOG = 0x20,
|
||||
DEVELOPMENT_ONLY = 0x40,
|
||||
BACKUP = 0x80,
|
||||
ALL = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
from libcpp cimport bool
|
||||
from libcpp.string cimport string
|
||||
from libcpp.vector cimport vector
|
||||
from libcpp.map cimport map
|
||||
|
||||
cdef extern from "common/params.h":
|
||||
cpdef enum ParamKeyType:
|
||||
@@ -12,7 +11,6 @@ cdef extern from "common/params.h":
|
||||
CLEAR_ON_ONROAD_TRANSITION
|
||||
CLEAR_ON_OFFROAD_TRANSITION
|
||||
DEVELOPMENT_ONLY
|
||||
BACKUP
|
||||
ALL
|
||||
|
||||
cdef cppclass c_Params "Params":
|
||||
@@ -28,7 +26,6 @@ cdef extern from "common/params.h":
|
||||
string getParamPath(string) nogil
|
||||
void clearAll(ParamKeyType)
|
||||
vector[string] allKeys()
|
||||
map[string, string] readAll()
|
||||
|
||||
|
||||
def ensure_bytes(v):
|
||||
@@ -119,6 +116,3 @@ cdef class Params:
|
||||
|
||||
def all_keys(self):
|
||||
return self.p.allKeys()
|
||||
|
||||
def read_all(self):
|
||||
return self.p.readAll()
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
import gc
|
||||
import os
|
||||
import time
|
||||
import threading
|
||||
import psutil
|
||||
from collections import deque
|
||||
|
||||
from openpilot.common.threadname import getthreadname
|
||||
from setproctitle import getproctitle
|
||||
|
||||
from openpilot.system.hardware import PC
|
||||
|
||||
@@ -46,14 +44,6 @@ def config_realtime_process(cores: int | list[int], priority: int) -> None:
|
||||
set_core_affinity(c)
|
||||
|
||||
|
||||
def set_thread_affinity(thread: threading.Thread, cores: list[int]) -> None:
|
||||
try:
|
||||
process = psutil.Process(thread.ident)
|
||||
process.cpu_affinity(cores)
|
||||
except Exception as e:
|
||||
print(f"Error setting thread affinity: {e}")
|
||||
|
||||
|
||||
class Ratekeeper:
|
||||
def __init__(self, rate: float, print_delay_threshold: float | None = 0.0) -> None:
|
||||
"""Rate in Hz for ratekeeping. print_delay_threshold must be nonnegative."""
|
||||
@@ -62,7 +52,7 @@ class Ratekeeper:
|
||||
self._print_delay_threshold = print_delay_threshold
|
||||
self._frame = 0
|
||||
self._remaining = 0.0
|
||||
self._thread_name = getthreadname()
|
||||
self._process_name = getproctitle()
|
||||
self._dts = deque([self._interval], maxlen=100)
|
||||
self._last_monitor_time = time.monotonic()
|
||||
|
||||
@@ -97,7 +87,7 @@ class Ratekeeper:
|
||||
remaining = self._next_frame_time - time.monotonic()
|
||||
self._next_frame_time += self._interval
|
||||
if self._print_delay_threshold is not None and remaining < -self._print_delay_threshold:
|
||||
print(f"{self._thread_name} lagging by {-remaining * 1000:.2f} ms")
|
||||
print(f"{self._process_name} lagging by {-remaining * 1000:.2f} ms")
|
||||
lagged = True
|
||||
self._frame += 1
|
||||
self._remaining = remaining
|
||||
|
||||
@@ -104,6 +104,15 @@ class UnixDomainSocketHandler(logging.Handler):
|
||||
pass
|
||||
|
||||
|
||||
class ForwardingHandler(logging.Handler):
|
||||
def __init__(self, target_logger):
|
||||
super().__init__()
|
||||
self.target_logger = target_logger
|
||||
|
||||
def emit(self, record):
|
||||
self.target_logger.handle(record)
|
||||
|
||||
|
||||
def add_file_handler(log):
|
||||
"""
|
||||
Function to add the file log handler to swaglog.
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
from openpilot.common.threadname import setthreadname, getthreadname, LINUX
|
||||
|
||||
class TestThreadName:
|
||||
def test_set_get_threadname(self):
|
||||
if LINUX:
|
||||
name = 'TESTING'
|
||||
setthreadname(name)
|
||||
assert name == getthreadname()
|
||||
@@ -1,19 +0,0 @@
|
||||
import ctypes
|
||||
import os
|
||||
|
||||
LINUX = os.name == 'posix' and os.uname().sysname == 'Linux'
|
||||
|
||||
if LINUX:
|
||||
libc = ctypes.CDLL('libc.so.6')
|
||||
|
||||
def setthreadname(name: str) -> None:
|
||||
if LINUX:
|
||||
name = name[-15:] + '\0'
|
||||
libc.prctl(15, str.encode(name), 0, 0, 0)
|
||||
|
||||
def getthreadname() -> str:
|
||||
if LINUX:
|
||||
name = ctypes.create_string_buffer(16)
|
||||
libc.prctl(16, name)
|
||||
return name.value.decode('utf-8')
|
||||
return ""
|
||||
@@ -1,7 +1,7 @@
|
||||
import datetime
|
||||
from pathlib import Path
|
||||
|
||||
_MIN_DATE = datetime.datetime(year=2024, month=3, day=30)
|
||||
_MIN_DATE = datetime.datetime(year=2024, month=8, day=26)
|
||||
|
||||
def min_date():
|
||||
# on systemd systems, the default time is the systemd build time
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
class Freezable:
|
||||
_frozen: bool = False
|
||||
|
||||
def freeze(self):
|
||||
if not self._frozen:
|
||||
self._frozen = True
|
||||
|
||||
def __setattr__(self, *args, **kwargs):
|
||||
if self._frozen:
|
||||
raise Exception("cannot modify frozen object")
|
||||
super().__setattr__(*args, **kwargs)
|
||||
@@ -1 +1 @@
|
||||
#define COMMA_VERSION "0.9.8.0"
|
||||
#define COMMA_VERSION "0.9.8"
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
# [Bounties](https://github.com/orgs/commaai/projects/26/views/1)
|
||||
|
||||
Get paid to improve openpilot!
|
||||
|
||||
## Rules
|
||||
|
||||
* code must be merged into openpilot master
|
||||
* bounty eligibility is solely at our discretion
|
||||
* once you open a PR, the bounty is locked to you until you stop working on it
|
||||
* open a ticket at [comma.ai/support](https://comma.ai/support/shop-order) with links to your PRs to claim
|
||||
* get an extra 20% if you redeem your bounty in [comma shop](https://comma.ai/shop) credit (including refunds on previous orders)
|
||||
* for bounties >$100, the first PR gets a lock, which times out after a week of no progress
|
||||
|
||||
We put up each bounty with the intention that it'll get merged, but occasionally the right resolution is to close the bounty, which only becomes clear once some effort is put in.
|
||||
This is still valuable work, so we'll pay out $100 for getting any bounty closed with a good explanation.
|
||||
|
||||
## Issue bounties
|
||||
|
||||
We've tagged bounty-eligible issues across openpilot and the rest of our repos; check out all the open ones [here](https://github.com/orgs/commaai/projects/26/views/1). These bounties roughly work out like this:
|
||||
* **$100** - a few hours of work for an experienced openpilot developer; a good intro for someone new to openpilot
|
||||
* **$300** - a day of work for an experienced openpilot developer
|
||||
* **$500** - a few days of work for an experienced openpilot developer
|
||||
* **$1k+** - a week or two of work (could be less for the right person)
|
||||
|
||||
New bounties can be proposed in the [**#contributing**](https://discord.com/channels/469524606043160576/1183173332531687454) channel in Discord.
|
||||
|
||||
## Car bounties
|
||||
|
||||
The car bounties only apply to cars that have a path to ship in openpilot release, which excludes unsupportable cars (e.g. Fords with a steering lockout) or cars that require extra hardware (Honda Accord with serial steering).
|
||||
|
||||
#### Brand or platform port - $2000
|
||||
Example PR: [commaai/openpilot#23331](https://github.com/commaai/openpilot/pull/23331)
|
||||
|
||||
This is for adding support for an entirely new brand or a substantially new ADAS platform within a brand (e.g. the Volkswagen PQ platform).
|
||||
|
||||
#### Model port - $250
|
||||
Example PR: [commaai/openpilot#30245](https://github.com/commaai/openpilot/pull/30245)
|
||||
|
||||
This is for porting a new car model that runs on a platform openpilot already supports.
|
||||
In the average case, this is a few hours of work for an experienced software developer.
|
||||
|
||||
This bounty also covers getting openpilot supported on a previously unsupported trim of an already supported car, e.g. the Chevy Bolt without ACC.
|
||||
|
||||
#### Reverse Engineering a new Actuation Message - $300
|
||||
|
||||
This is for cars that are already supported, and it has three components:
|
||||
* reverse a new steering, adaptive cruise, or AEB message
|
||||
* merge the DBC definitions to [opendbc](http://github.com/commaai/opendbc)
|
||||
* merge the openpilot code to use it and post a demo route
|
||||
|
||||
The control doesn't have to be perfect, but it should generally do what it's supposed to do.
|
||||
|
||||
### Specific Cars
|
||||
|
||||
#### Rivian R1T or R1S - $3000
|
||||
|
||||
Get a Rivian driving with openpilot.
|
||||
Requires a merged port with lateral control and at least a POC of longitudinal control.
|
||||
|
||||
#### Chevy Bolt with SuperCruise - $2500
|
||||
|
||||
The Bolt is already supported on the trim with standard ACC. Get openpilot working on the trim with SuperCruise. It must be a normal install: no extra pandas or other hardware, no ECU reflashes, etc. The full bounty is for a port with lateral and longitudinal control. $1500 of the bounty can be claimed with a lateral-only port.
|
||||
20
docs/CARS.md
20
docs/CARS.md
@@ -8,8 +8,8 @@ A supported vehicle is one that just works when you install a comma device. All
|
||||
|
||||
|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|
|
||||
|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
|Acura|ILX 2016-19|AcuraWatch Plus|openpilot|25 mph|25 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Acura&model=ILX 2016-19">Buy Here</a></sub></details>||
|
||||
|Acura|RDX 2016-18|AcuraWatch Plus|openpilot|25 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Acura&model=RDX 2016-18">Buy Here</a></sub></details>||
|
||||
|Acura|ILX 2016-19|AcuraWatch Plus|openpilot|26 mph|25 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Acura&model=ILX 2016-19">Buy Here</a></sub></details>||
|
||||
|Acura|RDX 2016-18|AcuraWatch Plus|openpilot|26 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Acura&model=RDX 2016-18">Buy Here</a></sub></details>||
|
||||
|Acura|RDX 2019-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch A 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=Acura&model=RDX 2019-22">Buy Here</a></sub></details>||
|
||||
|Audi|A3 2014-19|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=Audi&model=A3 2014-19">Buy Here</a></sub></details>||
|
||||
|Audi|A3 Sportback e-tron 2017-18|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=Audi&model=A3 Sportback e-tron 2017-18">Buy Here</a></sub></details>||
|
||||
@@ -64,20 +64,20 @@ A supported vehicle is one that just works when you install a comma device. All
|
||||
|Honda|Civic 2022-24|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch B 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=Honda&model=Civic 2022-24">Buy Here</a></sub></details>|<a href="https://youtu.be/ytiOT5lcp6Q" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>|
|
||||
|Honda|Civic Hatchback 2017-21|Honda Sensing|openpilot available[<sup>1</sup>](#footnotes)|0 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch A 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=Honda&model=Civic Hatchback 2017-21">Buy Here</a></sub></details>||
|
||||
|Honda|Civic Hatchback 2022-24|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch B 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=Honda&model=Civic Hatchback 2022-24">Buy Here</a></sub></details>|<a href="https://youtu.be/ytiOT5lcp6Q" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>|
|
||||
|Honda|CR-V 2015-16|Touring Trim|openpilot|25 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=CR-V 2015-16">Buy Here</a></sub></details>||
|
||||
|Honda|CR-V 2015-16|Touring Trim|openpilot|26 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=CR-V 2015-16">Buy Here</a></sub></details>||
|
||||
|Honda|CR-V 2017-22|Honda Sensing|openpilot available[<sup>1</sup>](#footnotes)|0 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch A 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=Honda&model=CR-V 2017-22">Buy Here</a></sub></details>||
|
||||
|Honda|CR-V Hybrid 2017-21|Honda Sensing|openpilot available[<sup>1</sup>](#footnotes)|0 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch A 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=Honda&model=CR-V Hybrid 2017-21">Buy Here</a></sub></details>||
|
||||
|Honda|e 2020|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch A 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=Honda&model=e 2020">Buy Here</a></sub></details>||
|
||||
|Honda|Fit 2018-20|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Fit 2018-20">Buy Here</a></sub></details>||
|
||||
|Honda|Freed 2020|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Freed 2020">Buy Here</a></sub></details>||
|
||||
|Honda|HR-V 2019-22|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=HR-V 2019-22">Buy Here</a></sub></details>||
|
||||
|Honda|Fit 2018-20|Honda Sensing|openpilot|26 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Fit 2018-20">Buy Here</a></sub></details>||
|
||||
|Honda|Freed 2020|Honda Sensing|openpilot|26 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Freed 2020">Buy Here</a></sub></details>||
|
||||
|Honda|HR-V 2019-22|Honda Sensing|openpilot|26 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=HR-V 2019-22">Buy Here</a></sub></details>||
|
||||
|Honda|HR-V 2023|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch B 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=Honda&model=HR-V 2023">Buy Here</a></sub></details>||
|
||||
|Honda|Insight 2019-22|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch A 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=Honda&model=Insight 2019-22">Buy Here</a></sub></details>||
|
||||
|Honda|Inspire 2018|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|3 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Bosch A 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=Honda&model=Inspire 2018">Buy Here</a></sub></details>||
|
||||
|Honda|Odyssey 2018-20|Honda Sensing|openpilot|25 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Odyssey 2018-20">Buy Here</a></sub></details>||
|
||||
|Honda|Passport 2019-23|All|openpilot|25 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Passport 2019-23">Buy Here</a></sub></details>||
|
||||
|Honda|Pilot 2016-22|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Pilot 2016-22">Buy Here</a></sub></details>||
|
||||
|Honda|Ridgeline 2017-24|Honda Sensing|openpilot|25 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Ridgeline 2017-24">Buy Here</a></sub></details>||
|
||||
|Honda|Odyssey 2018-20|Honda Sensing|openpilot|26 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Odyssey 2018-20">Buy Here</a></sub></details>||
|
||||
|Honda|Passport 2019-23|All|openpilot|26 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Passport 2019-23">Buy Here</a></sub></details>||
|
||||
|Honda|Pilot 2016-22|Honda Sensing|openpilot|26 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Pilot 2016-22">Buy Here</a></sub></details>||
|
||||
|Honda|Ridgeline 2017-24|Honda Sensing|openpilot|26 mph|12 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Honda Nidec 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=Honda&model=Ridgeline 2017-24">Buy Here</a></sub></details>||
|
||||
|Hyundai|Azera 2022|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai K 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=Hyundai&model=Azera 2022">Buy Here</a></sub></details>||
|
||||
|Hyundai|Azera Hybrid 2019|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai C 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=Hyundai&model=Azera Hybrid 2019">Buy Here</a></sub></details>||
|
||||
|Hyundai|Azera Hybrid 2020|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai K 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=Hyundai&model=Azera Hybrid 2020">Buy Here</a></sub></details>||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# 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 externalization](https://blog.comma.ai/a-2020-theme-externalization/). Development activity is coordinated through our GitHub Issues, [GitHub Discussions](https://github.com/commaai/openpilot/discussions), and [Discord](https://discord.comma.ai).
|
||||
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 externalization](https://blog.comma.ai/a-2020-theme-externalization/).
|
||||
|
||||
Development is coordinated through [Discord](https://discord.comma.ai) and GitHub.
|
||||
|
||||
### Getting Started
|
||||
|
||||
@@ -11,7 +13,8 @@ Our software is open source so you can solve your own problems without needing h
|
||||
|
||||
## What contributions are we looking for?
|
||||
|
||||
**openpilot's priorities are [safety](SAFETY.md), stability, quality, and features, in that order.** openpilot is part of comma's mission to *solve self-driving cars while delivering shippable intermediaries*, and **all** development is towards that goal.
|
||||
**openpilot's priorities are [safety](SAFETY.md), stability, quality, and features, in that order.**
|
||||
openpilot is part of comma's mission to *solve self-driving cars while delivering shippable intermediaries*, and all development is towards that goal.
|
||||
|
||||
### What gets merged?
|
||||
|
||||
@@ -27,24 +30,21 @@ All of these are examples of good PRs:
|
||||
|
||||
### What doesn't get merged?
|
||||
|
||||
* **arbitrary style changes**: code is art, and it's up to the author to make it beautiful
|
||||
* **style changes**: code is art, and it's up to the author to make it beautiful
|
||||
* **500+ line PRs**: clean it up, break it up into smaller PRs, or both
|
||||
* **PRs without a clear goal**: every PR must have a singular and clear goal
|
||||
* **UI design changes**: we do not have a good review process for this yet
|
||||
* **UI design**: we do not have a good review process for this yet
|
||||
* **New features**: We believe openpilot is mostly feature-complete, and the rest is a matter of refinement and fixing bugs. As a result of this, most feature PRs will be immediately closed, however the beauty of open source is that forks can and do offer features that upstream openpilot doesn't.
|
||||
* **Negative expected value**: This a class of PRs that makes an improvement, but the risk or validation costs more than the improvement. The risk can be mitigated by first getting a failing test merged.
|
||||
|
||||
### First contribution
|
||||
|
||||
Check out any [good first issue](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 openpilot 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.
|
||||
[Bounties](https://comma.ai/bounties) are the best place to get started.
|
||||
There's lot of bounties that don't require a comma 3/3X or a car.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Pull requests should be against the master 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.
|
||||
Pull requests should be against the master branch.
|
||||
|
||||
A good pull request has all of the following:
|
||||
* a clearly stated purpose
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# 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>
|
||||
@@ -1,6 +1,6 @@
|
||||
# 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/`.
|
||||
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/car_specific.py` and `opendbc_repo/opendbc/car`.
|
||||
|
||||
The complexity of a car port varies depending on many factors including:
|
||||
* existing openpilot support for similar cars
|
||||
|
||||
@@ -5,6 +5,7 @@ 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
|
||||
* [#current-projects](https://discord.com/channels/469524606043160576/1249579909739708446) in Discord for discussion on work-in-progress projects
|
||||
|
||||
## openpilot 0.10
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ A comma 3/3X is a normal [Linux](https://github.com/commaai/agnos-builder) compu
|
||||
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 three, the serial console is exposed through a UART-to-USB chip, and `tools/scripts/serial.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.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ And if you have a comma 3/3X, we'll deploy the change to your device for testing
|
||||
|
||||
Run this to clone openpilot and install all the dependencies:
|
||||
```bash
|
||||
curl -fsSL openpilot.comma.ai | bash
|
||||
bash <(curl -fsSL openpilot.comma.ai)
|
||||
```
|
||||
|
||||
Navigate to openpilot folder & activate a Python virtual environment
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$BASEDIR" ]; then
|
||||
BASEDIR="/data/openpilot"
|
||||
@@ -86,8 +86,7 @@ function launch {
|
||||
if [ ! -f $DIR/prebuilt ]; then
|
||||
./build.py
|
||||
fi
|
||||
|
||||
./mapd_installer.py; ./manager.py
|
||||
./manager.py
|
||||
|
||||
# if broken, keep on screen error
|
||||
while true; do sleep 1; done
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export OMP_NUM_THREADS=1
|
||||
export MKL_NUM_THREADS=1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
exec ./launch_chffrplus.sh
|
||||
|
||||
Submodule msgq_repo updated: e6c0716e41...cdcf84f44a
Submodule opendbc_repo updated: 529474a50e...81fcc40cc7
2
panda
2
panda
Submodule panda updated: 55018eafc2...866bd9c3bc
@@ -26,7 +26,7 @@ dependencies = [
|
||||
"pycapnp",
|
||||
"Cython",
|
||||
"setuptools",
|
||||
"numpy",
|
||||
"numpy < 2.0.0",
|
||||
|
||||
# body / webrtcd
|
||||
"aiohttp",
|
||||
@@ -52,13 +52,13 @@ dependencies = [
|
||||
"websocket_client",
|
||||
|
||||
# acados deps
|
||||
"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'",
|
||||
"casadi >=3.6.6", # 3.12 fixed in 3.6.6
|
||||
"future-fstrings",
|
||||
|
||||
# these should be removed
|
||||
"psutil",
|
||||
"pycryptodome", # used in updated/casync, panda, body, and a test
|
||||
"setproctitle",
|
||||
|
||||
# logreader
|
||||
"zstandard",
|
||||
@@ -74,7 +74,6 @@ docs = [
|
||||
testing = [
|
||||
"coverage",
|
||||
"hypothesis ==6.47.*",
|
||||
"import-linter",
|
||||
"mypy",
|
||||
"pytest",
|
||||
"pytest-cov",
|
||||
@@ -88,6 +87,7 @@ testing = [
|
||||
"pytest-repeat",
|
||||
"ruff",
|
||||
"codespell",
|
||||
"pre-commit-hooks",
|
||||
]
|
||||
|
||||
dev = [
|
||||
@@ -99,7 +99,7 @@ dev = [
|
||||
"inputs",
|
||||
"lru-dict",
|
||||
"matplotlib",
|
||||
"metadrive-simulator@git+https://github.com/commaai/metadrive@opencv_headless ; platform_machine != 'aarch64'",
|
||||
"metadrive-simulator @ https://github.com/commaai/metadrive/releases/download/MetaDrive-minimal/metadrive_simulator-0.4.2.3-py3-none-any.whl ; (platform_machine != 'aarch64')",
|
||||
"parameterized >=0.8, <0.9",
|
||||
#"pprofile",
|
||||
"pyautogui",
|
||||
@@ -107,7 +107,7 @@ dev = [
|
||||
"pytools < 2024.1.11; platform_machine != 'aarch64'", # pyopencl use a broken version
|
||||
"pywinctl",
|
||||
"pyprof2calltree",
|
||||
"rerun-sdk",
|
||||
"rerun-sdk >= 0.18",
|
||||
"tabulate",
|
||||
"types-requests",
|
||||
"types-tabulate",
|
||||
@@ -144,6 +144,7 @@ testpaths = [
|
||||
"common",
|
||||
"selfdrive/pandad",
|
||||
"selfdrive/car",
|
||||
"selfdrive/opcar",
|
||||
"selfdrive/controls",
|
||||
"selfdrive/locationd",
|
||||
"selfdrive/monitoring",
|
||||
@@ -165,11 +166,11 @@ testpaths = [
|
||||
]
|
||||
|
||||
[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"
|
||||
ignore-words-list = "bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn,ws,uint,grey,deque,stdio,amin,BA,LITE,atEnd,UIs,errorString,arange,FocusIn,od,tim,relA,hist,copyable,jupyter,thead"
|
||||
builtin = "clear,rare,informal,code,names,en-GB_to_en-US"
|
||||
skip = "./third_party/*, ./tinygrad/*, ./tinygrad_repo/*, ./msgq/*, ./panda/*, ./opendbc/*, ./opendbc_repo/*, ./rednose/*, ./rednose_repo/*, ./teleoprtc/*, ./teleoprtc_repo/*, *.ts, uv.lock, *.onnx, ./cereal/gen/*, */c_generated_code/*"
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.11"
|
||||
@@ -177,9 +178,11 @@ plugins = [
|
||||
"numpy.typing.mypy_plugin",
|
||||
]
|
||||
exclude = [
|
||||
"body/",
|
||||
"cereal/",
|
||||
"msgq/",
|
||||
"msgq_repo/",
|
||||
"opendbc/",
|
||||
"opendbc_repo/",
|
||||
"panda/",
|
||||
"rednose/",
|
||||
"rednose_repo/",
|
||||
@@ -204,6 +207,10 @@ warn_return_any=true
|
||||
# allow implicit optionals for default args
|
||||
implicit_optional = true
|
||||
|
||||
local_partial_types=true
|
||||
explicit_package_bases=true
|
||||
disable_error_code = "annotation-unchecked"
|
||||
|
||||
# https://beta.ruff.rs/docs/configuration/#using-pyprojecttoml
|
||||
[tool.ruff]
|
||||
indent-width = 2
|
||||
|
||||
Submodule rednose_repo updated: 023a6195db...90c891fe89
@@ -1,128 +0,0 @@
|
||||
#!/usr/bin/bash -e
|
||||
|
||||
# git diff --name-status origin/release3-staging | grep "^A" | less
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
cd $DIR
|
||||
|
||||
BUILD_DIR=/data/openpilot
|
||||
SOURCE_DIR="$(git rev-parse --show-toplevel)"
|
||||
|
||||
FILES_SRC="release/files_tici"
|
||||
DEV_BRANCH="dev-c3"
|
||||
|
||||
|
||||
# set git identity
|
||||
source $DIR/identity.sh
|
||||
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
rm -rf $BUILD_DIR
|
||||
mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
git init
|
||||
# set git username/password
|
||||
source /data/identity.sh
|
||||
git remote add origin https://github.com/sunnyhaibin/sunnypilot.git
|
||||
git fetch origin $DEV_BRANCH
|
||||
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR --parents $(cat release/files_common) $BUILD_DIR/
|
||||
cp -pR --parents $(cat $FILES_SRC) $BUILD_DIR/
|
||||
|
||||
# in the directory
|
||||
cd $BUILD_DIR
|
||||
|
||||
rm -f panda/board/obj/panda.bin.signed
|
||||
rm -f panda/board/obj/panda_h7.bin.signed
|
||||
rm -f panda/board/obj/bootstub.panda.bin
|
||||
rm -f panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
VERSION=$(date '+%Y.%m.%d')
|
||||
echo "#define COMMA_VERSION \"$VERSION-dev\"" > common/version.h
|
||||
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git commit -a -m "sunnypilot v$VERSION release"
|
||||
git branch --set-upstream-to=origin/$DEV_BRANCH
|
||||
|
||||
# Build panda firmware
|
||||
pushd panda/
|
||||
scons -u .
|
||||
mv board/obj/panda.bin.signed /tmp/panda.bin.signed
|
||||
mv board/obj/panda_h7.bin.signed /tmp/panda_h7.bin.signed
|
||||
mv board/obj/bootstub.panda.bin /tmp/bootstub.panda.bin
|
||||
mv board/obj/bootstub.panda_h7.bin /tmp/bootstub.panda_h7.bin
|
||||
popd
|
||||
|
||||
# Build
|
||||
export PYTHONPATH="$BUILD_DIR"
|
||||
scons -j$(nproc)
|
||||
|
||||
# Ensure no submodules in release
|
||||
if test "$(git submodule--helper list | wc -l)" -gt "0"; then
|
||||
echo "submodules found:"
|
||||
git submodule--helper list
|
||||
exit 1
|
||||
fi
|
||||
git submodule status
|
||||
|
||||
# Cleanup
|
||||
find . -name '*.a' -delete
|
||||
find . -name '*.o' -delete
|
||||
find . -name '*.os' -delete
|
||||
find . -name '*.pyc' -delete
|
||||
find . -name 'moc_*' -delete
|
||||
find . -name '*.cc' -delete
|
||||
find . -name '__pycache__' -delete
|
||||
find selfdrive/ui/ -name '*.h' -delete
|
||||
rm -rf panda/board panda/certs panda/crypto
|
||||
rm -rf .sconsign.dblite Jenkinsfile release/
|
||||
rm selfdrive/modeld/models/supercombo.onnx
|
||||
rm -rf selfdrive/ui/replay/
|
||||
# Move back signed panda fw
|
||||
mkdir -p panda/board/obj
|
||||
mv /tmp/panda.bin.signed panda/board/obj/panda.bin.signed
|
||||
mv /tmp/panda_h7.bin.signed panda/board/obj/panda_h7.bin.signed
|
||||
mv /tmp/bootstub.panda.bin panda/board/obj/bootstub.panda.bin
|
||||
mv /tmp/bootstub.panda_h7.bin panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
# Restore third_party
|
||||
git checkout third_party/
|
||||
|
||||
# Mark as prebuilt release
|
||||
touch prebuilt
|
||||
|
||||
# include source commit hash and build date in commit
|
||||
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD)
|
||||
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
|
||||
SP_VERSION=$(cat $SOURCE_DIR/common/version.h | awk -F\" '{print $2}')
|
||||
|
||||
# Add built files to git
|
||||
git add -f .
|
||||
git commit --amend -m "sunnypilot v$VERSION
|
||||
version: sunnypilot v$SP_VERSION release
|
||||
date: $DATETIME
|
||||
master commit: $GIT_HASH
|
||||
"
|
||||
git branch -m dev-c3
|
||||
|
||||
# Run tests
|
||||
#TEST_FILES="tools/"
|
||||
#cd $SOURCE_DIR
|
||||
#cp -pR -n --parents $TEST_FILES $BUILD_DIR/
|
||||
#cd $BUILD_DIR
|
||||
#RELEASE=1 selfdrive/test/test_onroad.py
|
||||
#selfdrive/manager/test/test_manager.py
|
||||
#selfdrive/car/tests/test_car_interfaces.py
|
||||
#rm -rf $TEST_FILES
|
||||
|
||||
if [ ! -z "$PUSH" ]; then
|
||||
echo "[-] pushing T=$SECONDS"
|
||||
git push -f origin $DEV_BRANCH
|
||||
fi
|
||||
|
||||
echo "[-] done T=$SECONDS"
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
@@ -19,17 +19,14 @@ fi
|
||||
|
||||
# set git identity
|
||||
source $DIR/identity.sh
|
||||
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
rm -rf $BUILD_DIR
|
||||
mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
git init
|
||||
# set git username/password
|
||||
source /data/identity.sh
|
||||
git remote add origin https://github.com/sunnyhaibin/sunnypilot.git
|
||||
git fetch origin $RELEASE_BRANCH
|
||||
git remote add origin git@github.com:commaai/openpilot.git
|
||||
git checkout --orphan $RELEASE_BRANCH
|
||||
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
@@ -41,23 +38,20 @@ cd $BUILD_DIR
|
||||
|
||||
rm -f panda/board/obj/panda.bin.signed
|
||||
rm -f panda/board/obj/panda_h7.bin.signed
|
||||
rm -f panda/board/obj/bootstub.panda.bin
|
||||
rm -f panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
VERSION=$(cat common/version.h | awk -F[\"-] '{print $2}')
|
||||
echo "#define COMMA_VERSION \"$VERSION-release\"" > common/version.h
|
||||
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git commit -a -m "sunnypilot v$VERSION release"
|
||||
git branch --set-upstream-to=origin/$RELEASE_BRANCH
|
||||
git commit -a -m "openpilot v$VERSION release"
|
||||
|
||||
# Build
|
||||
export PYTHONPATH="$BUILD_DIR"
|
||||
scons -j$(nproc) --minimal
|
||||
|
||||
# release panda fw
|
||||
scons -j$(nproc) panda/
|
||||
CERT=/data/pandaextra/certs/release RELEASE=1 scons -j$(nproc) panda/
|
||||
|
||||
# Ensure no submodules in release
|
||||
if test "$(git submodule--helper list | wc -l)" -gt "0"; then
|
||||
@@ -73,12 +67,9 @@ find . -name '*.o' -delete
|
||||
find . -name '*.os' -delete
|
||||
find . -name '*.pyc' -delete
|
||||
find . -name 'moc_*' -delete
|
||||
find . -name '*.cc' -delete
|
||||
find . -name '__pycache__' -delete
|
||||
find selfdrive/ui/ -name '*.h' -delete
|
||||
rm -rf .sconsign.dblite Jenkinsfile release/
|
||||
rm selfdrive/modeld/models/supercombo.onnx
|
||||
rm -rf selfdrive/ui/replay/
|
||||
|
||||
find third_party/ -name '*x86*' -exec rm -r {} +
|
||||
find third_party/ -name '*Darwin*' -exec rm -r {} +
|
||||
@@ -90,25 +81,19 @@ git checkout third_party/
|
||||
# Mark as prebuilt release
|
||||
touch prebuilt
|
||||
|
||||
# include source commit hash and build date in commit
|
||||
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD)
|
||||
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
|
||||
SP_VERSION=$(cat $SOURCE_DIR/common/version.h | awk -F\" '{print $2}')
|
||||
|
||||
# Add built files to git
|
||||
git add -f .
|
||||
git commit --amend -m "sunnypilot v$VERSION"
|
||||
git branch -m release-c3
|
||||
git commit --amend -m "openpilot v$VERSION"
|
||||
|
||||
# Run tests
|
||||
#TEST_FILES="tools/"
|
||||
#cd $SOURCE_DIR
|
||||
#cp -pR -n --parents $TEST_FILES $BUILD_DIR/
|
||||
#cd $BUILD_DIR
|
||||
#RELEASE=1 pytest -n0 -s selfdrive/test/test_onroad.py
|
||||
TEST_FILES="tools/"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR -n --parents $TEST_FILES $BUILD_DIR/
|
||||
cd $BUILD_DIR
|
||||
RELEASE=1 pytest -n0 -s selfdrive/test/test_onroad.py
|
||||
#system/manager/test/test_manager.py
|
||||
#pytest selfdrive/car/tests/test_car_interfaces.py
|
||||
#rm -rf $TEST_FILES
|
||||
pytest selfdrive/car/tests/test_car_interfaces.py
|
||||
rm -rf $TEST_FILES
|
||||
|
||||
if [ ! -z "$RELEASE_BRANCH" ]; then
|
||||
echo "[-] pushing release T=$SECONDS"
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
#!/usr/bin/bash -e
|
||||
|
||||
# git diff --name-status origin/release3-staging | grep "^A" | less
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
cd $DIR
|
||||
|
||||
BUILD_DIR=/data/openpilot
|
||||
SOURCE_DIR="$(git rev-parse --show-toplevel)"
|
||||
|
||||
FILES_SRC="release/files_tici"
|
||||
STAGING_BRANCH="staging-c3"
|
||||
|
||||
|
||||
# set git identity
|
||||
source $DIR/identity.sh
|
||||
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
rm -rf $BUILD_DIR
|
||||
mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
git init
|
||||
# set git username/password
|
||||
source /data/identity.sh
|
||||
git remote add origin https://github.com/sunnyhaibin/sunnypilot.git
|
||||
git fetch origin $STAGING_BRANCH
|
||||
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR --parents $(cat release/files_common) $BUILD_DIR/
|
||||
cp -pR --parents $(cat $FILES_SRC) $BUILD_DIR/
|
||||
|
||||
# in the directory
|
||||
cd $BUILD_DIR
|
||||
|
||||
rm -f panda/board/obj/panda.bin.signed
|
||||
rm -f panda/board/obj/panda_h7.bin.signed
|
||||
rm -f panda/board/obj/bootstub.panda.bin
|
||||
rm -f panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
VERSION=$(cat common/version.h | awk -F[\"-] '{print $2}')
|
||||
echo "#define COMMA_VERSION \"$VERSION-staging\"" > common/version.h
|
||||
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git commit -a -m "sunnypilot v$VERSION release"
|
||||
git branch --set-upstream-to=origin/$STAGING_BRANCH
|
||||
|
||||
# Build panda firmware
|
||||
pushd panda/
|
||||
scons -u .
|
||||
mv board/obj/panda.bin.signed /tmp/panda.bin.signed
|
||||
mv board/obj/panda_h7.bin.signed /tmp/panda_h7.bin.signed
|
||||
mv board/obj/bootstub.panda.bin /tmp/bootstub.panda.bin
|
||||
mv board/obj/bootstub.panda_h7.bin /tmp/bootstub.panda_h7.bin
|
||||
popd
|
||||
|
||||
# Build
|
||||
export PYTHONPATH="$BUILD_DIR"
|
||||
scons -j$(nproc)
|
||||
|
||||
# Ensure no submodules in release
|
||||
if test "$(git submodule--helper list | wc -l)" -gt "0"; then
|
||||
echo "submodules found:"
|
||||
git submodule--helper list
|
||||
exit 1
|
||||
fi
|
||||
git submodule status
|
||||
|
||||
# Cleanup
|
||||
find . -name '*.a' -delete
|
||||
find . -name '*.o' -delete
|
||||
find . -name '*.os' -delete
|
||||
find . -name '*.pyc' -delete
|
||||
find . -name 'moc_*' -delete
|
||||
find . -name '*.cc' -delete
|
||||
find . -name '__pycache__' -delete
|
||||
find selfdrive/ui/ -name '*.h' -delete
|
||||
rm -rf panda/board panda/certs panda/crypto
|
||||
rm -rf .sconsign.dblite Jenkinsfile release/
|
||||
rm selfdrive/modeld/models/supercombo.onnx
|
||||
#rm models/supercombo_badweights.thneed
|
||||
rm -rf selfdrive/ui/replay/
|
||||
# Move back signed panda fw
|
||||
mkdir -p panda/board/obj
|
||||
mv /tmp/panda.bin.signed panda/board/obj/panda.bin.signed
|
||||
mv /tmp/panda_h7.bin.signed panda/board/obj/panda_h7.bin.signed
|
||||
mv /tmp/bootstub.panda.bin panda/board/obj/bootstub.panda.bin
|
||||
mv /tmp/bootstub.panda_h7.bin panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
# Restore third_party
|
||||
git checkout third_party/
|
||||
|
||||
# Mark as prebuilt release
|
||||
touch prebuilt
|
||||
|
||||
# include source commit hash and build date in commit
|
||||
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD)
|
||||
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
|
||||
SP_VERSION=$(cat $SOURCE_DIR/common/version.h | awk -F\" '{print $2}')
|
||||
|
||||
# Add built files to git
|
||||
git add -f .
|
||||
git commit --amend -m "sunnypilot v$VERSION"
|
||||
git branch -m staging-c3
|
||||
|
||||
# Run tests
|
||||
#TEST_FILES="tools/"
|
||||
#cd $SOURCE_DIR
|
||||
#cp -pR -n --parents $TEST_FILES $BUILD_DIR/
|
||||
#cd $BUILD_DIR
|
||||
#RELEASE=1 selfdrive/test/test_onroad.py
|
||||
#selfdrive/manager/test/test_manager.py
|
||||
#selfdrive/car/tests/test_car_interfaces.py
|
||||
#rm -rf $TEST_FILES
|
||||
|
||||
if [ ! -z "$PUSH" ]; then
|
||||
echo "[-] pushing T=$SECONDS"
|
||||
git push -f origin $STAGING_BRANCH
|
||||
fi
|
||||
|
||||
echo "[-] done T=$SECONDS"
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
while read hash submodule ref; do
|
||||
git -C $submodule fetch --depth 3000 origin master
|
||||
git -C $submodule fetch --depth 4000 origin master
|
||||
git -C $submodule branch -r --contains $hash | grep "origin/master"
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "$submodule ok"
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# UNUSED YET BUT I WANT TO KEEP IT BECAUSE I INTEND TO USE IT SOON
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# set -e
|
||||
|
||||
# DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
# cd $DIR
|
||||
|
||||
# # Take parameters as arguments
|
||||
# SOURCE_DIR=$1
|
||||
# OUTPUT_DIR=$2
|
||||
|
||||
# # Check parameters
|
||||
# if [ -z "$SOURCE_DIR" ] || [ -z "$OUTPUT_DIR" ]; then
|
||||
# echo "Error: No source or output directory provided."
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
# if [ -z "$TARGETPLATFORM" ]; then
|
||||
# # Detect the platform (e.g., x86_64, aarch64, etc.)
|
||||
# platform=$(uname -m)
|
||||
|
||||
# # Map to Docker's platform syntax
|
||||
# if [ "$platform" = "x86_64" ]; then
|
||||
# TARGETPLATFORM="linux/amd64"
|
||||
# elif [ "$platform" = "aarch64" ]; then
|
||||
# TARGETPLATFORM="linux/arm64"
|
||||
# # Add here more elif statements for other architectures if needed.
|
||||
# else
|
||||
# echo "Unknown platform: $platform"
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
# export TARGETPLATFORM
|
||||
# fi
|
||||
|
||||
# echo "TARGETPLATFORM IS: [${TARGETPLATFORM}]"
|
||||
|
||||
# # Let's bring the submodules!
|
||||
# git submodule update --init --recursive
|
||||
|
||||
# # Build
|
||||
# docker compose -f ${SOURCE_DIR}/docker-compose.yml build
|
||||
# docker compose -f ${SOURCE_DIR}/docker-compose.yml up
|
||||
@@ -1,27 +0,0 @@
|
||||
# UNUSED YET BUT I WANT TO KEEP IT BECAUSE I INTEND TO USE IT SOON
|
||||
|
||||
# #!/usr/bin/env bash
|
||||
# DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
# cd $DIR
|
||||
|
||||
# DEV_BRANCH=$1
|
||||
# GIT_ORIGIN=$2
|
||||
# if [ -z "$DEV_BRANCH" ]; then
|
||||
# DEV_BRANCH="dev-c3-test"
|
||||
# fi
|
||||
|
||||
# if [ -z "$GIT_ORIGIN" ]; then
|
||||
# GIT_ORIGIN="git@github.com:devtekve/openpilot-og.git" #This is a default that should be changed
|
||||
# echo "No GIT_ORIGIN provided, we will use the default [${GIT_ORIGIN}]"
|
||||
# fi
|
||||
|
||||
# VERSION=$(date '+%Y.%m.%d')
|
||||
# SOURCE_DIR="$(git rev-parse --show-toplevel)"
|
||||
# OUTPUT_DIR=${SOURCE_DIR}/output
|
||||
|
||||
|
||||
# echo "Calling to build [${DIR}/build.sh ${SOURCE_DIR} ${OUTPUT_DIR} ${VERSION}]"
|
||||
# $DIR/build.sh "${SOURCE_DIR}" "${OUTPUT_DIR}" "${VERSION}"
|
||||
|
||||
# echo "Calling to publish [${DIR}/publish.sh ${SOURCE_DIR} ${OUTPUT_DIR} ${DEV_BRANCH} ${VERSION} ${GIT_ORIGIN}]"
|
||||
# $DIR/publish.sh "${SOURCE_DIR}" "${OUTPUT_DIR}" "${DEV_BRANCH}" "${VERSION}" "${GIT_ORIGIN}"
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"title": "❗️ Action Required for `${CI_COMMIT_REF_NAME}` ❗️",
|
||||
"description": "[${CI_PROJECT_NAME}](${CI_PROJECT_URL}): Pipeline [#${CI_PIPELINE_ID}](${CI_PROJECT_URL}/-/pipelines/${CI_PIPELINE_ID}) of branch [${CI_COMMIT_REF_NAME}](${CI_PROJECT_URL}/-/commits/${CI_COMMIT_REF_NAME}) by ${GITLAB_USER_NAME} (${GITLAB_USER_LOGIN}) is ready to publish manually as [${NEW_BRANCH}](${PUBLIC_REPO_URL}/tree/${NEW_BRANCH})",
|
||||
"color": 16763904,
|
||||
"author": {
|
||||
"name": "${GITLAB_USER_LOGIN}",
|
||||
"icon_url": "${AVATAR_URL}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"title": "🎉 sunnypilot `${NEW_BRANCH}` New Update 🎉",
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Check if script arguments are present, if not exit the script
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "No arguments provided. A GitLab token is required to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Constants
|
||||
GITLAB_RUNNER_DOWNLOAD_URL="https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm64"
|
||||
GITLAB_RUNNER_USER_NAME="gitlab-runner"
|
||||
USER_GROUPS="comma,gpu,gpio,sudo"
|
||||
GITLAB_BASE_DIR="/data/gitlab"
|
||||
GITLAB_BIN_DIR="${GITLAB_BASE_DIR}/bin"
|
||||
GITLAB_BUILDS_DIR="${GITLAB_BASE_DIR}/builds"
|
||||
GITLAB_LOGS_DIR="${GITLAB_BASE_DIR}/logs"
|
||||
GITLAB_CACHE_DIR="${GITLAB_BASE_DIR}/cache"
|
||||
GITLAB_OPENPILOT_DIR="${GITLAB_BASE_DIR}/openpilot"
|
||||
SERVICE_NAME="gitlab-runner"
|
||||
|
||||
create_gitlab_runner_directories() {
|
||||
sudo mkdir -p "$GITLAB_BIN_DIR" "$GITLAB_BUILDS_DIR" "$GITLAB_LOGS_DIR" "$GITLAB_CACHE_DIR" "$GITLAB_OPENPILOT_DIR"
|
||||
mkdir -p "/data/openpilot"
|
||||
sudo chown -R comma:comma "/data/openpilot"
|
||||
}
|
||||
|
||||
download_and_setup_gitlab_runner() {
|
||||
sudo curl -L --output "$GITLAB_BIN_DIR/gitlab-runner" "$GITLAB_RUNNER_DOWNLOAD_URL"
|
||||
sudo chmod +x "$GITLAB_BIN_DIR/gitlab-runner"
|
||||
}
|
||||
|
||||
setup_gitlab_runner_user() {
|
||||
sudo useradd --comment 'GitLab Runner' --create-home --home-dir ${GITLAB_BASE_DIR} ${GITLAB_RUNNER_USER_NAME} --shell /bin/bash -G ${USER_GROUPS} || sudo usermod -aG ${USER_GROUPS} ${GITLAB_RUNNER_USER_NAME}
|
||||
export GITLAB_BASE_DIR # Export it to make it available to sub-processes
|
||||
sudo -u ${GITLAB_RUNNER_USER_NAME} bash -c "truncate -s 0 '${GITLAB_BASE_DIR}/.bash_logout'"
|
||||
}
|
||||
|
||||
create_sudoers_entry() {
|
||||
sudo grep -qxF "${GITLAB_RUNNER_USER_NAME} ALL=(ALL) NOPASSWD: ALL" /etc/sudoers || echo "${GITLAB_RUNNER_USER_NAME} ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
|
||||
}
|
||||
|
||||
generate_gitlab_config_file() {
|
||||
cat <<EOL | sudo tee "$GITLAB_BASE_DIR/config.toml"
|
||||
[[runners]]
|
||||
name = "tici"
|
||||
url = "https://gitlab.com/"
|
||||
token = "$1"
|
||||
executor = "shell"
|
||||
builds_dir = "$GITLAB_BUILDS_DIR"
|
||||
[runners.custom_build_dir]
|
||||
[runners.docker]
|
||||
volumes = ["$GITLAB_CACHE_DIR:/cache"]
|
||||
[runners.cache]
|
||||
MaxUploadedArchiveSize = 0
|
||||
[runners.custom]
|
||||
config_exec = "$GITLAB_LOGS_DIR"
|
||||
EOL
|
||||
}
|
||||
|
||||
set_gitlab_directory_permissions() {
|
||||
sudo chown -R ${GITLAB_RUNNER_USER_NAME}:comma "$GITLAB_BASE_DIR"
|
||||
sudo chmod g+rwx "$GITLAB_BASE_DIR"
|
||||
sudo chmod g+s "$GITLAB_BASE_DIR"
|
||||
}
|
||||
|
||||
# Please note that when the gitlab runner is started, linux implicitly executes "source /etc/profile" for every logged shell. This will make scons available
|
||||
create_gitlab_runner_service() {
|
||||
cat <<EOL | sudo tee /etc/systemd/system/${SERVICE_NAME}.service
|
||||
[Unit]
|
||||
Description=GitLab Runner
|
||||
After=syslog.target network.target
|
||||
ConditionFileIsExecutable=$GITLAB_BIN_DIR/gitlab-runner
|
||||
[Service]
|
||||
StartLimitInterval=5
|
||||
StartLimitBurst=10
|
||||
ExecStart=/usr/bin/unshare -m -- sh -c 'mount --bind $GITLAB_OPENPILOT_DIR /data/openpilot && exec $GITLAB_BIN_DIR/gitlab-runner "run" "--working-directory" "$GITLAB_BUILDS_DIR" "--config" "$GITLAB_BASE_DIR/config.toml" "--service" "gitlab-runner" "--syslog" "--user" "${GITLAB_RUNNER_USER_NAME}"'
|
||||
Restart=always
|
||||
RestartSec=120
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOL
|
||||
}
|
||||
|
||||
start_gitlab_runner_service() {
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl disable gitlab-runner # Intentionally making sure the service is NOT enabled on boot.
|
||||
sudo systemctl start gitlab-runner
|
||||
}
|
||||
|
||||
# Make the filesystem writable
|
||||
sudo mount -o remount,rw /
|
||||
|
||||
# Ensure filesystem is remounted as read-only on script exit
|
||||
trap "sudo mount -o remount,ro /" EXIT
|
||||
|
||||
# Call functions
|
||||
setup_gitlab_runner_user
|
||||
create_sudoers_entry
|
||||
create_gitlab_runner_directories
|
||||
download_and_setup_gitlab_runner
|
||||
generate_gitlab_config_file "$1"
|
||||
set_gitlab_directory_permissions
|
||||
create_gitlab_runner_service
|
||||
start_gitlab_runner_service
|
||||
|
||||
# End of install script
|
||||
@@ -1,78 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
cd $DIR
|
||||
|
||||
# Take parameters as arguments
|
||||
SOURCE_DIR=$1
|
||||
OUTPUT_DIR=$2
|
||||
DEV_BRANCH=$3
|
||||
VERSION=$4
|
||||
GIT_ORIGIN=$5
|
||||
EXTRA_VERSION_IDENTIFIER=$6
|
||||
|
||||
# Check parameters
|
||||
if [ -z "$SOURCE_DIR" ] || [ -z "$OUTPUT_DIR" ]; then
|
||||
echo "Error: No source or output directory provided."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$DEV_BRANCH" ] || [ -z "$VERSION" ]; then
|
||||
echo "Error: No dev branch or version provided."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$GIT_ORIGIN" ]; then
|
||||
echo "Error: No GIT_ORIGIN provided"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# "Tagging"
|
||||
echo "#define COMMA_VERSION \"$VERSION\"" > ${OUTPUT_DIR}/common/version.h
|
||||
|
||||
## set git identity
|
||||
#source $DIR/identity.sh
|
||||
#export GIT_SSH_COMMAND="ssh -i /data/gitkey"
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
cd $OUTPUT_DIR
|
||||
git init
|
||||
|
||||
# set git username/password
|
||||
#source /data/identity.sh
|
||||
|
||||
git rm -rf $OUTPUT_DIR/.git || true # Doing cleanup, but it might fail if the .git doesn't exist or not allowed to delete
|
||||
git remote remove origin || true # ensure cleanup
|
||||
git remote add origin $GIT_ORIGIN
|
||||
#git push origin -d $DEV_BRANCH || true # Ensuring we delete the remote branch if it exists as we are wiping it out
|
||||
git fetch origin $DEV_BRANCH || (git checkout -b $DEV_BRANCH && git commit --allow-empty -m "sunnypilot v$VERSION release" && git push -u origin $DEV_BRANCH)
|
||||
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git commit -a -m "sunnypilot v$VERSION release"
|
||||
git branch --set-upstream-to=origin/$DEV_BRANCH
|
||||
|
||||
# include source commit hash and build date in commit
|
||||
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD)
|
||||
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
|
||||
SP_VERSION=$(cat $SOURCE_DIR/common/version.h | awk -F\" '{print $2}')
|
||||
|
||||
# Add built files to git
|
||||
git add -f .
|
||||
if [ "$EXTRA_VERSION_IDENTIFIER" = "-release" ] || [ "$EXTRA_VERSION_IDENTIFIER" = "-staging" ]; then
|
||||
export VERSION=${VERSION%"$EXTRA_VERSION_IDENTIFIER"}
|
||||
git commit --amend -m "sunnypilot v$VERSION"
|
||||
else
|
||||
git commit --amend -m "sunnypilot v$VERSION
|
||||
version: sunnypilot v$SP_VERSION release
|
||||
date: $DATETIME
|
||||
master commit: $GIT_HASH
|
||||
"
|
||||
fi
|
||||
git branch -m $DEV_BRANCH
|
||||
|
||||
# Push!
|
||||
echo "[-] pushing T=$SECONDS"
|
||||
git push -f origin $DEV_BRANCH
|
||||
@@ -1,75 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Check if the correct number of arguments are provided
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Error: Missing required arguments."
|
||||
echo "Usage: $0 \"ext1,ext2,...\" \"dir1,dir2,...\" [expect_no_match]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Convert comma-separated lists of extensions and directory patterns to arrays
|
||||
IFS=',' read -r -a file_extensions <<< "$1"
|
||||
IFS=',' read -r -a dir_patterns <<< "$2"
|
||||
|
||||
# Boolean argument to determine the script's behavior when matches are found
|
||||
expect_no_match=${3:-true} # Default to true if not provided
|
||||
|
||||
# Validate that file_extensions and dir_patterns are not empty
|
||||
if [ ${#file_extensions[@]} -eq 0 ]; then
|
||||
echo "Error: No file extensions provided."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ${#dir_patterns[@]} -eq 0 ]; then
|
||||
echo "Error: No directory patterns provided."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Define the command and arguments as an array
|
||||
find_command=(find . \( -false)
|
||||
|
||||
for ext in "${file_extensions[@]}"; do
|
||||
find_command+=(-o -type f -name "*$ext")
|
||||
done
|
||||
for dir in "${dir_patterns[@]}"; do
|
||||
find_command+=(-o -type d -path "$dir")
|
||||
done
|
||||
|
||||
find_command+=(\) -print)
|
||||
|
||||
# Debug print
|
||||
echo "Executing find_command ${find_command[@]}"
|
||||
# Execute the find command
|
||||
FOUND=$("${find_command[@]}")
|
||||
|
||||
# Function to handle found matches
|
||||
handle_found() {
|
||||
local count=$(echo "$FOUND" | grep -c '^')
|
||||
if [ "$expect_no_match" = true ]; then
|
||||
echo "Failure: Unexpected match$( [ "$count" -gt 1 ] && echo "es" ) found ($count):"
|
||||
echo "$FOUND"
|
||||
exit 1
|
||||
else
|
||||
echo "Success: Expected match$( [ "$count" -gt 1 ] && echo "es" ) found ($count):"
|
||||
echo "$FOUND"
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to handle no matches found
|
||||
handle_not_found() {
|
||||
if [ "$expect_no_match" = false ]; then
|
||||
echo "Failure: Expected matches not found."
|
||||
exit 1
|
||||
else
|
||||
echo "Success: No matches found as expected."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if any files or directories are found and handle accordingly
|
||||
if [ -n "$FOUND" ]; then
|
||||
handle_found
|
||||
else
|
||||
handle_not_found
|
||||
fi
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
mv .lfsconfig .lfsconfig.bak
|
||||
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 --all origin
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Define directories and user
|
||||
GITLAB_BASE_DIR="/data/gitlab"
|
||||
BIN_DIR="$GITLAB_BASE_DIR/bin"
|
||||
BUILDS_DIR="$GITLAB_BASE_DIR/builds"
|
||||
OPENPILOT_DIR="$GITLAB_BASE_DIR/openpilot"
|
||||
LOGS_DIR="$GITLAB_BASE_DIR/logs"
|
||||
CACHE_DIR="$GITLAB_BASE_DIR/cache"
|
||||
RUNNER_USERNAME="gitlab-runner"
|
||||
# Define the systemd service name
|
||||
SERVICE_NAME="gitlab-runner"
|
||||
USER_GROUPS="comma,gpu,gpio,sudo"
|
||||
|
||||
# Function to stop and disable the systemd service
|
||||
stop_service() {
|
||||
sudo systemctl stop ${SERVICE_NAME}
|
||||
sudo systemctl disable ${SERVICE_NAME}
|
||||
}
|
||||
|
||||
# Function to remove the systemd service file
|
||||
remove_service_file() {
|
||||
sudo rm /etc/systemd/system/${SERVICE_NAME}.service
|
||||
sudo systemctl daemon-reload
|
||||
}
|
||||
|
||||
# Function to delete the GitLab Runner directories
|
||||
delete_directories() {
|
||||
sudo rm -rf "$BIN_DIR/gitlab-runner"
|
||||
sudo rm -rf "$GITLAB_BASE_DIR" "$BIN_DIR" "$BUILDS_DIR" "$LOGS_DIR" "$CACHE_DIR" "$OPENPILOT_DIR"
|
||||
}
|
||||
|
||||
# Function to remove the GitLab Runner user
|
||||
delete_user() {
|
||||
for group in ${USER_GROUPS//,/ }
|
||||
do
|
||||
sudo gpasswd -d ${RUNNER_USERNAME} ${group}
|
||||
done
|
||||
sudo userdel -r ${RUNNER_USERNAME}
|
||||
}
|
||||
|
||||
# Function to remove sudoers entry
|
||||
remove_sudoers_entry() {
|
||||
sudo sed -i.bak "/${RUNNER_USERNAME} ALL=(ALL) NOPASSWD: ALL/d" /etc/sudoers
|
||||
}
|
||||
|
||||
# Make filesystem writable
|
||||
sudo mount -o remount rw /
|
||||
|
||||
# Ensure filesystem is remounted as read-only on script exit
|
||||
trap "sudo mount -o remount ro /" EXIT
|
||||
|
||||
# Call functions
|
||||
stop_service
|
||||
remove_service_file
|
||||
delete_directories
|
||||
delete_user
|
||||
remove_sudoers_entry
|
||||
# End of uninstall script
|
||||
@@ -1,4 +0,0 @@
|
||||
third_party/libyuv/x86_64/**
|
||||
third_party/snpe/x86_64/**
|
||||
third_party/snpe/x86_64-linux-clang/**
|
||||
third_party/acados/x86_64/**
|
||||
@@ -1,15 +0,0 @@
|
||||
third_party/libyuv/larch64/**
|
||||
third_party/snpe/larch64**
|
||||
third_party/snpe/aarch64-ubuntu-gcc7.5/*
|
||||
third_party/acados/larch64/**
|
||||
|
||||
system/camerad/cameras/camera_qcom2.cc
|
||||
system/camerad/cameras/camera_qcom2.h
|
||||
system/camerad/cameras/camera_util.cc
|
||||
system/camerad/cameras/camera_util.h
|
||||
system/camerad/cameras/process_raw.cl
|
||||
|
||||
system/qcomgpsd/*
|
||||
|
||||
selfdrive/ui/qt/spinner_larch64
|
||||
selfdrive/ui/qt/text_larch64
|
||||
@@ -1,4 +1,4 @@
|
||||
export GIT_COMMITTER_NAME="Jason Wen"
|
||||
export GIT_COMMITTER_EMAIL="haibin.wen3@gmail.com"
|
||||
export GIT_AUTHOR_NAME="Jason Wen"
|
||||
export GIT_AUTHOR_EMAIL="haibin.wen3@gmail.com"
|
||||
export GIT_COMMITTER_NAME="Vehicle Researcher"
|
||||
export GIT_COMMITTER_EMAIL="user@comma.ai"
|
||||
export GIT_AUTHOR_NAME="Vehicle Researcher"
|
||||
export GIT_AUTHOR_EMAIL="user@comma.ai"
|
||||
|
||||
@@ -34,7 +34,7 @@ blacklist = [
|
||||
".github/",
|
||||
".devcontainer/",
|
||||
"Darwin/",
|
||||
".vscode/",
|
||||
".vscode",
|
||||
|
||||
# common things
|
||||
"LICENSE",
|
||||
@@ -48,52 +48,10 @@ blacklist = [
|
||||
".gitmodules",
|
||||
]
|
||||
|
||||
# Sunnypilot blacklist
|
||||
sunnypilot_blacklist = [
|
||||
"system/loggerd/sunnylink_uploader.py", # Temporarily, until we are ready to roll it out widely
|
||||
"system/manager/gitlab_runner.sh",
|
||||
".idea/",
|
||||
".run/",
|
||||
".run/",
|
||||
".*__pycache__/.*",
|
||||
".*\.pyc",
|
||||
"tinygrad/*",
|
||||
"teleoprtc/*",
|
||||
"third_party/snpe/x86_64/*",
|
||||
"body/board/canloader.py",
|
||||
"body/board/flash_base.sh",
|
||||
"body/board/flash_knee.sh",
|
||||
"body/board/recover.sh",
|
||||
".*/test/",
|
||||
".*/tests/",
|
||||
".*tinygrad_repo/tinygrad/renderer/",
|
||||
"README.md",
|
||||
".*internal/",
|
||||
"docs/.*",
|
||||
".sconsign.dblite",
|
||||
"release/ci/scons_cache/",
|
||||
".gitlab-ci.yml",
|
||||
".clang-tidy",
|
||||
".dockerignore",
|
||||
".editorconfig",
|
||||
".gitmodules",
|
||||
".pre-commit-config.yaml",
|
||||
".python-version",
|
||||
"Dockerfile",
|
||||
"dockerfile",
|
||||
"SECURITY.md",
|
||||
"codecov.yml",
|
||||
"conftest.py",
|
||||
"poetry.lock",
|
||||
]
|
||||
|
||||
# Merge the blacklists
|
||||
blacklist += sunnypilot_blacklist
|
||||
|
||||
# gets you through the blacklist
|
||||
whitelist = [
|
||||
"^tools/lib/(?!.*__pycache__).*$",
|
||||
"tools/bodyteleop/(?!.*__pycache__).*$",
|
||||
"tools/lib/",
|
||||
"tools/bodyteleop/",
|
||||
|
||||
"tinygrad_repo/openpilot/compile2.py",
|
||||
"tinygrad_repo/extra/onnx.py",
|
||||
@@ -160,53 +118,8 @@ whitelist = [
|
||||
"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
|
||||
sunnypilot_whitelist = [
|
||||
"^README.md",
|
||||
".*selfdrive/test/fuzzy_generation.py",
|
||||
".*selfdrive/test/helpers.py",
|
||||
".*selfdrive/test/__init__.py",
|
||||
".*selfdrive/test/setup_device_ci.sh",
|
||||
".*selfdrive/test/test_time_to_onroad.py",
|
||||
".*selfdrive/test/test_onroad.py",
|
||||
".*system/manager/test/test_manager.py",
|
||||
".*system/manager/test/__init__.py",
|
||||
".*system/qcomgpsd/tests/test_qcomgpsd.py",
|
||||
".*system/updated/casync/tests/test_casync.py",
|
||||
".*system/updated/tests/test_git.py",
|
||||
".*system/updated/tests/test_base.py",
|
||||
".*tools/lib/tests/test_route_library.py",
|
||||
".*tools/lib/tests/test_caching.py",
|
||||
".*tools/lib/tests/test_logreader.py",
|
||||
".*tools/lib/tests/test_readers.py",
|
||||
".*tools/lib/tests/__init__.py",
|
||||
".*tools/lib/tests/test_comma_car_segments.py",
|
||||
".*selfdrive/ui/tests/test_translations.py",
|
||||
".*selfdrive/car/tests/__init__.py",
|
||||
".*selfdrive/car/tests/test_car_interfaces.py",
|
||||
".*selfdrive/navd/tests/test_navd.py",
|
||||
".*selfdrive/navd/tests/test_map_renderer.py",
|
||||
".*selfdrive/boardd/tests/test_boardd_loopback.py",
|
||||
".*tinygrad_repo/tinygrad/renderer/opencl.py",
|
||||
".*tinygrad_repo/tinygrad/renderer/cstyle.py",
|
||||
".*INTEGRATION.md",
|
||||
".*HOW-TOS.md",
|
||||
".*CARS.md",
|
||||
".*LIMITATIONS.md",
|
||||
".*CONTRIBUTING.md",
|
||||
".*sunnyhaibin0850_qrcode_paypal.me.png",
|
||||
"opendbc/.*.dbc",
|
||||
]
|
||||
|
||||
# Merge the whitelists
|
||||
whitelist += sunnypilot_whitelist
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
for f in Path(ROOT).rglob("**/*"):
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
#!/usr/bin/bash -e
|
||||
|
||||
# git diff --name-status origin/release3-staging | grep "^A" | less
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
cd $DIR
|
||||
|
||||
BUILD_DIR=/data/media/openpilot-dev
|
||||
SOURCE_DIR="$(git rev-parse --show-toplevel)"
|
||||
|
||||
FILES_SRC="release/files_tici"
|
||||
DEV_BRANCH="dev-c3"
|
||||
|
||||
BUILD_PANDA_DIR=/data/media/panda/openpilot-dev
|
||||
|
||||
|
||||
# set git identity
|
||||
source $DIR/identity.sh
|
||||
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
rm -rf $BUILD_DIR
|
||||
mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
git init
|
||||
# set git username/password
|
||||
source /data/identity.sh
|
||||
git remote add origin https://github.com/sunnyhaibin/sunnypilot.git
|
||||
git fetch origin $DEV_BRANCH
|
||||
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR --parents $(cat release/files_common) $BUILD_DIR/
|
||||
cp -pR --parents $(cat $FILES_SRC) $BUILD_DIR/
|
||||
|
||||
# in the directory
|
||||
cd $BUILD_DIR
|
||||
|
||||
rm -f panda/board/obj/panda.bin.signed
|
||||
rm -f panda/board/obj/panda_h7.bin.signed
|
||||
rm -f panda/board/obj/bootstub.panda.bin
|
||||
rm -f panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
VERSION=$(date '+%Y.%m.%d')
|
||||
echo "#define COMMA_VERSION \"$VERSION-dev\"" > common/version.h
|
||||
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git commit -a -m "sunnypilot v$VERSION release"
|
||||
git branch --set-upstream-to=origin/$DEV_BRANCH
|
||||
|
||||
# Build panda firmware
|
||||
pushd panda/
|
||||
scons -u .
|
||||
mv board/obj/panda.bin.signed $BUILD_PANDA_DIR/panda.bin.signed
|
||||
mv board/obj/panda_h7.bin.signed $BUILD_PANDA_DIR/panda_h7.bin.signed
|
||||
mv board/obj/bootstub.panda.bin $BUILD_PANDA_DIR/bootstub.panda.bin
|
||||
mv board/obj/bootstub.panda_h7.bin $BUILD_PANDA_DIR/bootstub.panda_h7.bin
|
||||
popd
|
||||
|
||||
# Build
|
||||
export PYTHONPATH="$BUILD_DIR"
|
||||
scons -j$(nproc)
|
||||
|
||||
# Ensure no submodules in release
|
||||
if test "$(git submodule--helper list | wc -l)" -gt "0"; then
|
||||
echo "submodules found:"
|
||||
git submodule--helper list
|
||||
exit 1
|
||||
fi
|
||||
git submodule status
|
||||
|
||||
# Cleanup
|
||||
find . -name '*.a' -delete
|
||||
find . -name '*.o' -delete
|
||||
find . -name '*.os' -delete
|
||||
find . -name '*.pyc' -delete
|
||||
find . -name 'moc_*' -delete
|
||||
find . -name '*.cc' -delete
|
||||
find . -name '__pycache__' -delete
|
||||
find selfdrive/ui/ -name '*.h' -delete
|
||||
rm -rf panda/board panda/certs panda/crypto
|
||||
rm -rf .sconsign.dblite Jenkinsfile release/
|
||||
rm selfdrive/modeld/models/supercombo.onnx
|
||||
rm -rf selfdrive/ui/replay/
|
||||
# Move back signed panda fw
|
||||
mkdir -p panda/board/obj
|
||||
mv $BUILD_PANDA_DIR/panda.bin.signed panda/board/obj/panda.bin.signed
|
||||
mv $BUILD_PANDA_DIR/panda_h7.bin.signed panda/board/obj/panda_h7.bin.signed
|
||||
mv $BUILD_PANDA_DIR/bootstub.panda.bin panda/board/obj/bootstub.panda.bin
|
||||
mv $BUILD_PANDA_DIR/bootstub.panda_h7.bin panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
# Restore third_party
|
||||
git checkout third_party/
|
||||
|
||||
# Mark as prebuilt release
|
||||
touch prebuilt
|
||||
|
||||
# include source commit hash and build date in commit
|
||||
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD)
|
||||
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
|
||||
SP_VERSION=$(cat $SOURCE_DIR/common/version.h | awk -F\" '{print $2}')
|
||||
|
||||
# Add built files to git
|
||||
git add -f .
|
||||
git commit --amend -m "sunnypilot v$VERSION
|
||||
version: sunnypilot v$SP_VERSION release
|
||||
date: $DATETIME
|
||||
master commit: $GIT_HASH
|
||||
"
|
||||
git branch -m dev-c3
|
||||
|
||||
# Run tests
|
||||
#TEST_FILES="tools/"
|
||||
#cd $SOURCE_DIR
|
||||
#cp -pR -n --parents $TEST_FILES $BUILD_DIR/
|
||||
#cd $BUILD_DIR
|
||||
#RELEASE=1 selfdrive/test/test_onroad.py
|
||||
#selfdrive/manager/test/test_manager.py
|
||||
#selfdrive/car/tests/test_car_interfaces.py
|
||||
#rm -rf $TEST_FILES
|
||||
|
||||
if [ ! -z "$PUSH" ]; then
|
||||
echo "[-] pushing T=$SECONDS"
|
||||
git push -f origin $DEV_BRANCH
|
||||
fi
|
||||
|
||||
echo "[-] done T=$SECONDS"
|
||||
@@ -1,127 +0,0 @@
|
||||
#!/usr/bin/bash -e
|
||||
|
||||
# git diff --name-status origin/release3-staging | grep "^A" | less
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
cd $DIR
|
||||
|
||||
BUILD_DIR=/data/media/openpilot-release
|
||||
SOURCE_DIR="$(git rev-parse --show-toplevel)"
|
||||
|
||||
FILES_SRC="release/files_tici"
|
||||
RELEASE_BRANCH="release-c3"
|
||||
|
||||
BUILD_PANDA_DIR=/data/media/panda/openpilot-release
|
||||
|
||||
|
||||
# set git identity
|
||||
source $DIR/identity.sh
|
||||
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
rm -rf $BUILD_DIR
|
||||
mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
git init
|
||||
# set git username/password
|
||||
source /data/identity.sh
|
||||
git remote add origin https://github.com/sunnyhaibin/sunnypilot.git
|
||||
git fetch origin $RELEASE_BRANCH
|
||||
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR --parents $(cat release/files_common) $BUILD_DIR/
|
||||
cp -pR --parents $(cat $FILES_SRC) $BUILD_DIR/
|
||||
|
||||
# in the directory
|
||||
cd $BUILD_DIR
|
||||
|
||||
rm -f panda/board/obj/panda.bin.signed
|
||||
rm -f panda/board/obj/panda_h7.bin.signed
|
||||
rm -f panda/board/obj/bootstub.panda.bin
|
||||
rm -f panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
VERSION=$(cat common/version.h | awk -F[\"-] '{print $2}')
|
||||
echo "#define COMMA_VERSION \"$VERSION-release\"" > common/version.h
|
||||
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git commit -a -m "sunnypilot v$VERSION release"
|
||||
git branch --set-upstream-to=origin/$RELEASE_BRANCH
|
||||
|
||||
# Build panda firmware
|
||||
pushd panda/
|
||||
scons -u .
|
||||
mv board/obj/panda.bin.signed $BUILD_PANDA_DIR/panda.bin.signed
|
||||
mv board/obj/panda_h7.bin.signed $BUILD_PANDA_DIR/panda_h7.bin.signed
|
||||
mv board/obj/bootstub.panda.bin $BUILD_PANDA_DIR/bootstub.panda.bin
|
||||
mv board/obj/bootstub.panda_h7.bin $BUILD_PANDA_DIR/bootstub.panda_h7.bin
|
||||
popd
|
||||
|
||||
# Build
|
||||
export PYTHONPATH="$BUILD_DIR"
|
||||
scons -j$(nproc)
|
||||
|
||||
# Ensure no submodules in release
|
||||
if test "$(git submodule--helper list | wc -l)" -gt "0"; then
|
||||
echo "submodules found:"
|
||||
git submodule--helper list
|
||||
exit 1
|
||||
fi
|
||||
git submodule status
|
||||
|
||||
# Cleanup
|
||||
find . -name '*.a' -delete
|
||||
find . -name '*.o' -delete
|
||||
find . -name '*.os' -delete
|
||||
find . -name '*.pyc' -delete
|
||||
find . -name 'moc_*' -delete
|
||||
find . -name '*.cc' -delete
|
||||
find . -name '__pycache__' -delete
|
||||
find selfdrive/ui/ -name '*.h' -delete
|
||||
rm -rf panda/board panda/certs panda/crypto
|
||||
rm -rf .sconsign.dblite Jenkinsfile release/
|
||||
rm selfdrive/modeld/models/supercombo.onnx
|
||||
#rm models/supercombo_badweights.thneed
|
||||
rm -rf selfdrive/ui/replay/
|
||||
# Move back signed panda fw
|
||||
mkdir -p panda/board/obj
|
||||
mv $BUILD_PANDA_DIR/panda.bin.signed panda/board/obj/panda.bin.signed
|
||||
mv $BUILD_PANDA_DIR/panda_h7.bin.signed panda/board/obj/panda_h7.bin.signed
|
||||
mv $BUILD_PANDA_DIR/bootstub.panda.bin panda/board/obj/bootstub.panda.bin
|
||||
mv $BUILD_PANDA_DIR/bootstub.panda_h7.bin panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
# Restore third_party
|
||||
git checkout third_party/
|
||||
|
||||
# Mark as prebuilt release
|
||||
touch prebuilt
|
||||
|
||||
# include source commit hash and build date in commit
|
||||
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD)
|
||||
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
|
||||
SP_VERSION=$(cat $SOURCE_DIR/common/version.h | awk -F\" '{print $2}')
|
||||
|
||||
# Add built files to git
|
||||
git add -f .
|
||||
git commit --amend -m "sunnypilot v$VERSION"
|
||||
git branch -m release-c3
|
||||
|
||||
# Run tests
|
||||
#TEST_FILES="tools/"
|
||||
#cd $SOURCE_DIR
|
||||
#cp -pR -n --parents $TEST_FILES $BUILD_DIR/
|
||||
#cd $BUILD_DIR
|
||||
#RELEASE=1 selfdrive/test/test_onroad.py
|
||||
#selfdrive/manager/test/test_manager.py
|
||||
#selfdrive/car/tests/test_car_interfaces.py
|
||||
#rm -rf $TEST_FILES
|
||||
|
||||
if [ ! -z "$PUSH" ]; then
|
||||
echo "[-] pushing T=$SECONDS"
|
||||
git push -f origin $RELEASE_BRANCH
|
||||
fi
|
||||
|
||||
echo "[-] done T=$SECONDS"
|
||||
@@ -1,127 +0,0 @@
|
||||
#!/usr/bin/bash -e
|
||||
|
||||
# git diff --name-status origin/release3-staging | grep "^A" | less
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
cd $DIR
|
||||
|
||||
BUILD_DIR=/data/media/openpilot-staging
|
||||
SOURCE_DIR="$(git rev-parse --show-toplevel)"
|
||||
|
||||
FILES_SRC="release/files_tici"
|
||||
STAGING_BRANCH="staging-c3"
|
||||
|
||||
BUILD_PANDA_DIR=/data/media/panda/openpilot-staging
|
||||
|
||||
|
||||
# set git identity
|
||||
source $DIR/identity.sh
|
||||
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
rm -rf $BUILD_DIR
|
||||
mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
git init
|
||||
# set git username/password
|
||||
source /data/identity.sh
|
||||
git remote add origin https://github.com/sunnyhaibin/sunnypilot.git
|
||||
git fetch origin $STAGING_BRANCH
|
||||
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR --parents $(cat release/files_common) $BUILD_DIR/
|
||||
cp -pR --parents $(cat $FILES_SRC) $BUILD_DIR/
|
||||
|
||||
# in the directory
|
||||
cd $BUILD_DIR
|
||||
|
||||
rm -f panda/board/obj/panda.bin.signed
|
||||
rm -f panda/board/obj/panda_h7.bin.signed
|
||||
rm -f panda/board/obj/bootstub.panda.bin
|
||||
rm -f panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
VERSION=$(cat common/version.h | awk -F[\"-] '{print $2}')
|
||||
echo "#define COMMA_VERSION \"$VERSION-staging\"" > common/version.h
|
||||
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git commit -a -m "sunnypilot v$VERSION release"
|
||||
git branch --set-upstream-to=origin/$STAGING_BRANCH
|
||||
|
||||
# Build panda firmware
|
||||
pushd panda/
|
||||
scons -u .
|
||||
mv board/obj/panda.bin.signed $BUILD_PANDA_DIR/panda.bin.signed
|
||||
mv board/obj/panda_h7.bin.signed $BUILD_PANDA_DIR/panda_h7.bin.signed
|
||||
mv board/obj/bootstub.panda.bin $BUILD_PANDA_DIR/bootstub.panda.bin
|
||||
mv board/obj/bootstub.panda_h7.bin $BUILD_PANDA_DIR/bootstub.panda_h7.bin
|
||||
popd
|
||||
|
||||
# Build
|
||||
export PYTHONPATH="$BUILD_DIR"
|
||||
scons -j$(nproc)
|
||||
|
||||
# Ensure no submodules in release
|
||||
if test "$(git submodule--helper list | wc -l)" -gt "0"; then
|
||||
echo "submodules found:"
|
||||
git submodule--helper list
|
||||
exit 1
|
||||
fi
|
||||
git submodule status
|
||||
|
||||
# Cleanup
|
||||
find . -name '*.a' -delete
|
||||
find . -name '*.o' -delete
|
||||
find . -name '*.os' -delete
|
||||
find . -name '*.pyc' -delete
|
||||
find . -name 'moc_*' -delete
|
||||
find . -name '*.cc' -delete
|
||||
find . -name '__pycache__' -delete
|
||||
find selfdrive/ui/ -name '*.h' -delete
|
||||
rm -rf panda/board panda/certs panda/crypto
|
||||
rm -rf .sconsign.dblite Jenkinsfile release/
|
||||
rm selfdrive/modeld/models/supercombo.onnx
|
||||
#rm models/supercombo_badweights.thneed
|
||||
rm -rf selfdrive/ui/replay/
|
||||
# Move back signed panda fw
|
||||
mkdir -p panda/board/obj
|
||||
mv $BUILD_PANDA_DIR/panda.bin.signed panda/board/obj/panda.bin.signed
|
||||
mv $BUILD_PANDA_DIR/panda_h7.bin.signed panda/board/obj/panda_h7.bin.signed
|
||||
mv $BUILD_PANDA_DIR/bootstub.panda.bin panda/board/obj/bootstub.panda.bin
|
||||
mv $BUILD_PANDA_DIR/bootstub.panda_h7.bin panda/board/obj/bootstub.panda_h7.bin
|
||||
|
||||
# Restore third_party
|
||||
git checkout third_party/
|
||||
|
||||
# Mark as prebuilt release
|
||||
touch prebuilt
|
||||
|
||||
# include source commit hash and build date in commit
|
||||
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD)
|
||||
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
|
||||
SP_VERSION=$(cat $SOURCE_DIR/common/version.h | awk -F\" '{print $2}')
|
||||
|
||||
# Add built files to git
|
||||
git add -f .
|
||||
git commit --amend -m "sunnypilot v$VERSION"
|
||||
git branch -m staging-c3
|
||||
|
||||
# Run tests
|
||||
#TEST_FILES="tools/"
|
||||
#cd $SOURCE_DIR
|
||||
#cp -pR -n --parents $TEST_FILES $BUILD_DIR/
|
||||
#cd $BUILD_DIR
|
||||
#RELEASE=1 selfdrive/test/test_onroad.py
|
||||
#selfdrive/manager/test/test_manager.py
|
||||
#selfdrive/car/tests/test_car_interfaces.py
|
||||
#rm -rf $TEST_FILES
|
||||
|
||||
if [ ! -z "$PUSH" ]; then
|
||||
echo "[-] pushing T=$SECONDS"
|
||||
git push -f origin $STAGING_BRANCH
|
||||
fi
|
||||
|
||||
echo "[-] done T=$SECONDS"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user