by bananasbandanas · 8y ago · 0 comments
We used model-predictive control which evaluated about 10k trajectories with look-ahead, which works really well even when tires begin to degrade after a few minutes. You can see the effects in the video towards the end, where the car starts to slide, but the controller manages to catch it in time.
Our CV was a bit more complex as we had to deal with missing line segments. We pre-processed the camera image with a distance transform, then used an optimization pass written in opencl to fit a 3rd-order polynomial to the image.
Instead, we built an empirical transfer function from (target yaw rate, speed) -> steering wheel angle. To get to this function, we measured the yaw rate during a steady-state circular test at different speeds and steering wheel angles. Then do some kind of regression to get a continuous function. During the test, also eyeball when the tires start to slip, then use this to limit max lateral velocity.
Of course this does not take into account changing tire conditions at all. We thought about estimating the slip angle from CV or using controller oscillations as indicators, but never got around to it.
I had some of the vehicle parameters as part of my EKF for a while, but it led to some instabilities in the control.
The main problem is that it's really hard to know what the car's instantaneous lateral velocity is. I think the best you can do is check the difference of velocity*gyro yaw rate and lateral accelerometer measurement to get a noisy lateral acceleration measurement, and that can tell you how well your tires are hooking up. I might try fitting a least-squares model on the fly with something like that.