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

Delete unneeded/unused templates and document the rest #950

Open Ezward opened 2 years ago

Ezward commented 2 years ago

Currently there is no documentation of the templates and how to use them except for complete.py. We do have some templates that are valuable as other ways to approach creating an autopilot

The simulator.py template is necessary for the simulator.

The just_drive.py template seems to just drive a in straight line; I'm not sure that is useful except maybe to debug your drive train; we could do that with a part in the complete template rather than have whole template for that; or we make it part of a calibration template.

I'm not sure what the basic.py template is for. If it is to simplify the choice of camera and drive train, then perhaps we should tackle that problem more generally. There is another ticket to pull out the camera and drive train configuration code into methods that can be called from any template; so that will make all templates a little shorter. We could also look at rationalizing all the configuration values themselves; we have lots of drive trains that use pwm or duty cycle and they all have their own variables for them. Same with steering. In any case, it's not clear to me that the basic.py template is widely used. When giving help in the discord it seems like we are always assuming the complete.py template.

The square.py template seems like a little proof-of-concept for training a categorical model. I have no idea really why we have this. Do we need this?

The arduino_drive.py template seems to be a proof of concept for an a drivetrain that uses an arduino and the Arduino Firmata sketch to do motor control. I'm dealing with refactoring the drive trains in another issue (945) and we may make that a generally available drive train or we may delete it. In either case, we don't need this template.

So to me is seems that these templates are important:

I think the others must be justified or removed.

Those that we keep need to be better documented both in the code (their header comments are all basically identical) and in the actual documentation.

Ezward commented 1 year ago

Now that we have completed upgrading the computer vision template (cv_control.py) and the path follow template (path_follow.py) it seems reasonable to remove the other templates.