-
Notifications
You must be signed in to change notification settings - Fork 790
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
Ford safety for LCA vehicles #812
Conversation
Glad to see someone working on Ford!
If you wrote Ford-specific tests, they don't seem to be in this PR. In fact, even the old Ford safety doesn't seem to have tests, which is why you didn't see any change in test outcomes from your changes. To get yourself started, look at I see your DBC changes haven't been accepted just yet. In order to have your new message and signal structures available for the tests to run, you'll need to do your local test development with your Panda code checked out inside a fully-built openpilot environment that also has your opendbc changes. |
1f8d438
to
b7bc27e
Compare
a1a6bc0
to
2ecd27f
Compare
I've created the unit tests file, working on adding more tests! Copied some from Tesla for now. Something to consider is that the brake signal and PCM signal are both in the same CAN message. For now, I've done this: def _brake_msg(self, brake):
values = {
"BpedDrvAppl_D_Actl": 2 if brake else 1,
"CcStat_D_Actl": 5 if self.safety.get_controls_allowed() else 0,
}
return self.packer.make_can_msg_panda("EngBrakeData", 0, values) |
# when controls are allowed, angle cmd rate limit is enforced | ||
speeds = [0., 1., 5., 10., 15., 50.] | ||
# angles = [-300, -100, -10, 0, 10, 100, 300] | ||
angles = [-23, -10, 0, 10, 23] |
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 DBC specifies that the range of angles we can command is only [-0.5, 0.5] radians... so this test needs to be updated for that. I also want to verify whether this is correct because 23.6 degrees isn't a huge range.
17f26e2
to
f4dfd1f
Compare
2b30206
to
448b800
Compare
eaa0fff
to
1a2668a
Compare
449f0c5
to
57936f9
Compare
6534af2
to
bf62d80
Compare
8979461
to
ec90842
Compare
beac36e
to
89c5a5b
Compare
Replaced by #966 |
Implementing Ford safety for new(-er) cars with LCA option.
The structure of the code is based upon the VW safety code, and the Tesla/Nissan code (other angle based cars). I used the steering angle rate limit values from the Tesla. These values might need changing, but I would appreciate guidance on where to start with that.
Related PRs