steer at zero

pull/27494/head
Shane Smiskol 2 years ago
parent 96643bab94
commit 302b6476bc
  1. 2
      selfdrive/car/toyota/values.py
  2. 4
      selfdrive/controls/controlsd.py
  3. 2
      selfdrive/controls/lib/latcontrol.py
  4. 2
      selfdrive/controls/lib/latcontrol_angle.py

@ -23,11 +23,9 @@ class CarControllerParams:
# stock LTA is 0 to 0.05 going straight
# and 0.1 to 0.4 when turning (max seen is 0.6303)
ANGLE_RATE_LIMIT_UP = AngleRateLimit(speed_bp=[0., 5., 15.], angle_v=[5., .8, .15])
ANGLE_RATE_LIMIT_DOWN = AngleRateLimit(speed_bp=[0., 5., 15.], angle_v=[5., 3.5, 0.4])
# ANGLE_RATE_MAX = 2.0
# needs to be within +-3 degrees of current angle to avoid windup
ANGLE_DELTA_MAX = 3.0

@ -571,8 +571,8 @@ class Controls:
CC = car.CarControl.new_message()
CC.enabled = self.enabled
# Check which actuators can be enabled
CC.latActive = self.active and not CS.steerFaultTemporary and not CS.steerFaultPermanent and \
CS.vEgo > self.CP.minSteerSpeed and not CS.standstill
CC.latActive = self.active and not CS.steerFaultTemporary and not CS.steerFaultPermanent # and \
# CS.vEgo > self.CP.minSteerSpeed and not CS.standstill
CC.longActive = self.enabled and not self.events.any(ET.OVERRIDE_LONGITUDINAL) and self.CP.openpilotLongitudinalControl
actuators = CC.actuators

@ -3,7 +3,7 @@ from abc import abstractmethod, ABC
from common.numpy_fast import clip
from common.realtime import DT_CTRL
MIN_STEER_SPEED = 0.3
MIN_STEER_SPEED = 0.0
class LatControl(ABC):

@ -10,7 +10,7 @@ class LatControlAngle(LatControl):
def update(self, active, CS, VM, params, last_actuators, steer_limited, desired_curvature, desired_curvature_rate, llk):
angle_log = log.ControlsState.LateralAngleState.new_message()
if not active:
if CS.vEgo < MIN_STEER_SPEED or not active:
angle_log.active = False
angle_steers_des = float(CS.steeringAngleDeg)
else:

Loading…
Cancel
Save