Introduction: Color Following AR Parrot Drone

About: I build robots to encourage others to do the same. I believe the future is in robotics and playing a part for the future is my passion. Check out my website to see what else I'm up too. :)
Hi! Do you have an AR Parrot Drone? Fun, aren't they? How would you like your drone to follow your red shirt, or unique glyph photo. Or maybe remote control your drone with a joystick, wii remote or voice recognition. Even better, how cool would it be to have your drone remote controlled from another location over the internet? Yeah, thought so!

All of those scenarios are possible, but in this tutorial i'm going to cover the Color following ability.


Below is a video that covers the next few steps.

Step 1: Download EZ-Builder

The software we will use to control the AR Drone is EZ-Builder.

To download and install EZ-Builder:
  1. Visit http://www.ez-robot.com/EZ-Builder
  2. Scroll to the Download section
  3. Select Download from the EZ-Builder Robot Control Software
  4. Follow through with the installation procedure

Step 2: Connect Over WiFi

You will require a WiFi connection to the AR Parrot Drone from your computer.
  1. Power the AR Drone by connecting the battery
  2. Wait until the lights signal the device is ready
  3. On your WiFi enabled PC, connect to the Drone by selecting the wireless network. In the included photo, the wireless network of my drone is called EZ-Robot

Step 3: Configure EZ-Builder

Now it's time to load EZ-Builder and create a project to control your AR Parrot Drone.
  1. Locate EZ-Builder from the Start Menu
  2. Select and run EZ-Builder

Now let's add the Movement Panel for the AR Drone
  1. Select Add Control from the top menu
  2. Locate AR Drone from the list of categories
  3. Select Movement Panel from the sub menu

It's camera time! Let's add a Control to see the camera visual of the AR Drone
  1. Select Add Control from the top menu
  2. Select Camera from the list of categories
  3. Select Camera Device from the sub menu

Step 4: EZ-Builder Calling AR Drone

Hello AR Drone, can you hear me?

Let's connect the EZ-Builder to the Drone so we can now control it and see the image...
  1. Ensure you are still connected to the AR Drone via WiFi.
  2. On the AR Drone Movement Panel, press the Connect button.
  3. Once the button has been renamed to Disconnect, press the Camera On button.
  4. In the Camera control, select AR_Drone from the Video Device drop down

Now you should see the video image from the AR Drone's camera! Sweeeeeeeeet.

Step 5: Learn the Controls

Before we get the AR Drone chasing your colored object, let's first make sure you can fly the Drone with the computer's keyboard. The EZ-Builder software will use the flight data from the Drone to aid in stabilization... The software can only help so much! Make sure you're in a Flight Friendly zone :)

To take off..
  1. Press the Flat Trim button once the AR Drone is on a flat surface.
  2. Press Take-Off to have the drone begin flying
  3. Move your cursor into the black box beneith the control windows and click.
  4. Now that you have focus moved into the black box, you have control with the arrow keys of your computer's keyboard.

Forward will cause your Drone to fly forward. Left and Right will turn left or right, respectively. The Q and W keys will strafe left and right.

Landing...
  1. Press the Land button to land the Drone.

Step 6: Configure Color Tracking

Once you are familiar with flying the Drone with the keyboard, now let's enable color tracking!
  1. Connect to the EZ-B Robot Controller
  2. Press Config in the Camera control
  3. Select Movement Tracking checkbox
  4. De-select Allow Forward Movement checkbox
  5. Select Allow Left/Right Movement checkbox
  6. Press Save
We de-selected the forward movement checkbox so your Drone does not chase colored objects in the forward direction. If you are confident with the environment settings, you can re-enable this option... Just remember, the drone will chase the color like a bull!

Back in the main Camera Control, we now have to enable Color tracking.
  1. Select Color from the tracking type checkbox list
  2. Select the Color settings tab
  3. Tune the Color Brightness value until only the colored object is detected

Now you may press the Take-Off button from the AR Drone control and your drone will automatically turn to follow the specified color.

Some important notes:
  • Operate the drone in a flight safe area!
  • Cover or hide any colored objects in the area that match the tracking color
  • Bright environments are important for proper detection. Fine tune the Color Brightness for your lighting condition
  • To detect the colored object from a greater distance, tune the Min Object Size value

You may now play around with other Controls found in EZ-Builder to control your AR Drone...
  • Speech Recognition
  • HTTP Server
  • Wii Remote
  • Joystick
  • Custom Scripting

Consider mounting the EZ-B Controller on the shell of your AR Parrot Drone for fully autonomous exploration! Attach HC-SR04 distance sensors to the front, rear and sides of the indoor Drone shell. Now your Drone can self navigate down hallways and avoid obsticles!