Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LatControlTorque: clean up class variable #24526

Merged
merged 6 commits into from
May 13, 2022
Merged

Conversation

ClockeNessMnstr
Copy link
Contributor

just moving the self assignments to the superclass which is already called with CI/CP

@ClockeNessMnstr
Copy link
Contributor Author

ClockeNessMnstr commented May 13, 2022

Yes, CI is not in super, self.CP and self.CI isn't used in any child classes

Could probably just remove the self.CP = CP in torque. Edit: saved self.kf instead.

@sshane
Copy link
Contributor

sshane commented May 13, 2022

If you subclass, your init signature must be the same. The angle subclass doesn't have an init function for example and controlsd always passes both CP and CI

@sshane sshane changed the title cleanup self.CI/CP assignment in latcontrol.py LatControlTorque: clean up class variable May 13, 2022
@sshane sshane merged commit a693b3a into commaai:master May 13, 2022
spektor56 pushed a commit to spektor56/ghostpilot that referenced this pull request May 14, 2022
* move to super

* no class variable

* there's CP

* whitespace

* drop CI from latcontrol super

* Revert "drop CI from latcontrol super"

This reverts commit 9218273.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
spektor56 pushed a commit to spektor56/ghostpilot that referenced this pull request May 17, 2022
* move to super

* no class variable

* there's CP

* whitespace

* drop CI from latcontrol super

* Revert "drop CI from latcontrol super"

This reverts commit 9218273.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
spektor56 pushed a commit to spektor56/ghostpilot that referenced this pull request May 17, 2022
* move to super

* no class variable

* there's CP

* whitespace

* drop CI from latcontrol super

* Revert "drop CI from latcontrol super"

This reverts commit 9218273.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
@ClockeNessMnstr ClockeNessMnstr deleted the CP-CI branch May 18, 2022 22:11
rjsmith1999 pushed a commit to rjsmith1999/openpilot that referenced this pull request Jun 6, 2022
* move to super

* no class variable

* there's CP

* whitespace

* drop CI from latcontrol super

* Revert "drop CI from latcontrol super"

This reverts commit 9218273.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
(cherry picked from commit a693b3a)
rjsmith1999 pushed a commit to rjsmith1999/openpilot that referenced this pull request Jun 8, 2022
* move to super

* no class variable

* there's CP

* whitespace

* drop CI from latcontrol super

* Revert "drop CI from latcontrol super"

This reverts commit 9218273.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
(cherry picked from commit a693b3a)
ntegan1 pushed a commit to ntegan1/apilot that referenced this pull request Jun 16, 2022
* move to super

* no class variable

* there's CP

* whitespace

* drop CI from latcontrol super

* Revert "drop CI from latcontrol super"

This reverts commit 9218273.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
rjsmith1999 pushed a commit to rjsmith1999/openpilot that referenced this pull request Jun 27, 2022
* move to super

* no class variable

* there's CP

* whitespace

* drop CI from latcontrol super

* Revert "drop CI from latcontrol super"

