* always check radarState freq since it polls on modelV2 and sends at a fixed rate
* fine
* can just check this since valid is all_checks on liveTracks, and liveTracks.valid is len(errors) as well
full circle
* init dec
* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* fix static test
* ff
* fix static test
* unitee testt
* Refactor test_dynamic_controller and fix formatting issues
Added a new import for STOP_AND_GO_FRAME and corrected a float initialization for v_ego in MockCarState. Also fixed indentation in the test_standstill_detection method for consistency.
* Refactor test indentation for dynamic controller tests
Adjust indentation and formatting in test_dynamic_controller.py to ensure consistency and readability. This change does not alter functionality but improves the maintainability of the test code.
* Migrated to pytest using claude
* Integrate radar parameter into dynamic controller's pytest tests
Added a `has_radar` parameter to the test functions in the dynamic controller's pytest file. This allows each function to run both with and without radar inputs, thus enhancing the coverage of our test cases.
* Disabling unittest file to allow checks on the pipeline to succeed.
Pending to remove this, but leaving it to validate the move to pytest is okay before merging
* Replace unittest with pytest for dynamic controller tests
Migrated dynamic controller tests from unittest to pytest for improved readability and maintainability. Refactored mock setup using pytest fixtures and monkeypatching while preserving test coverage.
* new line...
* Refactor and modularize DynamicExperimentalController logic
Moved DynamicExperimentalController logic and helper functions to a dedicated module for better readability and maintainability. Simplified longitudinal planner logic by introducing reusable methods to manage MPC mode and longitudinal plan publishing. Adjusted file structure for dynamic controller-related components and updated relevant imports.
* Add missing import for messaging in helpers.py
The `messaging` module was added to resolve potential issues with undefined references. This change ensures all required imports are present, improving the reliability and maintainability of the code.
* Format
* Formatting
* rebase fix
* Refactor MpcSource definition and update references.
Moved MpcSource enum into LongitudinalPlanSP for better encapsulation. Updated references in helpers.py to use the new path. This change improves code organization and maintains functionality.
* Format
* Refactor DEC into a dedicated longitudinal planner class
Move Dynamic Experimental Control (DEC) logic to a new `DecLongitudinalPlanner` class for better modularity and maintainability. This simplifies the `LongitudinalPlanner` by delegating DEC-specific behavior and consolidates related methods into a single file. Additionally, redundant code was removed to improve readability and reduce complexity.
* **Refactor DEC module structure for better organization**
Moved DEC-related files from `dec` to `lib` for improved clarity and consistency within the project structure. Updated all relevant import paths to reflect the new locations. Ensured functionality remains unaffected with these changes.
* static test
* static
* had moved to car_state
* cleanup
* some more
* static method
* move around
* more cleanup
* stuff
* into their own
* rename
* check live param
* sync with stock
* type hint
* unused
* smoother trans
* window time
* fix type hint
* pass sm.frame from plannerd
* more fixes
* more
* more explicit
* fix test
* Revert "fix test"
This reverts commit 635b15f2bc.
* Revert "pass sm.frame from plannerd"
This reverts commit a8deaa69b8.
* use internal frame
* update name
* never used
* this is why it was never using DEC
* more logs
* slight cleanup
* remove to fail test
* update name
* more
* rename
* move around
* explicit type hints
* move to constants py
* Revert "explicit type hints"
This reverts commit c205497b
* more
* don't set to exp mode initial if DEC is active
* use walrus for None
* Revert "use walrus for None"
This reverts commit 5f2396d490.
* fix wrong typing and variable name
* use walrus (needs cleanup)
* fix tests
* revert smooht lead for now
* dec: how good is FirstOrderFilter?
* Update dec.py
* dec: faster ?
* Revert "dec: faster ?"
This reverts commit 40259cd22a.
* Revert "Update dec.py"
This reverts commit 3f29ccbd99.
* Revert "dec: how good is FirstOrderFilter?"
This reverts commit 01e06df542.
* Update slow-down logic and constants for improved behavior
Adjust the slowdown scaling factor and anomaly handling to refine behavior without abrupt resets. Modify constants to increase window size and adjust probabilities and distances for smoother adaptation. Update version to reflect the new changes.
* Fix lead detection fallback for weighted average check.
Add a fallback value of -1 when computing the weighted average to prevent errors caused by invalid or None values. This ensures robust lead detection and avoids potential crashes or undefined behavior.
* visuals for DEC
* try this
* add opacity
* should be active and dimmer
* even dimmer
* Update dec.py
* Update constants.py
* use another method for drawing
* migrate to sp only
* fix
* init
---------
Co-authored-by: rav4kumar <meetkumardesai@gmail.com>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* init dec
* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* fix static test
* ff
* fix static test
* unitee testt
* Refactor test_dynamic_controller and fix formatting issues
Added a new import for STOP_AND_GO_FRAME and corrected a float initialization for v_ego in MockCarState. Also fixed indentation in the test_standstill_detection method for consistency.
* Refactor test indentation for dynamic controller tests
Adjust indentation and formatting in test_dynamic_controller.py to ensure consistency and readability. This change does not alter functionality but improves the maintainability of the test code.
* Migrated to pytest using claude
* Integrate radar parameter into dynamic controller's pytest tests
Added a `has_radar` parameter to the test functions in the dynamic controller's pytest file. This allows each function to run both with and without radar inputs, thus enhancing the coverage of our test cases.
* Disabling unittest file to allow checks on the pipeline to succeed.
Pending to remove this, but leaving it to validate the move to pytest is okay before merging
* Replace unittest with pytest for dynamic controller tests
Migrated dynamic controller tests from unittest to pytest for improved readability and maintainability. Refactored mock setup using pytest fixtures and monkeypatching while preserving test coverage.
* new line...
* Refactor and modularize DynamicExperimentalController logic
Moved DynamicExperimentalController logic and helper functions to a dedicated module for better readability and maintainability. Simplified longitudinal planner logic by introducing reusable methods to manage MPC mode and longitudinal plan publishing. Adjusted file structure for dynamic controller-related components and updated relevant imports.
* Add missing import for messaging in helpers.py
The `messaging` module was added to resolve potential issues with undefined references. This change ensures all required imports are present, improving the reliability and maintainability of the code.
* Format
* Formatting
* rebase fix
* Refactor MpcSource definition and update references.
Moved MpcSource enum into LongitudinalPlanSP for better encapsulation. Updated references in helpers.py to use the new path. This change improves code organization and maintains functionality.
* Format
* Refactor DEC into a dedicated longitudinal planner class
Move Dynamic Experimental Control (DEC) logic to a new `DecLongitudinalPlanner` class for better modularity and maintainability. This simplifies the `LongitudinalPlanner` by delegating DEC-specific behavior and consolidates related methods into a single file. Additionally, redundant code was removed to improve readability and reduce complexity.
* **Refactor DEC module structure for better organization**
Moved DEC-related files from `dec` to `lib` for improved clarity and consistency within the project structure. Updated all relevant import paths to reflect the new locations. Ensured functionality remains unaffected with these changes.
* static test
* static
* had moved to car_state
* cleanup
* some more
* static method
* move around
* more cleanup
* stuff
* into their own
* rename
* check live param
* sync with stock
* type hint
* unused
* smoother trans
* window time
* fix type hint
* pass sm.frame from plannerd
* more fixes
* more
* more explicit
* fix test
* Revert "fix test"
This reverts commit 635b15f2bc.
* Revert "pass sm.frame from plannerd"
This reverts commit a8deaa69b8.
* use internal frame
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* long planner: use vehicle model w/ avg steer offset for limit accel in turns
* remove unused CP in limit_accel_in_turns
* revert use of vehicle model, keeping angle offset in limit accel in turns
* only the offset fix, check valid, and fix process replay
* update refs (valid two frames later)
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* Deprecate controlsState state fields
* sim works
* update refs
* one more
* these too
* update sim
old-commit-hash: 3924ac587b735d1e735af4cb77faf6ccf053f656
* Increase traversal_limit_in_words to Fix Traversal Limit Errors
* just use log_from_bytes
* come on pycharm
* no free lunch
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 12d729a0a0
* 6f6e3749-1b7c-42e8-a33b-03929b7fc476/700
* oops deleted too much
* 1b4308b7-a659-4ebd-b4c6-c81c1c3890f8/700
* 1be192f3-f407-4217-9757-78b9ad92750a/700
* remove some todos
* more cleanup in lat planner
* vego > min_speed
* regen and update process replay refs
* update model replay ref
* update model replay ref commit again
* Revert "update model replay ref commit again"
This reverts commit 922cb796b8dfe264b0cce7a18206bb898b18bcb3.
* update again
* bump cereal
old-commit-hash: 4c2bd853e4
* WIP try modeld all in python
* fix plan
* add lane lines stds
* fix lane lines prob
* add lead prob
* add meta
* simplify plan parsing
* add hard brake pred
* add confidence
* fix desire state and desire pred
* check this file for now
* rm prints
* rm debug
* add todos
* add plan_t_idxs
* same as cpp
* removed cython
* add wfd width - rm cpp code
* add new files rm old files
* get metadata at compile time
* forgot this file
* now uses more CPU
* not used
* update readme
* lint
* copy this too
* simplify disengage probs
* update model replay ref commit
* update again
* confidence: remove if statemens
* use publish_state.enqueue
* Revert "use publish_state.enqueue"
This reverts commit d8807c8348338a1f773a8de00fd796abb8181404.
* confidence: better shape defs
* use ModelConstants class
* fix confidence
* Parser
* slightly more power too
* no inline ifs :(
* confidence: just use if statements
old-commit-hash: cad17b1255
* 10s lat
* Full length MPC
* redfine N
* Leave controls the same for now
* Updates
* use long plan in lat plan
* interp plan
* simplergit add selfdrive/controls/plannerd.py selfdrive/controls/
* expand to 10s
* revert this
* fix linter
* vizualize
* fix long test
* typo
* cleanup
* compiles
* unused
* unused
* bump cereal
* bump cereal
* use model if no uiplanm
* update replay
* update ref commit
* bump cereal to master
old-commit-hash: eb8bdc0026
* Add params for lead and danger
* fix long params
* E2e passes simple maneuver tests
* Make tests run with e2e long mode
* Slightly more error allowed in e2e mode
* FCW back and populate long source field
* Fix planner name
* FCW still doesnt work
* Slightly less aggressive
* Doesn't need to simulate from stop
old-commit-hash: 7899fb79c1
* Don't set lane change events if we're not able to steer.
* more specific variable name
* update process replay socket config
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 5b1ba4f135
* simulator: support running wide camera only
* proper frame id
* use param name that makes more sense
* do some cleanup
* Update tools/sim/bridge.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b5aed2bf67
* start again
* need that too
* this actually works
* not needed
* do properly
* still works
* still works
* still good
* all G without ll
* still works
* all still good
* cleanup building
* cleanup sconscript
* new lane planner
* how on earth is this silent too....
* update
* add rotation radius
* update
* pathplanner first pass
* misc fixes
* fix
* need deep_interp
* local again
* fix
* fix test
* very old
* new replay
* interp properly
* correct length
* another horrible silent bug
* like master
* fix that
* do doubles
* different delay compensation
* make robust to empty msg
* make pass with hack for now
* add some extra
* update ref for increased leg
* test cpu usage on this pr
* tiny bit faster
* purge numpy
* update ref
* not needed
* ready for merge
* try again after recompile
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 158210cde8