Commit Graph

15201 Commits

Author SHA1 Message Date
discountchubbs bed4ef8a9d add standstill check:
if (CS.out.brakeLightsDEPRECATED and CS.out.standstill) and not CS.out.brakePressed:
2025-04-02 09:42:31 -07:00
discountchubbs f4dcba464d Try SPSS lower jerk cal
** Note: May need to revert so keep that in mind **
2025-04-02 07:56:35 -07:00
discountchubbs 6e2571f850 Change access from private to public, allow call from card once again, due to the fact that the flags were being set after interface init, leading to no value being returned, leading to no tune being applied.
Change interfaces accordingly to remove the now unneeded variable in get_params_sp.

Changed private local method _get_longitudinal_tuning, to a publically accessible get_longitudinal_tuning method.

Added one line call in card.
2025-04-02 04:47:09 -07:00
discountchubbs 9c82f1bf6a Clean up a bit more 2025-04-01 18:41:17 -07:00
discountchubbs 08ec905aaf Clean up a bit more 2025-04-01 18:32:56 -07:00
discountchubbs 5dceeaa019 Update README.md 2025-04-01 18:23:02 -07:00
discountchubbs 006298392c Merge branch 'HKG-long-tune-split' into HKG-long-tune
# Conflicts:
#	opendbc_repo
2025-04-01 18:15:38 -07:00
discountchubbs fb022229f6 Red diff parts in readme.md 2025-04-01 12:55:23 -07:00
Jason Wen f1bd9d8304 oops 2025-04-01 15:47:27 -04:00
Jason Wen 5bbcbbbae9 oops 2025-04-01 15:45:11 -04:00
Jason Wen 6e09c7dc05 TCS allows actuations after brakes are released, some red diff 2025-04-01 15:42:59 -04:00
Jason Wen 9fb45f5f66 let's move it up 2025-04-01 15:17:10 -04:00
discountchubbs b1f88730d9 remove unused imports 2025-04-01 08:03:24 -07:00
discountchubbs 9e126d94a5 Nuke calculate limited acceleration in favor of better jerk division which leads to much better drive comfort.
tie jerk to LONGTUNING_BRAKING flag so it is still set
2025-04-01 08:02:56 -07:00
discountchubbs db84e8c04f Fix return statement to allow carparamssp to still be properly returned even if flags are not set, so a None type object error isn't created.
TLDR: Properly return ret that _get_params_sp expects in opendbc/Interfaces.py
2025-04-01 06:35:45 -07:00
discountchubbs faf59baf88 Lets try 0.32 for both. 2025-04-01 05:09:08 -07:00
discountchubbs c7edef89d9 @sunnyhaiben pointed out this typo lol 2025-04-01 05:01:31 -07:00
Jason Wen ea1212e08c ICE -> DEFAULT 2025-03-31 21:19:49 -04:00
Jason Wen e2987349ed more rename 2025-03-31 21:13:59 -04:00
Jason Wen 398f57837d rename 2025-03-31 21:12:28 -04:00
Jason Wen a0b63c8536 unused 2025-03-31 21:11:32 -04:00
Jason Wen fa5469bfa0 unused 2025-03-31 21:09:15 -04:00
Jason Wen 3126ab773c license 2025-03-31 21:05:21 -04:00
Jason Wen 4307fc49cc bump opendbc 2025-03-31 21:03:45 -04:00
Jason Wen e35b51ea0f bump opendbc 2025-03-31 21:00:56 -04:00
discountchubbs 29b901e068 Track two separate factors 2025-03-31 14:41:09 -07:00
discountchubbs 6899346c6c Test 0.5 division 2025-03-31 14:30:48 -07:00
discountchubbs 3b35f13799 This is an internal test of 50hz timestep. refer to long-tune split for real code. Direct test of controller. revert/ apply the split opendbc_repo instead when ready. 2025-03-31 13:31:35 -07:00
Jason Wen c41ff47f43 staticmethod and all in 1 place only 2025-03-31 15:51:22 -04:00
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