Open DocGarbanzo opened 3 years ago
I think this is great and long awaited one. It’s particularly painful to specify argument in each part.
To add to the current state: lots of the parts code have no protection or whatsoever of accessing variables from worker thread(run_threaded) and main thread(update, etc), makes the code not reliable(quite often stale when exiting a drive session) and looks loose.
Redesign the vehicle loop
Current state
Currently we are using blocking or threaded parts using the python
threading
library. Also, we need to specify specific arguments to each part'srun
function, which is poor OO design.Future plan
asyncio
probably in the form oftrio
(https://trio.readthedocs.io/en/stable/) to run all parts independently of each other at independent frequencies.yaml
filerun
. Parts should read/write to a common memory object~/mycar
directory, these can then be used in the car w/o tinkering w/ the donkeycar code