Commit Graph

1150 Commits

Author SHA1 Message Date
felsager
f01391a7d9 latcontrol_torque: delay independent jerk and lower kp and lower friction threshold (#36619) 2025-11-25 10:23:02 -08:00
felsager
736e1fa7b7 Revert "latcontrol_torque: make feed-forward jerk independent of individual platform lag (#36334)"
This reverts commit fc4e5007fd.
2025-11-03 10:31:27 -08:00
felsager
177c7f1cf3 Revert "latcontrol_torque: retune torque controller (#36392)"
This reverts commit 76c5cb6d87.
2025-11-03 10:31:22 -08:00
felsager
76c5cb6d87 latcontrol_torque: retune torque controller (#36392) 2025-10-30 13:34:44 -07:00
felsager
fc4e5007fd latcontrol_torque: make feed-forward jerk independent of individual platform lag (#36334) 2025-10-30 13:29:38 -07:00
felsager
936740201c latcontrol_torque: refactor low speed factor into pid controller (#36364) 2025-10-22 11:50:37 -07:00
felsager
a2e7f3788f LateralTorqueState: log controller version and desired lateral jerk (#36421) 2025-10-22 10:56:34 -07:00
felsager
d2bb8fe537 latcontrol_torque: more descriptive variable names (#36422) 2025-10-22 10:44:14 -07:00
Harald Schäfer
b2e3dd17ea torque gains not car specific (#36404)
* torque gains not car specific

* remove opendbc interfaces longitudinal control kf field assignment that makes hitl test fail

* typo

* another typo

* bump

* bump openbc

* update ref

---------

Co-authored-by: felsager <d.felsager@gmail.com>
2025-10-20 17:16:03 -07:00
Harald Schäfer
7534b2a160 PID: no more ff gain (#36398)
* No more ff gain

* typo
2025-10-18 11:12:47 -07:00
felsager
3546b625e7 latcontrol_torque: change in kp should not affect effective low speed factor gain (#36335) 2025-10-14 13:22:17 -07:00
felsager
de805e4af7 Lateral torque controller: use measurement rate as error rate (#36291) 2025-10-09 14:57:12 -07:00
felsager
4c9ca91b98 Latcontrol: use more accurate naming for saturation time (#36286) 2025-10-09 10:34:26 -07:00
felsager
0736f325fc Latcontrol torque: cleaner low_speed_factor calculation (#36287) 2025-10-09 10:29:35 -07:00
felsager
226465e882 Latcontrol: refactor pid error to factor out lateral jerk component (#36280) 2025-10-08 18:29:54 -07:00
felsager
2deb4e6f65 Lateral controllers: pass dt (delta time) explictly (#36281) 2025-10-08 14:39:05 -07:00
felsager
9f32f217e6 Latcontrol: type annotate update inputs and clip_curvature output (#36282) 2025-10-08 14:26:53 -07:00
Shane Smiskol
1033d3d80e Desire helper: set lane change direction on entering preLaneChange state (#36074)
* set immediately to avoid flash on right lane changes

* one function

* name

* comment
2025-09-05 22:34:04 -07:00
felsager
b976135d2f torqued: apply offset (with more robust unit test) (#36075)
* torqued: apply latAccelOffset to torque control feed forward

* test learned latAccelOffset captures roll compensation bias on straight road driving, when the device is not flush in roll relative to the car

* test correct torqued latAccelOffset parameter convergence
2025-08-27 13:06:01 -07:00
Maxime Desroches
f40f7f9ece Revert "torqued: apply offset (#36005)"
This reverts commit 1d74a97ba6.
2025-08-26 21:45:49 -07:00
Harald Schäfer
1d74a97ba6 torqued: apply offset (#36005)
* torqued: apply latAccelOffset to torque control feed forward 

* test learned latAccelOffset captures roll compensation bias on straight road driving, when the device is not flush in roll relative to the car

* test correct torqued latAccelOffset parameter convergence

---------

Co-authored-by: felsager <d.felsager@gmail.com>
2025-08-25 13:50:10 -07:00
Shane Smiskol
ab44c9a4ff Torque controller: refactor calculations to be in accel space (#35790)
* clean up

* little confusing but works

* clean up

* fix

* pid outputs torque again, fix windup above max torque

* clean up

* fix

* fix

* typo

* fix conflicts

* fix PID

* cleanups

* seems correct

* updte

* inverse

* whitespace

* move

* small cleanup

* more cleanup

* update ref

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2025-08-15 11:39:56 -07:00
eFini
4536719353 longitudinal_planner: Convert self.mode to a local variable in update() (#35999)
Make 'mode' variable local
2025-08-15 09:02:38 -07:00
Harald Schäfer
455a6a586a Misc PID refactors (#35844)
* Misc PID refactors

* dead

* finish rename

* unused import

* whitespace

* typo

* fix fan controller

* pid_log

* whitespace

* integral clipping in pid

* update ref

* cleaner

* rm print

* update ref

* revert fan changes

* forgot this
2025-08-11 14:25:29 -07:00
Mitchell Goff
7413982f0d Lower ALLOW_THROTTLE_THRESHOLD (#35928)
* Lower ALLOW_THROTTLE_THRESHOLD

* Bumped process_replay refs
2025-08-05 17:35:54 -07:00
DevTekVE
9dc98b36be refactor: cleanup gravity constant handling (#35866)
* refactor: move lateral methods from init to lateral.py (#2594)

* Extracting lateral methods to lateral.py

* cleaning

* more cleaning

* more cleaning

* Making sure it remains where it should

* Leave rate_limit where it belongs

* Moving things to `car/controls/`

* Moving rate limit to get a taste of the changes

* clean

* copy verbatim

* clean up

* more

* now we can format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* No need to change order of import

* refactor: consolidate ACCELERATION_DUE_TO_GRAVITY import path

* bump opendbc

* update refs

* don't import from opendbc

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-08-02 11:20:18 -07:00
Shane Smiskol
07909906d4 controlsd: speed up number checking (#35890)
Update controlsd.py
2025-08-02 00:08:18 -07:00
Adeeb Shihadeh
4d01b7bec8 Fix up radarFault handling (#35880)
* fixup radarFault handling

* catch all

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-08-01 16:27:26 -07:00
DevTekVE
1966845fc9 refactor: move lateral methods from init to lateral.py (#35856)
* refactor: move lateral methods from init to lateral.py (#2594)

* Extracting lateral methods to lateral.py

* cleaning

* more cleaning

* more cleaning

* Making sure it remains where it should

* Leave rate_limit where it belongs

* Moving things to `car/controls/`

* Moving rate limit to get a taste of the changes

* clean

* copy verbatim

* clean up

* more

* now we can format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* No need to change order of import

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-08-01 15:17:37 -07:00
Adeeb Shihadeh
347cee4b09 big opendbc bump (#35799)
* bump

* bump

* bump

* bump

* bump

* update refs

* that doesn't work anymore

* bump

* update refs

* bump
2025-07-23 23:23:59 -07:00
Shane Smiskol
bc7d6f2677 torque controller: clean up friction (#35781)
* conditional friction inside here is confusing

* do it here

* one line

* run

* bump
2025-07-21 20:27:34 -07:00
Shane Smiskol
67dc69d3db Fix stock ACC resume signal (#35691)
* use this

* missing

* clean up
2025-07-11 14:59:27 -07:00
Armand du Parc Locmaria
3c43a000cd acados: relative rpath (#35624)
* opendbc/SharedLibrary

* acados, mpc don't link to absolute paths

* update opendbc

* include gen path, dont include abs path

* escape escape

* move rpath to relative path in mpc SConscripts

* clean up

* missing libs

* don't update opendbc

* rpath literal and rel_path

* ld library path is for runtime?

* same for darwin

* build on macos

* Update selfdrive/controls/lib/lateral_mpc_lib/SConscript

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update selfdrive/controls/lib/longitudinal_mpc_lib/SConscript

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Update selfdrive/controls/lib/longitudinal_mpc_lib/SConscript"

This reverts commit a55077f39ea248428e5916b85f24542293edefc9.

* Reapply "Update selfdrive/controls/lib/longitudinal_mpc_lib/SConscript"

This reverts commit 07a6a26292ea7f436ff43fb7efe1ad826eef689b.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-10 18:59:09 -07:00
Harald Schäfer
20fdb686ca latcontrol torque: remove option to feed back on localizer (#35659)
* Localizer is too laggy for control

* typo

* typo

* fix test

* fix imports

* Revert "fix imports"

This reverts commit 5074f8050170f974b451e00d9fdc752f09a47d57.

* fix improt

* import
2025-07-08 14:12:46 -07:00
Harald Schäfer
e503e657bc Model error deprecated with TR (#35628)
* Model error deprecated with TR

* no get speed error

* import
2025-07-02 23:36:41 -07:00
Harald Schäfer
64fd3f9860 Tomb Raider 14 (#35620)
* f7db6a09-43c5-4db9-b856-7fe1a1c231eb/400

* bd99d079-9afb-4af5-9f31-236d5c9ff15f/400

* aggressive tr: 7707a4ca-7d5e-47a2-8760-93b5004695cd/400

* bd99d079-9afb-4af5-9f31-236d5c9ff15f/400

* ae82d7a8-b74d-43b5-ab6d-d72e6040dab3/400

* revert stop distance

* comments
2025-07-02 21:50:55 -07:00
Shane Smiskol
8427bf76cf typo 2025-05-17 22:54:01 -07:00
Shane Smiskol
49c422e872 Tesla: fix angle control saturation (#35256)
* we shouldn't need this

* or this?

* stash junk

* hmm

* comment

* cc

* sadly we have to maintain behavior

* bump
2025-05-16 21:29:16 -07:00
Harald Schäfer
e9cea3ae5c Revert TR again (#35179)
Revert "Tomb Raider 7 (#35114)"

This reverts commit 0fb4aafa35.
2025-05-11 08:24:46 -07:00
Harald Schäfer
0fb4aafa35 Tomb Raider 7 (#35114)
* Revert "Revert TR (#35110)"

This reverts commit df4f2955dc.

* eb5f884a-10ad-49fd-ae5c-e2818c26e568/400

* 1cc828ab-95e5-4620-aa07-b98918b4268d/400

* 5790a2c1-b487-4bef-a3c3-db1fcd5a756d/400

* raw plan
2025-05-07 18:06:41 -07:00
Harald Schäfer
df4f2955dc Revert TR (#35110)
* Revert "Tomb raider 2 (#35029)"

This reverts commit 2c162d9b75.

* bugfix

* fix policy

* min control speed
2025-05-02 20:54:42 -07:00
Harald Schäfer
9f1e462faa Tomb Raider 6 (#35087)
* 5ec366c3-7883-4004-84a2-e4b14bac5b1d/400

* Use lat plan

* fix import

* fix

* 8d0a1b3b-9972-4e53-b9c5-3e13e5e3e404/400

* whitespace

* whitespace
2025-04-30 17:19:53 -07:00
Jason Young
37839ea0c5 controls: publish current curvature in CarControl (#34679)
* controls: publish current curvature in CarControl

* clean up

* update refs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-04-25 13:57:18 -07:00
Bruce Wayne
a029d13398 update smooth 2025-04-21 15:44:30 -07:00
Harald Schäfer
33a7d853f0 Modeld: small refactor (#35044)
refactor
2025-04-21 15:10:41 -07:00
Harald Schäfer
34514ef176 Long planner: make work with training (#35043)
* revert useless

* update ref
2025-04-21 14:11:57 -07:00
Harald Schäfer
2c162d9b75 Tomb raider 2 (#35029)
* db56b8fb-9135-4ab6-af18-99b7df7b2245/400

* fixes

* linter unhappy

* 6dbe0991-baa1-49ad-836a-ab370d1f0d92/400

* This one is good: 19387087-1005-475e-9015-9458dd8e7c5f/400

* Better every day: 39ed911c-0937-417f-97d2-58a8bb3caa53/400

* Actually end-to-end

* typo

* smooooooth: 94e23541-eb84-4fef-9f51-6a2d82aff314/360

* Revert "smooooooth: 94e23541-eb84-4fef-9f51-6a2d82aff314/360"

This reverts commit edd4f02386d83d82dd8a188985cde80ed1646b7f.

* 11632ef7-f555-489c-8480-e3bf97d9285e/400

* 08712d27-f6bd-4536-a30e-c729e5f62356/400

* 0a92a35e-1f72-476a-8cb6-c9f103f36822/400

* ee6d2394-2072-420c-a664-b4c0d4ed0b61/400

* no prev curv

* No double work

* fix bug

* smooth

* update prev action

* whitespace

* add little accel

* new ref

* Update plant.py
2025-04-17 23:21:25 -07:00
Harald Schäfer
b42ec33a63 Update modeld action logic (#35032)
* add action logic

* magic numbers

* unused

* plot accel

* more changes
2025-04-17 17:59:15 -07:00
Shane Smiskol
a2859090d8 controls: reset desired curvature while disabled (#34943)
* reset curvature while disabled

* comment

* duplicate line

* fix possible iso violation because it was unlimited while disengaged

* rename so you can't accidentally use

* update refs
2025-03-26 22:41:26 -07: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