My son asked me to build him a robot car. I did, and this is the code I use to control it. The car has an onboard camera as well, and currently I am using Motion to view the picture from my desk when the robot runs. The robot is controlled through a L298N by a Raspberry Pi 3B+ running Raspbian. See the pics folder (eventually) for pictures of the car, including wiring.
Future plans: make a lever-based controller out of a second Raspberry Pi that has the guts already attached to it.