        # desired_lateral_jerk = desired_curvature_rate * CS.vEgo ** 2
        actual_lateral_accel = actual_curvature * CS.vEgo ** 2
        lateral_accel_deadzone = curvature_deadzone * CS.vEgo ** 2
  
        setpoint = desired_lateral_accel + LOW_SPEED_FACTOR * desired_curvature
        measurement = actual_lateral_accel + LOW_SPEED_FACTOR * actual_curvature
        error = setpoint - measurement
        gravity_adjusted_lateral_accel = desired_lateral_accel - params.roll * ACCELERATION_DUE_TO_GRAVITY
        pid_log.error = self.torque_from_lateral_accel(error, self.torque_params, error,
                                                       lateral_accel_deadzone, friction_compensation=False)
        ff = self.torque_from_lateral_accel(gravity_adjusted_lateral_accel, self.torque_params,
 
</s> remove FRICTION_THRESHOLD = 0.2
 </s> add FRICTION_THRESHOLD = 0.3 </s> remove LOW_SPEED_FACTOR = 200
 </s> add LOW_SPEED_X = [0, 10, 20, 30]
LOW_SPEED_Y = [15, 13, 10, 5]
      low_speed_factor = interp(CS.vEgo, LOW_SPEED_X, LOW_SPEED_Y)**2
      setpoint = desired_lateral_accel + low_speed_factor * desired_curvature
      measurement = actual_lateral_accel + low_speed_factor * actual_curvature
        # desired_lateral_jerk = desired_curvature_rate * CS.vEgo ** 2
        actual_lateral_accel = actual_curvature * CS.vEgo ** 2
        lateral_accel_deadzone = curvature_deadzone * CS.vEgo ** 2
  
      low_speed_factor = interp(CS.vEgo, LOW_SPEED_X, LOW_SPEED_Y)**2
      setpoint = desired_lateral_accel + low_speed_factor * desired_curvature
      measurement = actual_lateral_accel + low_speed_factor * actual_curvature
      low_speed_factor = interp(CS.vEgo, LOW_SPEED_X, LOW_SPEED_Y)**2
      setpoint = desired_lateral_accel + low_speed_factor * desired_curvature
      measurement = actual_lateral_accel + low_speed_factor * actual_curvature
        error = setpoint - measurement
        gravity_adjusted_lateral_accel = desired_lateral_accel - params.roll * ACCELERATION_DUE_TO_GRAVITY
        pid_log.error = self.torque_from_lateral_accel(error, self.torque_params, error,
                                                       lateral_accel_deadzone, friction_compensation=False)
        ff = self.torque_from_lateral_accel(gravity_adjusted_lateral_accel, self.torque_params,
keep keep keep keep replace replace keep keep keep keep keep
 [torqued] Fix high speed oscillations (#26338)

* modify low speed factor during high speeds and rescale friction

* update refs 
selfdrive/controls/lib/latcontrol_torque.py