Commit Graph

40 Commits (1fee24c6123ed5d54949c93a37579bd61f292f32)

Author SHA1 Message Date
Lukas Petersson 75adb2d076 frameId in long/lat planner 2022-03-17 15:27:56 -07:00
Shane Smiskol 6be70a063d
LateralPlanner: Move lane change logic to another class (#23476)
* should work

* Revert "should work"

This reverts commit dabc2ea17a072a6c835e4bd1c75a2c1e2d10623d.

* move lane change logic to DesireHelper class

* clean up desires

clean up desires

* comments

* Revert "clean up desires"

This reverts commit 7301c921e305fcbd4746b19040631d935d50dfd9.

* Update selfdrive/controls/lib/desire_helper.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* add to files_common

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-25 13:40:03 +01:00
Jonathan Frey 0681474840
work on acados lateral MPC (#23558)
* lat_mpc: make v_ego, rotation_radius parameters instead of states

* lat_mpc: remove rotation_radius argument, since it is part of the parameters

* lat_mpc: use qp_solver_cond_N = 1

slightly faster and in line with case study in Fig. 2/ 3 in Frison2016 - https://cdn.syscop.de/publications/Frison2016.pdf
An Efficient Implementation of Partial Condensing for Nonlinear Model Predictive Control

* adapt test_lateral_mpc to formulation with parameters

* lat_mpc: set parameters in reset() and copy values

* acados_ocp_solver_pyx: make options_set useable

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-18 09:49:48 -08:00
Willem Melching f76328b426
Log MPC solver time (#23566)
* add solve time to plan output

* add to process replay ignore list

* print in CI
2022-01-18 14:51:03 +01:00
Dean Lee dbae5e7601
lateral_planner: use nympy.isnan().any() (#23500) 2022-01-12 15:56:41 +01:00
Dean Lee 35ec6ac1cb
use ndarray.tolist to convert numpy array to float (#23485) 2022-01-11 14:34:47 +01:00
Dean Lee b2beb5e6ba
controls: check contents in tuple instead of list (#23463) 2022-01-10 11:26:58 +01:00
Dean Lee 2ca0925da7
lateral_planner.py/publish: follow capnp best practices (#23359) 2022-01-02 11:55:24 -08:00
Shane Smiskol 93fd662adf
Clean up planner files (#23031)
* clean up planner files

clean up planner files

* fix plant instance
2021-11-26 14:57:39 +01:00
HaraldSchafer 24aadaf1f3
Lateral planner: lower max cost (#22960)
* prevent ping pong when tuning is not so great

* update refs
2021-11-17 20:24:10 -08:00
Jason Young 2006fff2b6
Fix momentary false blind spot alerts when changing lanes (#22819)
* reset LaneChangeDirection after finishing

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-10 17:21:36 +01:00
Vivek Aithal 2ea4feffb9
plannerd: add useLaneLines to lateralPlan (#22699)
* add laneless toggle in lateral plan message

* update cereal

* add refs
2021-10-26 14:32:41 -07:00
Harald Schafer 791de68689 plannerd: position std size check bug 2021-10-17 19:52:11 -07:00
HaraldSchafer 0dc45eaf1c
Fix 0 init bug for acados lateral (#22225)
* this is needed somehow

* new ref
2021-09-13 21:23:22 -07:00
HaraldSchafer 7081ab4fb7
Port lateral planning to ACADOS (#22080)
* lateral acados

* looks good!

* add another solve, needed for init somehow

* use copy

* init correctly

* cleanup sconstruct

* Update files_common

* update cpu usage

* reset when invalid

* fix cpu usage

* cost_set doesnt leak

* new ref

* non leaky reset

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2021-09-13 19:06:54 -07:00
Adeeb Shihadeh 9be7cf2cda remove deprecated mpc logging code 2021-08-26 13:33:43 -07:00
Mitchell Goff 05b37552f3
Retuned desire model (#21919)
* New model: d8e7f76f-7bec-4a83-af00-c0fae792527f/950

* Updated process replay refs

* Updated model replay ref
2021-08-12 21:06:26 -07:00
Mitchell Goff 15d6bbb47c
Revert "New desire model (#21729)" (#21805)
* Revert "New desire model (#21729)"

This reverts commit e83973b9b3.

* Updated process replay ref and reverted release notes
2021-07-30 14:34:29 -07:00
Mitchell Goff e83973b9b3
New desire model (#21729)
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900

* Enable keeps

* use new packet

* Send keep pulses once per second

* Updated model_replay_ref_commit

* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac

* Bump model_replay_ref_commit

* Bump submodules

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/550

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/950

* No keeps

* Bumped model replay ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2021-07-26 21:11:09 -07:00
Adeeb Shihadeh 88424ede2c
Revert model (#21571)
* Revert "New desire model (#21458)"

This reverts commit 4230d5d212.

* revert rel notes
2021-07-12 19:26:50 -07:00
HaraldSchafer 4230d5d212
New desire model (#21458)
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900

* Enable keeps

* use new packet

* Send keep pulses once per second

* Updated model_replay_ref_commit

* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac

* Bump model_replay_ref_commit

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
2021-07-07 19:44:17 -07:00
HaraldSchafer be5ddd25cd
Refactor long (#21433)
* refactor

* needs casting

* tests pass

* fix that test

* refactor in controls

* lets not go crazy

* change of names

* use constants

* better naming

* renamed

* soft constraints

* compile slack variables

* rm git conflict

* add slack variables

* unused

* new edition

* fcw

* fix tests

* dividing causes problems

* was way too slow

* take a step back

* byeeee

* for another time

* bad idxs

* little more cpu for cruise mpc

* update refs

* these limits seem fine

* rename

* test model timings fails sometimes

* add default

* save some cpu

* Revert "little more cpu for cruise mpc"

This reverts commit f0a8163ec90e8dc1eabb3c4a4268ad330d23374d.

* Revert "test model timings fails sometimes"

This reverts commit d259d845710ed2cbeb28b383e2600476527d4838.

* update refs

* less cpu

* Revert "Revert "test model timings fails sometimes""

This reverts commit e0263050d9929bfc7ee70c9788234541a4a8461c.

* Revert "less cpu"

This reverts commit 679007472bc2013e7fafb7b17de7a43d6f82359a.

* cleanup

* not too much until we clean up mpc

* more cost on jerk

* change ref

* add todo

* new ref

* indentation
2021-07-07 19:42:26 -07:00
HaraldSchafer 6838e1c82c
Refactor lateral lag compensation (#21334)
* add T_IDXS

* refactor

* fix test

* unused

* typo

* needs casting

* Update selfdrive/controls/lib/drive_helpers.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* deprecate field

* regen all

* new segs

* add todo

* split back

* clean

* bad names

* do in controls

* add arg

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-30 14:19:39 -07:00
Willem Melching de34d1a527
Determine lane chane direction in preLaneChange state (#21119)
* Determine lane chane direction in preLaneChange state

* cleanup

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-04 10:03:13 +02:00
Willem Melching a57f10c202
Fix ability to change lane change direction while in progress (#20765) 2021-04-29 13:03:16 -07:00
HaraldSchafer 0e10b74a61
MPC retune for laneless fix (#20616)
* was making wrong policy more aggresive

* allow to be set from simulator

* update refs

* put params together
2021-04-08 12:56:47 -07:00
Willem Melching 1fc7bcca43
ecam toggle (#20597)
* use ecam in ui

* needs reboot

* use in modeld

* typo

* effective FL is longer in center

* normalize zoom by focal dist

* read param before init

* make 2x as wide

* review comments

* more explicit

* fix camera offset

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
2021-04-07 19:12:35 +02:00
Willem Melching ae094042ad
add putBool/getBool wrappers to cython params class (#20611)
* add putBool/getBool wrappers to cython class

* use new API

* some more puts

* fix mockparams arguments

* add get_bool to MockParams

* typo
2021-04-07 15:36:37 +02:00
HaraldSchafer d72d433ec7
no heading cost (#20594)
* no heading cost

* live mpc weight config

* need to add stds

* make work on empty data

* no divide by 0

* update refs

* update model replay

* update proc replat

* new model replay ref
2021-04-06 23:49:29 -07:00
Adeeb Shihadeh 2319d726fb
lower min lane change speed to 30mph (#20586)
* lower min lane change speed to 30mph

* update refs
2021-04-05 15:38:53 -07:00
HaraldSchafer 7ee79c9923
New KL model + laneless toggle (#20454)
* New model: 0bf38240-6b55-42b0-bcfb-da08ff5cd0b9/650

* laneless baby

* hardcode model difference for now

* kale toggle

* kale emoji

* sensible description

* make clear it is not just for ui

* emojis dont work yet

* 9671a8fe-539f-4a04-a163-54571df21139/650

* new model

* only read param on rising edge of ignition

* update toggle text

* fix that

* update refs

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-24 01:10:31 -07:00
Adeeb Shihadeh 43ce7165c4
Remove lane change toggle and default LDW to off (#20442)
* remove lane change toggle and default LDW to off

* update refs
2021-03-22 20:55:57 -07:00
HaraldSchafer 27035131cc
Sane curvature rate limit in plannerd (#20366)
* safety limit

* should be in RADs

* add raw

* update refs
2021-03-16 15:00:03 -07:00
Willem Melching c23ec9f753
LateralPlanner should only compute curvature (#20289)
* get curvature from planner

* no need to check active

* remove that

* remove self

* liveParams not needed

* cast

* fix test bug

* fixes

* fix ui.py

* fix radians

* update refs

* update refs

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-11 21:08:51 -08:00
HaraldSchafer 8df76b3980
Always linearize, better way of compensating for lag (#20133)
* need to divide diff by 2

* simple linearization seems to work best

* update refs
2021-02-23 12:56:12 +01:00
Adeeb Shihadeh 312b681a46
cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65eb.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
2021-02-16 21:39:32 -08:00
Igor 8f9ee10b8a
Fix division by zero in lateral_planner.py (#20071)
* Fix division by zero

* Change fix logic
2021-02-16 11:43:11 +01:00
HaraldSchafer 0c900c8ce1
fix low speed lateral (#20053)
* fix low speed lateral

* update ref

* fix failing CI jobs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-02-09 15:36:58 -08:00
HaraldSchafer c3707328f5
Different lag comp (#20024)
* more sensible

* different names for different segs

* new ref

* this is checked somewhere
2021-02-05 14:01:22 -08:00
Adeeb Shihadeh 000bd226aa
Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
2021-02-03 19:57:30 -08:00