-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Tesla: reduce jerkiness after gas overwrite #1862
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # opendbc/car/tesla/interface.py # opendbc/car/tesla/values.py
# Conflicts: # opendbc/car/tesla/interface.py
# Conflicts: # opendbc/car/tesla/interface.py
# Conflicts: # opendbc/car/tesla/interface.py
# ramp up jerk after a gas overwrite | ||
self.jerk = 0 if override else self.jerk + CarControllerParams.JERK_RATE_UP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested this, but @robbederks thought it was hacky. I'm going to take another look again in a few days to see if we're doing anything wrong first before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a few tests and it feels much smoother.
Maybe you can do a test drive.
Maybe increase the rate to 0.04-0.05
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm sure this fixes the issue in the car, but I think it's likely just masking an openpilot bug deeper down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but for now it's probably better to mask the bug than show it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's a combination of things the stock system does that we don't. On gas override it reduces the jerk and ramps it back up, then the up accel limit is near the ISO max, but because the set speed is negative it doesn't actually actuate it, just allow it. I think since we set to 0 on inactive, it thinks we're violating the accel limit and with a very high jerk it brakes to go within it (0 m/s^2):
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks much less similar on an FSD route 😞
Are you sure this works? I set both jerks to 0 and it still happens |
# Conflicts: # opendbc/car/tesla/fingerprints.py
It's definitely working for me. I have to test setting jerk to 0. |
Ramping up the jerk after overriding the gas helps to make it feel less jerky.