Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Interpolate desired angle between MPC updates #553
This enhancement is part of a large group of enhancements included in a different PR. I realized that it would be easier to understand and evaluate the merits of each individual enhancement before that PR is completed. I'll be submitting many more over the next few days.
The existing lateral control logic does not interpolate between MPC updates, which creates a significant amount of noise in controls. Also, since controls and planning run in separate threads without any synchronization, the number and offset of control cycles per MPC update is irregular, creating additional noise.
This enhancement eliminates both of those noise sources by interpolating between multiple points using system time. Below are examples of standard vs interpolated values over a 2 second period.