mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-05 17:45:40 +08:00
rename
This commit is contained in:
+2
-2
@@ -35,7 +35,7 @@ def get_lookahead_value(future_vals, current_val):
|
||||
return min_val
|
||||
|
||||
|
||||
class NeuralNetworkLateralControlBase:
|
||||
class LatControlTorqueExtBase:
|
||||
def __init__(self, lac_torque, CP):
|
||||
self.model_v2 = None
|
||||
self.model_valid = False
|
||||
@@ -60,7 +60,7 @@ class NeuralNetworkLateralControlBase:
|
||||
# Scaling the lateral acceleration "friction response" could be helpful for some.
|
||||
# Increase for a stronger response, decrease for a weaker response.
|
||||
self.lat_jerk_friction_factor = 0.4
|
||||
self.lat_accel_friction_factor = 0.7 # in [0, 3], in 0.05 increments. 3 is arbitrary safety limit
|
||||
self.lat_accel_friction_factor = 0.7 # in [0, 3], in 0.05 increments. 3 is arbitrary safety limit
|
||||
|
||||
# precompute time differences between ModelConstants.T_IDXS
|
||||
self.t_diffs = np.diff(ModelConstants.T_IDXS)
|
||||
@@ -32,7 +32,7 @@ from openpilot.common.params import Params
|
||||
from openpilot.common.filter_simple import FirstOrderFilter
|
||||
from openpilot.selfdrive.modeld.constants import ModelConstants
|
||||
from openpilot.sunnypilot.selfdrive.controls.lib.nnlc.flux_model import FluxModel
|
||||
from openpilot.sunnypilot.selfdrive.controls.lib.nnlc.nnlc_base import NeuralNetworkLateralControlBase
|
||||
from openpilot.sunnypilot.selfdrive.controls.lib.latcontrol_torque_ext_base import LatControlTorqueExtBase
|
||||
|
||||
|
||||
# At a given roll, if pitch magnitude increases, the
|
||||
@@ -44,9 +44,9 @@ def roll_pitch_adjust(roll, pitch):
|
||||
return roll * math.cos(pitch)
|
||||
|
||||
|
||||
class NeuralNetworkLateralControl(NeuralNetworkLateralControlBase):
|
||||
class NeuralNetworkLateralControl(LatControlTorqueExtBase):
|
||||
def __init__(self, lac_torque, CP, CP_SP):
|
||||
NeuralNetworkLateralControlBase.__init__(self, lac_torque, CP)
|
||||
LatControlTorqueExtBase.__init__(self, lac_torque, CP)
|
||||
|
||||
self.lac_torque = lac_torque
|
||||
self.params = Params()
|
||||
|
||||
Reference in New Issue
Block a user