Commit Graph

795 Commits

Author SHA1 Message Date
infiniteCable2 51f4895e54 Merge branch 'master-new' of https://github.com/sunnypilot/sunnypilot into master-new 2025-04-19 22:39:52 +02:00
Kumar 1bf752fc79 bugfix: Auto lane change - Add mode to disable lane changes (#826)
* off is off

* sugg

* line

* Update sunnypilot/selfdrive/controls/lib/tests/test_auto_lane_change.py

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-04-19 21:15:28 +02:00
infiniteCable 681067d852 Update disturbance_controller.py cleanup 2025-04-19 19:44:35 +02:00
infiniteCable2 02b4acb999 Merge branch 'master-new' of https://github.com/sunnypilot/sunnypilot into master-new 2025-04-19 19:42:07 +02:00
infiniteCable b83b1f871a Update disturbance_controller.py 2025-04-19 19:37:24 +02:00
Tim Wilson bcdb546638 NNLC: decreased low-speed factor (#822)
* NNLC: decreased low-speed factor

* np.float to float

* format

* add tests for sanity check

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-04-19 11:47:47 -04:00
infiniteCable ed174aa82c Update disturbance_controller.py 2025-04-19 16:41:00 +02:00
infiniteCable a8c2c72643 Update disturbance_controller.py 2025-04-19 14:53:15 +02:00
infiniteCable ba98193090 Update disturbance_controller.py reimplement old working state and a little bit of ff style disturbance correction by lat accel 2025-04-19 13:53:29 +02:00
infiniteCable 6e2ff68f91 Update disturbance_controller.py 2025-04-19 13:28:57 +02:00
infiniteCable 838145be17 Update disturbance_controller.py 2025-04-19 12:59:08 +02:00
infiniteCable 77942ad71a Update disturbance_controller.py 2025-04-18 22:18:01 +02:00
infiniteCable 827a505e49 Update disturbance_controller.py 2025-04-18 20:12:56 +02:00
infiniteCable ebaabcfc25 Update disturbance_controller.py 2025-04-18 19:40:57 +02:00
infiniteCable e868baf92f Update disturbance_controller.py cleanup 2025-04-18 19:39:10 +02:00
infiniteCable 56e72c4c98 Update disturbance_controller.py optimization 2025-04-18 08:55:37 +02:00
infiniteCable e683e47c8f Update disturbance_controller.py perf: 3dof only 2025-04-17 11:59:57 +02:00
infiniteCable a6e236a3f9 Update disturbance_controller.py 2025-04-12 09:04:26 +02:00
infiniteCable c4a23447da Update disturbance_controller.py 2025-04-10 23:00:58 +02:00
infiniteCable2 b97d8645fe Revert "Delete selfdrive/controls/lib/disturbance_controller.py"
This reverts commit ae3eb9e286.
2025-04-10 19:59:06 +02:00
infiniteCable ae3eb9e286 Delete selfdrive/controls/lib/disturbance_controller.py 2025-04-08 20:57:50 +02:00
infiniteCable 2287d96630 Update disturbance_controller.py 2025-04-08 20:15:43 +02:00
infiniteCable 53a917f897 Update disturbance_controller.py 2025-04-07 21:22:57 +02:00
infiniteCable 7f16a23c3e Update disturbance_controller.py 2025-04-07 21:20:46 +02:00
infiniteCable 6150cac462 Update disturbance_controller.py use import 2025-04-07 19:27:15 +02:00
infiniteCable 5bf4451692 Update disturbance_controller.py 2025-04-07 18:49:24 +02:00
infiniteCable 1c23787d6e Update disturbance_controller.py 2025-04-06 19:12:46 +02:00
infiniteCable2 d50ac6dafb Update disturbance_controller.py 2025-04-06 19:05:09 +02:00
infiniteCable 49ca3a2224 Update disturbance_controller.py 2025-04-06 18:44:29 +02:00
infiniteCable2 d8928db914 Update disturbance_controller.py 2025-04-06 18:35:13 +02:00
infiniteCable2 bf61b257d2 Update disturbance_controller.py 2025-04-06 18:33:37 +02:00
infiniteCable2 e6f6857a98 Update disturbance_controller.py 2025-04-06 18:11:10 +02:00
infiniteCable2 27ba51decf Update disturbance_controller.py 2025-04-06 18:08:53 +02:00
infiniteCable2 26ee33bffd Update disturbance_controller.py 2025-04-06 18:02:43 +02:00
infiniteCable2 0e0321ae2f Update disturbance_controller.py 2025-04-06 17:55:54 +02:00
infiniteCable2 f96483e11c Create disturbance_controller.py 2025-04-06 16:29:52 +02:00
infiniteCable 5d56f45e81 Update longitudinal_planner.py 2025-04-06 14:50:05 +02:00
Jason Wen 9dba62e686 Merge branch 'upstream/openpilot/master' into sync-20250403
# Conflicts:
#	.github/workflows/auto_pr_review.yaml
#	.github/workflows/selfdrive_tests.yaml
#	.github/workflows/ui_preview.yaml
#	msgq_repo
#	opendbc_repo
#	panda
#	selfdrive/controls/controlsd.py
2025-04-03 21:53:04 -04: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
Adeeb Shihadeh ea4554526e Keep steering active at standstill (#34918)
* Keep steering active at standstill

* bump opendbc

* bump opendbc

* update refs
2025-03-25 14:00:24 -07:00
Kumar 34bbdf4d7f Controls: Automatic lane change (#653)
* init alc controller

* only for sunny

* rebase fix

* ui

* add ui preview

* Update common/params_keys.h

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* Update selfdrive/ui/sunnypilot/SConscript

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/lane_change_settings.h

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/lane_change_settings.cc

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* review sugg

* code review

* renaming

* move around

* style

* fix types and params exceptions handling

* take out magic numbers

* more

* rename

* shorter

* make sure reset happens at the end of every DH loop

* split into multiple updates

* just 3 seconds

* use default states

* oops

* more readable

* oops

* some space and lines

* run in DH loop directly

* adjust ui preview

* nudgeless should process immediately

* check option instead

* more explicit

* even more explicit

* tests

* brake pedal release should not allow auto lane change (caught by test)

* unnecessary

* no continuous auto lane change

* Revert "unnecessary"

This reverts commit 93d135b54a812e94d23951ca8ea52ff944cfd29a.

* more tests

* less

* less less

* update again

* more cleanup

* better

* AutoLaneChangeState -> AutoLaneChangeMode

* update

* lint

* unused

* test all states

* license

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-24 22:26:48 -04:00
Jason Wen 309304a352 Controls: Neural Network Lateral Control (NNLC) for Torque Lateral Accel Control (#695)
* init

* more init

* keep it alive

* fixes

* more fixes

* more fix

* new submodule for nn data

* bump submodule

* update path to submodule

* spacing???

* update submodule path

* update submodule path

* bump

* dump

* bump

* introduce params

* Add Neural Network Lateral Control toggle to developer panel

This introduces a new toggle for enabling Neural Network Lateral Control (NNLC), providing detailed descriptions of its functionality and compatibility. It includes UI integration, car compatibility checks, and feedback links for unsupported vehicles.

* decouple even more

* static

* codespell

* remove debug

* in structs

* fix import

* convert to capnp

* fixes

* debug

* only initialize if NNLC is enabled or allow to enable

* oops

* fix initialization

* only allow engage if nnlc is off

* fix toggle param

* fix tests

* lint

* fix more test

* capnp test

* try this out

* validate if it's not None

* make it 33 to match

* align

* share the same friction input calculation

* return stock values if not enabled

* unused

* split base and child

* space

* rename

* NeuralNetworkFeedForwardModel

* less

* just use file name

* try this

* more explicit

* rename

* move it

* child class for additional controllers

* rename

* time to split out custom lateral acceleration

* move around

* space

* fix

* TODO-SP

* TODO-SP

* update regardless, it's an extension now

* update name and expose toggle

* ui: sunnypilot Panel -> Steering Panel

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral_panel.h

* merge

* move to steering panel

* no need for this

* live params in a thread

* no live for now

* new structs

* more ui

* more flexible

* more ui

* no longer needed

* another ui

* cereal changes

* bump opendbc

* simplify checks

* all in one place

* split Enhanced Lat Accel

* handle unrecognized platform

* test for fingerprinting

* fix fingerprint

* NNLC: Mock data for unrecognized cars

* fix fingerprints

* test to verify model loading

* bump neural_network_data

* use pytest

* use different one for now

* fix ui preview alignments

* typing

* more type

* show a platform

* show match

* init params for tests

* ok ruff

* make sure to loop through tests

* ok again ruff

* ok we need this lol

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-03-22 09:40:29 -04:00
Jason Wen d21e351003 Controls: Lateral Accel Torque Control Extension (#690)
* init

* more init

* keep it alive

* fixes

* more fixes

* more fix

* new submodule for nn data

* bump submodule

* update path to submodule

* spacing???

* update submodule path

* update submodule path

* bump

* dump

* bump

* introduce params

* Add Neural Network Lateral Control toggle to developer panel

This introduces a new toggle for enabling Neural Network Lateral Control (NNLC), providing detailed descriptions of its functionality and compatibility. It includes UI integration, car compatibility checks, and feedback links for unsupported vehicles.

* decouple even more

* static

* codespell

* remove debug

* in structs

* fix import

* convert to capnp

* fixes

* debug

* only initialize if NNLC is enabled or allow to enable

* oops

* fix initialization

* only allow engage if nnlc is off

* fix toggle param

* fix tests

* lint

* fix more test

* capnp test

* try this out

* validate if it's not None

* make it 33 to match

* align

* share the same friction input calculation

* return stock values if not enabled

* unused

* split base and child

* space

* rename

* NeuralNetworkFeedForwardModel

* less

* just use file name

* try this

* more explicit

* rename

* move it

* child class for additional controllers

* rename

* time to split out custom lateral acceleration

* move around

* space

* fix

* TODO-SP

* TODO-SP

* split nnlc and custom lat accel

* more

* not yet

* comment

* fix

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-03-20 16:01:08 -04:00
DevTekVE f0abacbc59 Merge branch 'refs/heads/master-at-17032025' into sync-17032025
# Conflicts:
#	opendbc_repo
#	selfdrive/car/card.py
#	selfdrive/car/tests/test_car_interfaces.py
#	selfdrive/car/tests/test_models.py
#	selfdrive/controls/controlsd.py
#	selfdrive/controls/lib/tests/test_latcontrol.py
#	selfdrive/pandad/panda.h
#	system/manager/process_config.py
Sync: `commaai/opendbc:master` into `sunnypilot/opendbc:master-new`
2025-03-18 01:05:34 -04:00
Shane Smiskol 5c3020844e car interfaces: each specify their own dependencies (#34874)
* remove these

* fix

* oops

* clean up

* nl

* bump
2025-03-14 22:37:49 -07:00
DevTekVE a4ef5ad982 Merge remote-tracking branch 'comma/master' into sync-20250309
# Conflicts:
#	.github/workflows/ui_preview.yaml
#	common/params_keys.h
#	msgq_repo
#	opendbc_repo
#	panda
#	selfdrive/ui/qt/offroad/firehose.h
#	selfdrive/ui/tests/test_ui/run.py
#	system/manager/process_config.py
2025-03-09 14:53:03 +01:00
Jason Wen 290383128e Sync: Fix conflicts 2025-03-09 00:53:06 -05:00
Shane Smiskol 6891b795c4 controls: limit max curvature from lateral acceleration (#34651)
* limit max curvature with lateral accel too

* not a guideline

* roll compensation in curv clip

* improve clipping and alerting

* typo

* clean up

* no float

* get ready

* good idea

* good

* redundant

* TODO

* test

* do max curvature clip last

* flip

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2025-03-03 19:47:52 -08:00
Shane Smiskol 68d22b960b rename steer_limited (#34763)
rename
2025-03-03 16:28:49 -08:00
Shane Smiskol 6723106bf5 Move vehicle_model.py to opendbc (#34681)
* move

* fix

* move test too

* bump

* better

* bump to master
2025-02-26 17:35:43 -08:00