mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-01 01:43:41 +08:00
fix import
This commit is contained in:
@@ -34,7 +34,7 @@ class LatControlTorque(LatControl):
|
||||
self.use_steering_angle = self.torque_params.useSteeringAngle
|
||||
self.steering_angle_deadzone_deg = self.torque_params.steeringAngleDeadzoneDeg
|
||||
|
||||
self.nnlc = NeuralNetworkLateralControl(self)
|
||||
self.nnlc = NeuralNetworkLateralControl(self, CP, CI)
|
||||
|
||||
def update_live_torque_params(self, latAccelFactor, latAccelOffset, friction):
|
||||
self.torque_params.latAccelFactor = latAccelFactor
|
||||
|
||||
@@ -76,11 +76,11 @@ def roll_pitch_adjust(roll, pitch):
|
||||
|
||||
|
||||
class NeuralNetworkLateralControl:
|
||||
def __init__(self, lac_torque):
|
||||
def __init__(self, lac_torque, CI, CP):
|
||||
self.lac_torque = lac_torque
|
||||
self.CI = lac_torque.CI
|
||||
self.CP = lac_torque.CP
|
||||
self.CP_SP = lac_torque.CI.CP_SP
|
||||
self.CI = CI
|
||||
self.CP = CP
|
||||
self.CP_SP = CI.CP_SP
|
||||
self.params = Params()
|
||||
|
||||
# NN model takes current v_ego, lateral_accel, lat accel/jerk error, roll, and past/future/planned data
|
||||
|
||||
Reference in New Issue
Block a user