Here's the low-level controller for Comma AI's self-driving software. Lateral and longitudinal control, as well as actuator command are contained within. Their low level control is done in Python, on top of Android, on a smartphone. No further comment, your honor. https://github.com/commaai/openpilot/tree/devel/selfdrive/co...
Ummm... If you look in the actual lib/ directory where the work happens, you will see a bunch of high-performance C written in and generated by Acado, which is a very efficient optimization framework. It does look like there is a bunch of python logic for managing that controller, but a significant amount of work seems to have gone into performance optimization. I am curious how they prevent the Android GC from causi…
Python has a GC as well, but we turn it off for the control loop processes. https://github.com/commaai/openpilot/blob/devel/selfdrive/co...
Haters love to bring up the Python, but they never stick around long enough to explain exactly why it's a problem.