8000 Tesla: fix angle control saturation by sshane · Pull Request #35256 · commaai/openpilot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tesla: fix angle control saturation #35256

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

Merged
merged 8 commits into from
May 17, 2025
Merged

Tesla: fix angle control saturation #35256

merged 8 commits into from
May 17, 2025

Conversation

sshane
Copy link
Contributor
@sshane sshane commented May 17, 2025

Closes #35050. Remove carState angle diffing, as that's delayed by steerActuatorDelay or more. Now we match the torque controller, where this field is if we're maxing out the carcontroller limiting.

Behaves very similar to torque cars now (we can probably lower the timer of 1s now to be like torque cars):

some comments:
3fe6024

Tesla is a new exception in that carOutput.steeringAngleDeg actually captures when it maxes out both accel and jerk. For Toyota, Ford Q3, and Nissan, it only captures maxing out jerk, not accel, so we won't alert in many cases for these cars. Merging something that fixes Tesla first, then we can improve the other cars

@sshane sshane changed the title Fix angle control saturation Tesla: fix angle control saturation May 17, 2025
@sshane sshane added bugfix car vehicle-specific tesla labels May 17, 2025
@sshane sshane merged commit 49c422e into master May 17, 2025
15 of 17 checks passed
@sshane sshane deleted the angle-sat branch May 17, 2025 04:29
# note that with torque, we use this to avoid saturation as we know the max torque we can ever apply there
angle_log.saturated = bool(self._check_saturation(steer_limited_by_controls, CS, False, curvature_limited))
if self.use_steer_limited_by_controls:
# these cars' carcontrolers calculate max lateral accel and jerk, so we can rely on carOutput for saturation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: carcontrollers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix car vehicle-specific tesla
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Low speed steer saturation warning false positives in Tesla
2 participants
0