* Add nightly branch reset workflow and improve squash script Introduced a GitHub Actions workflow to reset and squash PRs nightly for the `master-dev-c3-new-test` branch. Enhanced `squash_and_merge.py` to handle more specific exit codes and `squash_and_merge_prs.py` to streamline PR processing. Updated argument handling in scripts and added validation for squash script execution. * Forcing to show up * UnForcing to show up * Refactor branch handling to use inputs/environments directly Removed intermediate step for setting branch variables and updated logic to use `inputs` or environment variables directly. Simplifies the workflow and improves maintainability by reducing redundancy and reliance on unnecessary outputs. * Fix Python script invocation in CI workflow. Replaced implicit script execution with an explicit `python3` command to ensure compatibility and consistency in the workflow. This change resolves potential issues with shell defaults or system configurations. * Update branch reset logic in workflow script Replaces checkout-based branch reset with deletion and recreation to ensure the target branch correctly points to the source branch. This change handles cases where the target branch may already exist. * Refactor PR data handling to parse JSON input. Updated the script to parse and handle PR data as JSON, ensuring proper data structure during processing. Adjusted functions to operate on parsed JSON instead of raw arguments for improved clarity and error handling. * Refactor PR processing to streamline branch handling Removed redundant `fetch_pr_branches` function and integrated branch fetching directly into `process_pr`. Simplified subprocess calls for clarity and added branch cleanup to prevent conflicts. This improves code maintainability and execution efficiency. * Add PR number to squash and merge commit titles This change appends the PR number to the title used in squash and merge commits, improving traceability and clarity in the commit history. The modification ensures easier identification of commits linked to specific pull requests. * Enhance PR processing with sorting and additional checks Implemented sorting of PRs by creation date and added checks for merge conflicts, commit data availability, and status check completion. Updated nightly squash script to provide detailed feedback via PR comments for skipped PRs. These changes improve the reliability and traceability of the merge process. * Add traceback logging to error handling in squash_and_merge_prs Enhanced error reporting by including full traceback details when an exception occurs in the `process_pr` function. This aids in debugging by providing more context on failures. * Refactor and add debug output to PR merge check logic Simplified multi-line statements into single lines for clarity and added debug `print` statements to log `merge_status` and its output. These changes enhance readability and facilitate debugging of the merge conflict check process. * Add GITHUB_TOKEN to environment for CI workflow Ensure the workflow has access to the GITHUB_TOKEN for authentication. This is necessary for interacting securely with the GitHub API during the CI process. Without this, some steps may fail due to lack of authorization. * Enable scheduled workflow execution at midnight UTC Reactivates the cron schedule for the workflow to run daily at midnight UTC. This ensures the workflow executes automatically without manual triggers, maintaining regular updates or checks. * test * Update workflow to trigger and monitor selfdrive tests Replaced the direct triggering of the prebuilt workflow with a step to trigger and wait for the completion of selfdrive tests. Ensures prebuilt workflow runs only if selfdrive tests succeed, improving reliability of the CI process. * Refine workflow trigger to fetch run URL and ID Updated the workflow script to extract the run URL and derive the workflow ID from it. This ensures more accurate handling and tracking of GitHub Actions runs. * Simplify selfdrive test triggering in workflow Replaces custom script with a reusable GitHub Action to trigger and wait for selfdrive test completion. This improves maintainability and reduces complexity in the workflow file. Adjusts subsequent prebuilt workflow trigger to ensure compatibility. * Remove duplicate prebuilt workflow trigger step The redundant step for triggering the sunnypilot prebuilt workflow has been removed. This cleanup avoids unnecessary duplication and ensures a more streamlined workflow definition. * Update selfdrive test trigger to use GitHub CLI commands Replaced the third-party action with GitHub CLI for triggering and monitoring selfdrive tests. This change improves maintainability and reduces reliance on external dependencies. Updated related steps to ensure compatibility with the new approach. * Add delay to ensure selfdrive tests workflow starts Introduce a 120-second sleep before fetching the latest run ID to allow sufficient time for the selfdrive tests action to initialize. This prevents potential issues caused by attempting to retrieve the run ID too early. * Improve push step to check for diffs before execution Added logic to verify if there are differences between local and remote branches before attempting a push. This prevents unnecessary pushes and skips subsequent workflows when no changes are detected. Updated dependent steps to conditionally run based on the presence of changes. * Update target branch and improve squash comment clarity Renamed the default target branch from `master-dev-c3-new-test` to `nightly` in the workflow configuration. Enhanced squash process comments to dynamically reflect the `target_branch` value for better clarity and consistency. * Add missing newline at end of file Ensures the file complies with POSIX standards by including a newline at the end. This improves consistency and prevents potential issues with some tools or systems. * Update default target branch and disable nightly schedule Changed the default target branch to 'master-dev-c3-new' for workflow consistency. Commented out the nightly schedule to temporarily disable automated runs. No functional changes were made to other parts of the workflow. * Refactored squash and merge scripts for improved PR handling In this commit, significant updates have been made to the 'squash_and_merge.py' and 'squash_and_merge_prs.py' scripts related to how pull requests (PRs) are processed. A 'source-branch' argument has been added to the argument parser. The merging command has been changed from 'merge' to 'rebase'. The PR processing function has been refined. Specifically, PR validation is now a separate function confirming the conditions 'branch name', 'commit data', 'check pass status', and 'mergeability'. Now, any failures under these conditions result in skipping the PR with an appropriate warning. The target branch is deleted if it exists, before a new one is created from the source branch. The squash script now runs with more structured arguments. These changes generally improve PR handling in CI/CD pipelines, making them more efficient and error-resistant. * Add 'PullRequest' to .codespellignore This update includes 'PullRequest' in the .codespellignore file to prevent it from being flagged as a spelling error. It helps streamline code reviews and reduces false positives during spell checks.
openpilot
openpilot is an operating system for robotics.
Currently, it upgrades the driver assistance system in 275+ supported cars.
Docs · Roadmap · Contribute · Community · Try it on a comma 3X
Quick start: bash <(curl -fsSL openpilot.comma.ai)
Using openpilot in a car
To use openpilot in a car, you need four things:
- Supported Device: a comma 3/3X, available at comma.ai/shop.
- Software: The setup procedure for the comma 3/3X allows users to enter a URL for custom software. Use the URL
openpilot.comma.aito install the release version. - Supported Car: Ensure that you have one of the 275+ supported cars.
- Car Harness: You will also need a car harness to connect your comma 3/3X to your car.
We have detailed instructions for how to install the harness and device in a car. Note that it's possible to run openpilot on other hardware, although it's not plug-and-play.
Branches
| branch | URL | description |
|---|---|---|
release3 |
openpilot.comma.ai | This is openpilot's release branch. |
release3-staging |
openpilot-test.comma.ai | This is the staging branch for releases. Use it to get new releases slightly early. |
nightly |
openpilot-nightly.comma.ai | This is the bleeding edge development branch. Do not expect this to be stable. |
nightly-dev |
installer.comma.ai/commaai/nightly-dev | Same as nightly, but includes experimental development features for some cars. |
To start developing openpilot
openpilot is developed by comma and by users like you. We welcome both pull requests and issues on GitHub.
- Join the community Discord
- Check out the contributing docs
- Check out the openpilot tools
- Read about the development workflow
- Code documentation lives at https://docs.comma.ai
- Information about running openpilot lives on the community wiki
Want to get paid to work on openpilot? comma is hiring and offers lots of bounties for external contributors.
Safety and Testing
- openpilot observes ISO26262 guidelines, see SAFETY.md for more details.
- openpilot has software-in-the-loop tests that run on every commit.
- The code enforcing the safety model lives in panda and is written in C, see code rigor for more details.
- panda has software-in-the-loop safety tests.
- 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.
- We run the latest openpilot in a testing closet containing 10 comma devices continuously replaying routes.
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.
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.
User Data and comma Account
By default, openpilot uploads the driving data to our servers. You can also access your data through comma connect. 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.
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 using openpilot, you agree to our Privacy Policy. 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.