Ford: use curvature without roll compensation (#27110)

* Ford: use actuators.curvature

* ford is mathless
old-commit-hash: 701b7d89b6
beeps
Shane Smiskol 2 years ago committed by GitHub
parent 7848166abf
commit eb0dcd256e
  1. 7
      selfdrive/car/ford/carcontroller.py

@ -1,4 +1,3 @@
import math
from cereal import car from cereal import car
from common.numpy_fast import clip from common.numpy_fast import clip
from opendbc.can.packer import CANPacker from opendbc.can.packer import CANPacker
@ -46,10 +45,8 @@ class CarController:
# send steering commands at 20Hz # send steering commands at 20Hz
if (self.frame % CarControllerParams.STEER_STEP) == 0: if (self.frame % CarControllerParams.STEER_STEP) == 0:
if CC.latActive: if CC.latActive:
# apply limits to curvature # apply limits to curvature and clip to signal range
apply_curvature = -self.VM.calc_curvature(math.radians(actuators.steeringAngleDeg), CS.out.vEgo, 0.0) apply_curvature = apply_std_steer_angle_limits(actuators.curvature, self.apply_curvature_last, CS.out.vEgo, CarControllerParams)
apply_curvature = apply_std_steer_angle_limits(apply_curvature, self.apply_curvature_last, CS.out.vEgo, CarControllerParams)
# clip to signal range
apply_curvature = clip(apply_curvature, -CarControllerParams.CURVATURE_MAX, CarControllerParams.CURVATURE_MAX) apply_curvature = clip(apply_curvature, -CarControllerParams.CURVATURE_MAX, CarControllerParams.CURVATURE_MAX)
else: else:
apply_curvature = 0. apply_curvature = 0.

Loading…
Cancel
Save