From 3765a443f6d8a0d584c8c203ea583389742c6314 Mon Sep 17 00:00:00 2001 From: "Mr.one" Date: Sat, 19 Apr 2025 10:11:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opendbc_repo/opendbc/car/volkswagen/carcontroller.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/opendbc_repo/opendbc/car/volkswagen/carcontroller.py b/opendbc_repo/opendbc/car/volkswagen/carcontroller.py index a34b2228..0e450437 100644 --- a/opendbc_repo/opendbc/car/volkswagen/carcontroller.py +++ b/opendbc_repo/opendbc/car/volkswagen/carcontroller.py @@ -68,15 +68,8 @@ class CarController(CarControllerBase): if CC.latActive: min_power = max(self.apply_steer_power_last - self.CCP.STEERING_POWER_STEP, self.CCP.STEERING_POWER_MIN) max_power = max(self.apply_steer_power_last + self.CCP.STEERING_POWER_STEP, self.CCP.STEERING_POWER_MAX) - #target_power = int(np.interp(CS.out.steeringTorque, [self.CCP.STEER_DRIVER_ALLOWANCE, self.CCP.STEER_DRIVER_MAX], + target_power = int(np.interp(CS.out.steeringTorque, [self.CCP.STEER_DRIVER_ALLOWANCE, self.CCP.STEER_DRIVER_MAX], [self.CCP.STEERING_POWER_MAX, self.CCP.STEERING_POWER_MIN])) - if CS.out.vEgo < 10 * CV.KPH_TO_MS: - # 低速时保持一个温和固定值 - target_power = 60 - else: - target_power = int(np.interp(CS.out.steeringTorque,[self.CCP.STEER_DRIVER_ALLOWANCE, self.CCP.STEER_DRIVER_MAX], - [self.CCP.STEERING_POWER_MAX, self.CCP.STEERING_POWER_MIN])) - apply_steer_power = min(max(target_power, min_power), max_power) elif self.apply_steer_power_last > 0: apply_steer_power = max(self.apply_steer_power_last - self.CCP.STEERING_POWER_STEP, 0)