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
Rewrite locationd in C++ #2386
Comments
Hello @adeebshihadeh, you can assign me to this issue. |
Took some time today to make a graph of the work to be done. Here is the key:
The common Params module seems to be partially available in cpp, I think only the |
If anyone wants to track progress of this, they can see https://github.com/wolterhv/openpilot/tree/issue2386-wips |
We don't need to move the code generation to C++. That's fine in python/sympy. Currently a lot of time is spend in the kalman update and predict functions. Only those have to be rewritten in C++, and can be wrapped in Cython to keep as much of locationd in python as possible. Before we can do any of the actual rewriting we need some integration tests around the Kalman filter to make sure the results don't change. |
Thanks for the input Willem, I'll focus on those functions when I get back to it.
I noticed after a while that some of the modules were for code generation, but I haven't updated the diagram. Thanks for the heads-up on that too.
|
I haven't set aside much time for this until this morning. If you can take a look at this commit and let me know whether I'm on the right track from your perspective, that would be very helpful. At the moment, my code is heavily commented with reminders and pointers while I get more comfortable with the codebase. I will happily remove them before an eventual PR. (Edit: There should be at least some arguments in the testing functions which don't make sense, I plan to fix those as I get a better understanding of the context.) I basically found that rewriting the Kalman update and predict functions basically boils down to rewriting the |
We already rewrote the bare minimum to support locationd and paramsd: commaai/rednose#9. We will now rewrite the actual service in C++ to achieve the final speedup. However, we did not implement the stuff needed to run https://github.com/commaai/openpilot/blob/master/selfdrive/locationd/models/loc_kf.py with full raw GPS measurements. This requires porting If you're working on this stuff it's best to open a draft PR to the appropriate repository as soon as possible. Otherwise we can't see what you're working and we risk doing duplicate work. |
Sure, I'll give those a shot and open a draft PR. Thanks for the header! |
No description provided.
The text was updated successfully, but these errors were encountered: