GM: Sigmoidal Offsets (#3110)

* silverado

* Update interface.py

* quant

* Update interface.py

* Revert "Update interface.py"

This reverts commit 5ef95213e6d71f3cfe2a2ef769c0cd0235f16d10.

* Revert "quant"

This reverts commit 1cc2aebd9f88b29797c00dd37434fce89c1d5f28.

* Revert "silverado"

This reverts commit 560d9aa6fced675c656e3377dff19cd4023aea48.
This commit is contained in:
firestar5683
2026-02-05 16:08:04 -06:00
committed by GitHub
parent 2ddc95a54f
commit b175ddec75

View File

@@ -53,10 +53,10 @@ class CarInterface(CarInterfaceBase):
# This has big effect on the stability about 0 (noise when going straight)
non_linear_torque_params = NON_LINEAR_TORQUE_PARAMS.get(self.CP.carFingerprint)
assert non_linear_torque_params, "The params are not defined"
a, b, c, _ = non_linear_torque_params
a, b, c, d = non_linear_torque_params
sig_input = a * lateral_acceleration
sig = np.sign(sig_input) * (1 / (1 + exp(-fabs(sig_input))) - 0.5)
steer_torque = (sig * b) + (lateral_acceleration * c)
steer_torque = (sig * b) + (lateral_acceleration * c) + d
return float(steer_torque)
lataccel_values = np.arange(-5.0, 5.0, 0.01)