This reverts commit 9218273.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
rjsmith1999 added a commit to rjsmith1999/openpilot that referenced this pull request Jun 27, 2022
commit d066702
Author: ClockeNessMnstr <locke.dftc@gmail.com>
Date:   Tue Jun 7 12:41:03 2022 -0400

    update DH names + notes for MPC output curvatures (commaai#24701)

    * update names + notes for MPC outputs

    "current_curvature" is not the correct description of what the MPC is outputting in it's curvature_ego state.
    The MPC is integrating it's free variable, curvature_rate, such that curvature[0] is actually the desired_curvature before any delay.
    inversely: the curvature_rate_desired is the desired rate of change to the setpoint and not the actual curvature rate.

    If we were to set the initial curvature = measured curvature in the MPC initiation these names would be correct.
    This was possibly how it was initially set up but the nomenclature here is now confusing.

    * more notes

    * match

    * Clarify commaai#1

commit cb82478
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Fri May 27 10:21:02 2022 -0700

    Tssp prius torque control (commaai#24669)

    * use llk

    * use steering sensor at low speed stil

    * Try more simple

    * rm prius tune

    * updated ref

commit f1f7a0b
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Tue May 24 17:52:33 2022 -0700

    Rerevert torque control (commaai#24649)

    * Revert "Revert torque control (commaai#24565)"

    This reverts commit 9f8b037.

    * Move tune out of car specific stuff

    * Update ref commit

commit 041c255
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Tue May 17 19:00:57 2022 -0700

    Revert torque control (commaai#24565)

    * torque reversal start

    * Fix carmodel tests

    * Update ref

    * update ref

    * Elif is better than if

commit 14f5dab
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Fri May 20 13:50:47 2022 -0700

    Latcontrol torque: integrator need not be reset (commaai#24606)

    slow integrators need not be reset

commit 9221f3f
Author: ClockeNessMnstr <locke.dftc@gmail.com>
Date:   Fri May 13 19:52:20 2022 -0400

    LatControlTorque: clean up class variable (commaai#24526)

    * move to super

    * no class variable

    * there's CP

    * whitespace

    * drop CI from latcontrol super

    * Revert "drop CI from latcontrol super"

    This reverts commit 9218273.

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

commit efb4dbd
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Fri May 6 22:17:21 2022 -0700

    Latcontrol torque: fix integrator induced ping pong (commaai#24458)

    * Latcontrol torque: fix integrator induced ping pong

    * Reset on disengage since unwind resets anywayh

    * Might be overkill

    * rm whitespace

    * update ref

commit d105ae2
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Mon May 2 14:42:18 2022 -0700

    Latcontrol torque: update tuning (commaai#24357)

    * Little more chill

    * Update ref

    * Update refs

commit 0ce2b58
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Apr 28 00:42:52 2022 -0700

    Clean up controllers (commaai#24340)

    * clean up lat controllers

    * pass CP once

    * sort

commit 47b162c
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Apr 27 01:18:05 2022 -0700

    LatControlTorque: fix deadzone and missing steer saturated warning (commaai#24294)

    * fix steer saturated alert and deadzone

    * fix and formatting

    * update refs

    * update refs

    * not needed

    * remove

commit 51a7ef2
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Wed Apr 20 11:26:24 2022 -0700

    Latcontrol torque: max_torque rename (commaai#24265)

commit 33e00f6
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Tue Apr 19 19:34:31 2022 -0700

    Lateral torque-based control with roll on TSS2 corolla and TSSP rav4 (commaai#24260)

    * Initial commit

    * Fix bugs

    * Need more torque rate

    * Cleanup cray cray control

    * Write nicely

    * Chiiil

    * Not relevant for cray cray control

    * Do some logging

    * Seems like it has more torque than I thought

    * Bit more feedforward

    * Tune change

    * Retune

    * Retune

    * Little more chill

    * Add coroll

    * Add corolla

    * Give craycray a good name

    * Update to proper logging

    * D to the PI

    * Should be in radians

    * Add d

    * Start oscillations

    * Add D term

    * Only change torque rate limits for new tune

    * Add d logging

    * Should be enough

    * Wrong sign in D

    * Downtune a little

    * Needed to prevent faults

    * Add lqr rav4 to tune

    * Try derivative again

    * Data based retune

    * Data based retune

    * add friction compensation

    * Doesnt need too much P with friction comp

    * remove lqr

    * Remove kd

    * Fix tests

    * fix tests

    * Too much error

    * Get roll induced error under 1cm/deg

    * Too much jitter

    * Do roll comp

    * Add ki

    * Final update

    * Update refs

    * Cleanup latcontrol_torque a little more
ntegan1 pushed a commit to ntegan1/apilot that referenced this pull request Jul 12, 2022
* move to super

* no class variable

* there's CP

* whitespace

* drop CI from latcontrol super

* Revert "drop CI from latcontrol super"

This reverts commit 9218273.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants