Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GM: use torque controller #25282

Closed
wants to merge 1 commit into from
Closed

GM: use torque controller #25282

wants to merge 1 commit into from

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Jul 25, 2022

Most GMs are dashcammed, so this only affects Volt, Acadia, Escalade

@sshane sshane added tuning car vehicle-specific gm labels Jul 25, 2022
@hewers
Copy link
Contributor

hewers commented Jul 26, 2022

Could delete old feedforward functions with this change? Thanks!

  # Determined by iteratively plotting and minimizing error for f(angle, speed) = steer.
  @staticmethod
  def get_steer_feedforward_volt(desired_angle, v_ego):
    desired_angle *= 0.02904609
    sigmoid = desired_angle / (1 + fabs(desired_angle))
    return 0.10006696 * sigmoid * (v_ego + 3.12485927)
  @staticmethod
  def get_steer_feedforward_acadia(desired_angle, v_ego):
    desired_angle *= 0.09760208
    sigmoid = desired_angle / (1 + fabs(desired_angle))
    return 0.04689655 * sigmoid * (v_ego + 10.028217)
  def get_steer_feedforward_function(self):
    if self.CP.carFingerprint == CAR.VOLT:
      return self.get_steer_feedforward_volt
    elif self.CP.carFingerprint == CAR.ACADIA:
      return self.get_steer_feedforward_acadia
    else:
      return CarInterfaceBase.get_steer_feedforward_default

@sshane sshane closed this Aug 3, 2022
@sshane sshane deleted the gm-torque branch August 3, 2022 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
car vehicle-specific gm tuning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants