Successful Outdoor Test Drive of the Escalade Robot

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.


3 responses to “Successful Outdoor Test Drive of the Escalade Robot

  1. If you made it this far, you may be interested in more of the technical details that most people don’t care about.

    The Arduino and Pi communicate over a serial link on a standard USB cable. The Arduino reads the compass heading and feeds that into a Proportional-Integral-Derivative algorithm to calculate the needed steering response. It is the three parameters to that algorithm that I need to fine-tune.

    The Pi has a wi-fi dongle it uses to communicate with a Linksys router. The router is powered by 8 AA batteries that I use to replace the standard wall wart. This gives me a completely portable network that I can take on the road.

    The master program on the Pi is a simple Python script that sends commands over the serial line to the Arduino. For example, the command ‘1,120,55,10000″ says to follow a heading of 120 degrees at 55% drive power for 10 seconds. The Arduino acts on this command and sends status back once a second. If the 10 seconds expires without a new command, the Arduino shuts everything down. This is a fail-safe in case the Pi loses its mind (which happened more than once when I was having some wiring problems).

    Because changing the Arduino logic requires plugging it into the laptop and uploading new code, I made sure that all the parameters and settings in the Arduino can be updated via the Python script on the Pi. It is much easier to update that script on the fly which allows for quicker turn-arounds in testing.

    One of the limiting factors with this vehicle is the very rudimentary steering system. It uses a simple DC motor with a spring-loaded gearbox and has a LOT of slippage and wobble in the mechanism. This makes it very difficult to figure out how much steering force to apply and it also means there is a large lag time between when the command goes out and when the wheels actually move. That contributes to the over-correction problem.

    Part of the fun of this build is trying to get sophisticated behavior out of such low-end hardware. And boy has it been fun…!

  2. Love it! Great progress so far! In order to get ready for AVC we’ll have to figure out what we’re going to do if/when the robot experiences a sudden external force (i.e. hit by another robot going sideways across the course). Can’t wait until I’m done making the Christmas presents for the kids so that we can start working together on getting ready for AVC.

  3. Very good for first time out. Looking forward to more vids.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s