autorope / donkeycar

Open source hardware and software platform to build a small scale self driving car.
http://www.donkeycar.com
MIT License
3.13k stars 1.29k forks source link

Redesign the vehicle loop based on concurrency and not multithreading #892

Open DocGarbanzo opened 3 years ago

DocGarbanzo commented 3 years ago

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's run function, which is poor OO design.

Future plan

sctse999 commented 3 years ago

I think this is great and long awaited one. It’s particularly painful to specify argument in each part.

fengye commented 3 years ago

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.