autorope / donkeycar

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

1097 refactor game controller system #1180

Open Ezward opened 1 month ago

Ezward commented 1 month ago

A proof of concept for an approach to addressing issue https://github.com/autorope/donkeycar/issues/1097. This PR is not intended to be merged; it is here so that the changes to the code can be easily seen and commented upon.

Comments on the general approach to refactoring the game controller code should be addressed to the issue. Use this PR to make comments specific to the code.

running the POC

  • These instructions assume the developer installation has been done.
  • Change the working directory to the root of the donkeycar project folder and check out the branch 1097-refactor-game-controller-system
  • Activate the donkeycar environment, source env/bin/activate
  • to run the vehicle loop python3 donkeycar/parts/controller_events.py
  • to run the simulated loop with event logging: python3 donkeycar/parts/controller_events.py --vehicle=false
Ezward commented 1 month ago

This seems like a bug in the memory.py: https://github.com/autorope/donkeycar/blob/f81750df7fb626a553e757fd792880721fc7c11e/donkeycar/memory.py#L22, why value = tuple(key) and not value = tuple(value)?