This 96 second video shows the first outdoor test of a cheap RC car that I converted to an autonomous rover. I took out the remote control circuit board and added:
– An Arduino Uno microcontroller for control of the motors, steering & sensors
– A Raspberry Pi “computer on a board” for higher-level functions like Guidance and communications
– An Inertial Measurement Unit with a compass, accelerometer and gyroscope
– Additional batteries
Once the Raspberry Pi receives the Go signal from the laptop via wireless, the vehicle is completely autonomous. I am able to monitor telemetry remotely and, if necessary, issue a emergency shutdown command but other than that, the on-board electronics do everything.
The goals of this test drive are very simple. Use the compass to determine the current heading, drive 30 seconds in that direction, turn around and drive 30 seconds on the opposite heading.
You will see the vehicle swerve back and forth a lot during the drive. There are several parameters to the control system that control how quickly it reacts to a course deviation and how large and long the steering response should be. Fine tuning these parameters will make it drive in a straighter line with less of the over-correction that you see in this test.
Once I have the steering smoothed out, I’ll add logic to use the other capabilities of the IMU. This will allow me to build more sophisticated capabilities than what you see here. There’s still plenty of work to do but this vehicle has come a long way in the past month. Stay tuned for more developments.