mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-20 07:33:43 +08:00
Merge branch 'devel-en' into devel-zhs
This commit is contained in:
@@ -89,7 +89,7 @@ def get_can_parser(CP):
|
||||
signals.append(("LOW_SPEED_LOCKOUT", "PCM_CRUISE_2", 0))
|
||||
checks.append(("PCM_CRUISE_2", 33))
|
||||
|
||||
if CP.carFingerprint in NO_DSU_CAR:
|
||||
if CP.carFingerprint in NO_DSU_CAR or CP.carFingerprint == CAR.LEXUS_ISH:
|
||||
signals += [("STEER_ANGLE", "STEER_TORQUE_SENSOR", 0)]
|
||||
|
||||
if CP.carFingerprint == CAR.PRIUS:
|
||||
@@ -183,7 +183,7 @@ class CarState(object):
|
||||
self.a_ego = float(v_ego_x[1])
|
||||
self.standstill = not v_wheel > 0.001
|
||||
|
||||
if self.CP.carFingerprint in TSS2_CAR:
|
||||
if self.CP.carFingerprint in TSS2_CAR or self.CP.carFingerprint == CAR.LEXUS_ISH:
|
||||
self.angle_steers = cp.vl["STEER_TORQUE_SENSOR"]['STEER_ANGLE']
|
||||
elif self.CP.carFingerprint in NO_DSU_CAR:
|
||||
# cp.vl["STEER_TORQUE_SENSOR"]['STEER_ANGLE'] is zeroed to where the steering angle is at start.
|
||||
|
||||
@@ -30,7 +30,7 @@ class PathPlanner(object):
|
||||
self.setup_mpc(CP.steerRateCost)
|
||||
self.solution_invalid_cnt = 0
|
||||
self.path_offset_i = 0.0
|
||||
self.curvature_offset = CurvatureLearner(debug=False)
|
||||
#self.curvature_offset = CurvatureLearner(debug=False)
|
||||
|
||||
def setup_mpc(self, steer_rate_cost):
|
||||
self.libmpc = libmpc_py.libmpc
|
||||
@@ -60,13 +60,13 @@ class PathPlanner(object):
|
||||
# Run MPC
|
||||
self.angle_steers_des_prev = self.angle_steers_des_mpc
|
||||
VM.update_params(sm['liveParameters'].stiffnessFactor, sm['liveParameters'].steerRatio)
|
||||
# curvature_factor = VM.curvature_factor(v_ego)
|
||||
if active:
|
||||
curvfac = self.curvature_offset.update(angle_steers - angle_offset, self.LP.d_poly, v_ego)
|
||||
else:
|
||||
curvfac = 0.
|
||||
curvature_factor = VM.curvature_factor(v_ego)
|
||||
#if active:
|
||||
# curvfac = self.curvature_offset.update(angle_steers - angle_offset, self.LP.d_poly, v_ego)
|
||||
#else:
|
||||
# curvfac = 0.
|
||||
|
||||
curvature_factor = VM.curvature_factor(v_ego) + curvfac
|
||||
#curvature_factor = VM.curvature_factor(v_ego) + curvfac
|
||||
|
||||
# TODO: Check for active, override, and saturation
|
||||
# if active:
|
||||
|
||||
Reference in New Issue
Block a user