Commit Graph

15172 Commits

Author SHA1 Message Date
discountchubbs 3cfec97618 This is an internal test of 50hz timestep. refer to long-tune split for real code 2025-03-31 09:14:36 -07:00
discountchubbs 67bf560486 This is an internal test of 50hz timestep. refer to long-tune split for real code 2025-03-31 09:00:45 -07:00
discountchubbs 9568e9781d Update README.md 2025-03-31 06:38:58 -07:00
discountchubbs 0fc1489d2d Update README.md 2025-03-30 21:28:09 -07:00
discountchubbs cacbb42e69 Update README.md 2025-03-30 21:25:10 -07:00
discountchubbs d2dc7c61c8 Add README.md 2025-03-30 21:22:32 -07:00
discountchubbs 3c7e4c96c7 Remove unused interpolation function. 2025-03-29 20:52:26 -07:00
discountchubbs 71e1940c0c Remove ~600 lines of code for maintainability. 2025-03-29 20:45:26 -07:00
Jason Wen 32088b5a96 bump opendbc 2025-03-29 23:39:27 -04:00
Jason Wen 3a1756679d more rename 2025-03-29 23:27:13 -04:00
Jason Wen 42ca551876 rename 2025-03-29 23:26:40 -04:00
discountchubbs 2adcbcd775 bump opendbc_repo 2025-03-29 20:10:46 -07:00
discountchubbs ef8b72cfcb Merge remote-tracking branch 'origin/master-new' into HKG-long-tune
# Conflicts:
#	sunnypilot/selfdrive/car/interfaces.py
2025-03-29 20:10:19 -07:00
Discountchubbs 63ba5e864f car: abstract sunnypilot interfaces (#721)
* Method abstracting radar tracks in interfaces.py This makes the code more maintainable for future implementations to this file

* Method abstracting radar tracks in interfaces.py This makes the code more maintainable for future implementations to this file

* Add type annotation to params in initialize_car_interface_sp

* rename

* just internal

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-30 02:45:15 +00:00
Discountchubbs 1981a17ffa Merge branch 'master-new' into HKG-long-tune 2025-03-29 15:12:46 -07:00
DevTekVE 6b3f75bbf0 CI: refactor Squash and Merge with simplified branch merging (#726)
* Refactor squash and merge script for improved simplicity

Simplified the squash_and_merge.py script by replacing redundant utility functions and consolidating logic. Enhanced usability by aligning command-line arguments and leveraging streamlined git operations to improve maintainability and reliability.

* Fix argument names in squash PR script

Renamed CLI arguments from '--base' and '--source' to '--target' and '--base' to align with expected input format. This ensures the script runs correctly with proper argument mapping.

* Fix incorrect base branch argument in squash script

    Updated the `--base` argument to use `source_branch` instead of `branch` to ensure the squash script processes the correct base branch. Also adjusted the command to include `branch` as a separate argument for clarity and correctness.

* Reset to a clean state after squash error.

Add a `git reset --hard` command to ensure the repository returns to a clean state after encountering errors during the squash and merge process. This prevents lingering changes from affecting subsequent operations.

* Improve error handling in squash_and_merge_prs.py

Capture and display both stdout and stderr in error cases to provide more informative feedback. Adjust the PR comment to include available output for better debugging.

* Refactor PR squash process to enhance error handling.

Modify subprocess handling to use `result.returncode` for error checks instead of relying on exceptions. Consolidate error output retrieval and logging for better clarity, while maintaining the workflow for resetting changes on failure.

* Fix incorrect return in PR processing loop

Replaced `return` with `continue` to ensure all PRs in the loop are processed before exiting. This prevents premature termination of the function and ensures accurate success count reporting.

* Simplify subprocess output handling in squash_and_merge.py

Replaced labeled print statements with direct output of stdout and stderr. This change ensures cleaner logs and remains consistent with the function's purpose of output handling during subprocess execution.

* Update subprocess.run calls to use capture_output parameter

Replaced `stdout` and `stderr` with the `capture_output` parameter for cleaner and more concise subprocess handling. Also removed extraneous whitespace for improved code readability.

* testing moving the squash script given that it's called iteratively and switching branch might miss it

* format

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-29 21:54:49 +00:00
DevTekVE 4268d7a19c Events: Refactor OnroadEventSP structure and add upstream cereal validation (#722)
* Refactor OnroadEventSP structure to contain list of events

A restructuring of the OnroadEventSP structure has been undertaken to accommodate a list of 'Event' substructures. The change is reflected in different files where OnroadEventSP is used. This update allows for more efficient management of multiple events by grouping them together under the revised OnroadEventSP structure.

* Rename `OnroadEventSP` to `OnroadEventsSP` across codebase.

Updated all references to `OnroadEventSP` to ensure consistency with the renamed struct `OnroadEventsSP`. This change improves code clarity and aligns naming conventions across modules.

* Add optional debug logging to schema validation script

Introduced a `DEBUG` flag and a `print_debug` function to streamline debug output management. This replaces direct `print` calls with conditional logging to control verbosity during execution.

Refactor structural validation logic in cereal test

Simplify the iteration over read_instances to streamline structural validation. Removed redundant comparisons and improved error handling to detect unreadable fields more effectively. Updated error messages for better clarity during debugging.

Update build command to include 'cereal' target in CI

Modified the scons build command in selfdrive_tests workflow to explicitly build the 'cereal' target. This ensures necessary components are included during the CI process, improving reliability and consistency.

Added workflow for cereal validation artifacts generation and validation against upstream

This commit encompasses significant changes to .github/workflows/selfdrive_tests.yaml, including the addition of two new jobs. One is responsible for 'Generating cereal validation artifacts' and the other for 'Validating cereal with Upstream'. This includes generating cereal schemas, building openpilot, and running validation schema instances against master. Furthermore, a new Python script (validate_sp_cereal_upstream.py) was also added to perform cereal schema instance generation and validation. These changes aim to enhance the testing process, ensuring schema compatibility and integration quality.

* Relocate cereal validation to a dedicated GitHub workflow

This commit introduces a distinct GitHub workflow for cereal validation named 'cereal_validation.yaml'. This workflow includes two jobs: one for generating cereal validation artifacts and another for validating cereal with the upstream project. Previously, these operations were included as separate jobs in 'selfdrive_tests.yaml'. However, the decoupling in this commit allows for a better organization of GitHub workflows within the project. Additionally, this separation allows these workflows to be individually configured and run, providing a greater degree of flexibility in managing our continuous integration activities.

* Rename workflow to "cereal validation" for clarity.

Updated the workflow name in the GitHub Actions configuration to better reflect its purpose. This change improves maintainability and ensures clearer identification of the workflow's function.

* Add LFS configuration and GitLab SSH setup to workflow

Integrate GitLab LFS handling by configuring LFS URLs and enabling SSH setup. This includes adding public GitLab keys and updating the workflow to support secure connections for LFS operations. Ensures proper handling of large files and seamless integration with GitLab.

* rename

* format

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-29 17:34:31 -04:00
discountchubbs 8bf269ec8c Merge remote-tracking branch 'origin/HKG-long-tune' into HKG-long-tune 2025-03-29 07:17:54 -07:00
discountchubbs db9a7a9104 Clip upper jerk during experimental mode to 1.0m/s^3. This allows for less abrupt accel takeoffs while in experimental mode. 2025-03-29 07:17:46 -07:00
discountchubbs 2aeb886cb7 Merge remote-tracking branch 'origin/HKG-long-tune' into HKG-long-tune 2025-03-29 07:17:01 -07:00
Discountchubbs 6e4d36b14c Clip upper jerk during experimental mode to 1.0m/s^3. This allows for less abrupt accel takeoffs while in experimental mode. 2025-03-29 07:16:42 -07:00
Discountchubbs 5f99eb565e Merge branch 'master-new' into HKG-long-tune 2025-03-29 06:52:25 -07:00
DevTekVE 245605dc55 ci: Add LFS configuration and GitLab SSH to squash & merge script (#725)
Integrate GitLab LFS handling by configuring LFS URLs and enabling SSH setup. This includes adding public GitLab keys and updating the workflow to support secure connections for LFS operations. Ensures proper handling of large files and seamless integration with GitLab.
2025-03-29 12:42:54 +01:00
discountchubbs d3bbbca800 Clip upper jerk during experimental mode to 1.0m/s^3. This allows for less abrupt accel takeoffs while in experimental mode. 2025-03-28 13:51:16 -07:00
discountchubbs 539c9bf024 Clean up notes for clarity. 2025-03-28 06:18:26 -07:00
discountchubbs 057fcf4a73 Min jerk lowered to 0.6 per:
Horn, S., Rossner, P., Madigan, R., Bieg, H.-J., & Merat, N. (2024). User evaluation of comfortable deceleration profiles for highly automated driving: Findings from a test track study. Transportation Research Part F Traffic Psychology and Behaviour, 105(3), 206–221. https://doi.org/10.1016/j.trf.2024.05.025
2025-03-28 05:56:48 -07:00
discountchubbs 92a8d11f7e Conform to ISO 15622 calculations for jerk lower limits 2025-03-27 15:04:33 -07:00
discountchubbs 69cd4f5065 add clarity and chronological order. 2025-03-26 07:50:14 -07:00
discountchubbs 840c383833 Fix comments 2025-03-26 07:39:08 -07:00
discountchubbs 0a7a4586ac Merge remote-tracking branch 'origin/HKG-long-tune' into HKG-long-tune 2025-03-26 07:04:44 -07:00
discountchubbs 1a93be18a0 Fix comments 2025-03-26 07:04:24 -07:00
Discountchubbs 3519b9669c Merge branch 'master-new' into HKG-long-tune 2025-03-26 07:03:36 -07:00
discountchubbs b1fbede11b Merge remote-tracking branch 'origin/HKG-long-tune' into HKG-long-tune
# Conflicts:
#	opendbc_repo
2025-03-26 07:02:47 -07:00
discountchubbs f098ff34be Fix comments 2025-03-26 07:02:31 -07:00
discountchubbs e321be0637 Fix comments 2025-03-26 06:59:55 -07:00
DevTekVE e15974345b modeld: Enforce float type for lag_adjusted_curvature (#714)
Convert safe_desired_curvature to float before returning.

This ensures the returned value is explicitly a float, avoiding an issue when serializing it on capnp as it does not recognize numpy.float

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-26 08:26:21 +01:00
Jason Wen 65853f0111 NNLC: Fix exact match consistency (#716)
Move the exact_match calculation after updating model_path and max_similarity to ensure consistency. This prevents potential discrepancies when rechecking NN paths and enhances code maintainability.
2025-03-26 01:08:22 -04:00
discountchubbs cbe0d27774 Merge remote-tracking branch 'origin/HKG-long-tune' into HKG-long-tune
# Conflicts:
#	opendbc_repo
2025-03-25 16:02:18 -07:00
discountchubbs 62bb93d953 Refactor longitudinal_tuning.py 2025-03-25 16:01:09 -07:00
discountchubbs ce53c51a99 Refactor longitudinal_tuning.py 2025-03-25 15:47:03 -07:00
discountchubbs 8b81380a9b Refactor interfaces.py 2025-03-25 15:28:07 -07:00
discountchubbs 45e8b84032 place under CP.brand =='hyundai' 2025-03-25 13:42:49 -07:00
discountchubbs efa382f66c bump opendbc_repo 2025-03-25 12:52:44 -07:00
discountchubbs 78b90ad0f2 apply from car interface 2025-03-25 11:52:19 -07:00
discountchubbs 9f4b068909 Update UI 2025-03-25 11:38:43 -07:00
Discountchubbs 73581243fe Update card.py
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-03-25 11:03:47 -07:00
discountchubbs 65c12b45f5 strip 2025-03-25 09:34:03 -07:00
discountchubbs 64e946ee35 simplify 2025-03-25 08:03:39 -07:00
discountchubbs e16bd21069 Merge remote-tracking branch 'origin/HKG-long-tune' into HKG-long-tune 2025-03-25 06:57:47 -07:00
discountchubbs f853be5c1c Fix DevTekVE's comments 2025-03-25 06:55:50 -07:00