-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Nissan/carcontroller: add max steering angle safeguard for nissan #33020
Nissan/carcontroller: add max steering angle safeguard for nissan #33020
Conversation
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
|
It could make sense to have a global angle limit for angle control cars that's well below the max of any car. Also would be nice if CANPacker gave a warning for out of range values instead of wrapping |
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.
The change itself looks fine, but let's get this fixed up in the CANPacker too:
- CANPacker prints a warning when this happens
- CANPacker can optionally assert on that warning, and we'll set that option in CI. similar to
PYTHONWARNINGS=error
or-Werror
This sounds nice, though I'm hesitant to put up PRs for this knowing very little on car stuff. maybe just get the max angle from the angle possible from angle-based cars? |
We've moved the car interfacing code to our PR_NUMBER=33045
curl -L https://github.com/commaai/openpilot/pull/$PR_NUMBER.patch | sed -e 's/selfdrive\/car/opendbc_repo\/opendbc\/car/g' | git apply -v --reject Simply replace the PR number with your own. Once done, add the files, fix any conflicts, and open a new PR. Alternatively, you may start a new PR from scratch if that is easier for you. |
Resolves: commaai/opendbc#1145
Unlikely this is going to happen in real scenario, but I think it's worth to have a safeguard. It seems that panda decodes by adding a 1310 offset to the angle
https://github.com/commaai/panda/blob/f6375848ca393a9483921665b6a2d131d7ec9b20/board/safety/safety_nissan.h#L107