diff --git a/opendbc/lexus_is_2018_pt_generated.dbc b/opendbc/lexus_is_2018_pt_generated.dbc index c0b653f54..08c42d6f1 100644 --- a/opendbc/lexus_is_2018_pt_generated.dbc +++ b/opendbc/lexus_is_2018_pt_generated.dbc @@ -365,6 +365,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 XXX SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX + SG_ STEER_ANGLE : 31|16@0- (0.056,0) [-500|500] "" XXX BO_ 610 EPS_STATUS: 5 EPS SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX diff --git a/opendbc/lexus_is_hybrid_2017_pt_generated.dbc b/opendbc/lexus_is_hybrid_2017_pt_generated.dbc index 528e3d7bf..47c42483a 100644 --- a/opendbc/lexus_is_hybrid_2017_pt_generated.dbc +++ b/opendbc/lexus_is_hybrid_2017_pt_generated.dbc @@ -361,6 +361,7 @@ BO_ 608 STEER_TORQUE_SENSOR: 8 XXX SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX + SG_ STEER_ANGLE : 31|16@0- (0.056,0) [-500|500] "" XXX BO_ 610 EPS_STATUS: 5 EPS SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX @@ -385,4 +386,4 @@ CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others"; CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to"; VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P"; VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled"; -VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby"; \ No newline at end of file +VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby"; diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index 570cde7ed..e7eb1771c 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -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. diff --git a/selfdrive/controls/lib/pathplanner.py b/selfdrive/controls/lib/pathplanner.py index e1dad095c..8bd715d5a 100644 --- a/selfdrive/controls/lib/pathplanner.py +++ b/selfdrive/controls/lib/pathplanner.py @@ -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: