Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Jan 23, 2025
1 parent 94124b3 commit 22ed1a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions opendbc/car/honda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ def update(self, can_parsers) -> structs.CarState:
v_wheel = (ret.wheelSpeeds.fl + ret.wheelSpeeds.fr + ret.wheelSpeeds.rl + ret.wheelSpeeds.rr) / 4.0

# blend in transmission speed at low speed, since it has more low speed accuracy
v_weight = np.interp(v_wheel, v_weight_bp, v_weight_v)
v_weight = float(v_weight)
v_weight = float(np.interp(v_wheel, v_weight_bp, v_weight_v))
ret.vEgoRaw = (1. - v_weight) * cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] * CV.KPH_TO_MS * self.CP.wheelSpeedFactor + v_weight * v_wheel
ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw)

Expand Down
4 changes: 2 additions & 2 deletions opendbc/car/toyota/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def update(self, CC, CS, now_nanos):

# GVC does not overshoot ego acceleration when starting from stop, but still has a similar delay
if not self.CP.flags & ToyotaFlags.SECOC.value:
a_ego_blended = np.interp(CS.out.vEgo, [1.0, 2.0], [CS.gvc, CS.out.aEgo])
a_ego_blended = float(np.interp(CS.out.vEgo, [1.0, 2.0], [CS.gvc, CS.out.aEgo]))
else:
a_ego_blended = CS.out.aEgo

Expand Down Expand Up @@ -287,7 +287,7 @@ def update(self, CC, CS, now_nanos):
new_actuators = actuators.as_builder()
new_actuators.steer = apply_steer / self.params.STEER_MAX
new_actuators.steerOutputCan = apply_steer
new_actuators.steeringAngleDeg = float(self.last_angle)
new_actuators.steeringAngleDeg = self.last_angle
new_actuators.accel = self.accel

self.frame += 1
Expand Down

0 comments on commit 22ed1a4

Please sign in to comment.