-
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
liveParams future long-actuator-delayed pitch #25467
Conversation
missed pitch cleanup bump cereal
Route: c11fcb510a549332|2022-08-17--19-03-56 |
I verified that this would work with plot juggler beforehand. That is, I found that I could control the time-amount of pitch prediction by using farther values of model.orientation.y[]. A farther predicted pitch (higher index in orientation.y) will shift the green path to the left, predicting the future pitch by an even greater amount of time, and a closer predicted pitch will move the green path to the right. However, I also looked into doing this for roll compensation (so that it could be applied in advance of steering actuator delay, the way a human responds to expected changes in roll), but for roll, you don't get the same level of predictive capacity. Here's a smoothed live-params roll with and without future predicted roll added in (yellow and blue lines respectively), compared to live-params roll (cyan) and calibrated orientationNED pitch (purple). Here I'm using model.orientation.x[10] for the yellow line. That value should be around 0.8s into the future, yet it only predicts the non-predictive smoothed pitch by around 0.1s, and sometimes not at all. I speculate this is because the predicted pitch is simply more accurate than the predicted roll. The reason for this is that road pitch changes similarly in rate and magnitude regardless of vehicle. Roll, however, as recorded by a sensor device over a meter above the ground, will vary from vehicle to vehicle based on differences in the vehicle suspension/tire pressure/etc. This makes the data from many different cars much less likely to lead to a consistent result for predicted roll. Cases where road roll changes gradually and deliberately would be better predicted, but those are also the cases where the difference of 0.2s (steer actuator delay) in actuation is less noticeable to the driver. What I would like to do is make openpilot turn ahead of time for sudden and short-lived changes in road roll, like when passing an intersection on a crowned road, but it seems that may not be possible with the current model predictions. If they were to improve, this method should work for roll as well as it does now for pitch. |
I'd like to see an example of where this method produces unreliable results @sshane, @nuwandavek. I've looked at tons and tons of log data and seen that all this does is consistently predict future pitch by the desired amount of time, with very high accuracy. |
part of PR stack.
But I don't know how to submit a PR to commaai/openpilot that's comparing two branches in the opgm repo, so the layers of the PR stack will include the commits from the previous.