AR Drone 2.0 Development Environment Setup and Run!!

Hello Everyone:)

From couple of months, I am working on Drone Technology. I have set a simple objective like “controlling the drone through computer” by passing commands.  With respect to commands I passed the Drone should in-act (Like Take-off, Land, Turn Left, Turn Right, and Flip). By keeping this simple objective I started exploring various drones available. The Drone that I found which is ease to control and with reasonable price is AR Parrot 2.0.

What is the AR Drone?

The AR Drone is a Quadcopter created by Parrot. It is mainly used as a flying video game, and several games has been released using Augmented Reality.


  1. When flying outdoor the AR Drone 2.0 can be set in a light and low wind drag configuration.
  2. When flying indoor requires the drone to be protected by external bumpers.


  • Forward 720p HD with 92 Degree wide angle
  • Vertical 240p with 64 Degree wide angle

Sensors: Accelerometer, Magnetometer, Pressure, 3 axis gyroscope.

Wi-Fi Network & Connection:

When the drone is turned on, it automatically creates an ad-hoc Wi-Fi. The controlling device connects to the Wi-Fi, and communicates with the drone.

Typically Drone IP Address will be and Drone DHCP server assigns new IP Address to Device between numbers 2-4.

After connecting to Drone Wi-Fi through PC we can check connection with a ping command.

                                                                      $ ping

If connection is successful, the ping command will return you the time needed for data to go back and forth to the drone.

The Wi-Fi is used both for sending commands to the drone as well as receiving video from the drone.




Layered Architecture

The SDK:

Parrot released a SDK to help developers creating innovation applications using the Drone. SDK is available for iPhone, Android, Windows and Unix Platforms. Here, I am only concentrating on Linux Platform.

SDK structure

The root of the archive contains several files and directory:

  • ARDroneAPI.dox: doxygen file, used to generate the documentation.
  • ARDroneLib: AR.Drone library (communication with the drone, video codecs etc.)
  • ControlEngine: files specific to the iPhone.
  • Docs: folder where the documentation is generated
  • Examples: folder containing demonstration code for each platform and the ARDrone Tool.

Building the examples

The examples are useful for several reasons:

  • To check that the system has all the needed libraries.
  • To check that the computer can communicate with the drone

The first step is to install the missing package. If you’re using Ubuntu, a script was developed to install them automatically. ARDroneLib/Soft/Build/ must be executed with the root privilege. OK is displayed when all the packages are installed.
When all the packages are installed, we are ready to compile the libraries and the examples:



cd Examples/Linux


If you get the following error message:

In file included from ..//VP_Com/linux/vp_com_serial.c:33:
..//VP_Com/vp_com_serial.h:22: error: expected ‘)’ before ‘*’ token

You need to edit the file ARDroneLib/Soft/Build/custom.makefile and change the line





We need to connect to the Wi-Fi created by the drone when it is turned on. Its name is ardrone_XXXXX, with XXXXX the ID of the drone.
By default, only two IP addresses are used:

  • Is the drone.
  • Is the device that communicates with it.

Thefore, when we are connected to the Wi-Fi, we need to set our IP address. We can use the following command:

1 sudo ifconfig wlan0 netmask


If the computer address is not, the drone won’t be able to communicate with the computer.

Compile Linux Example

  1. Navigate to SDK-> Examples->Linux
  2. Make

Executables programs will be created in the (SDK)/Examples/Linux/Build/Release

Running the SDK Demo Program


It will display various information’s about the AR Drone!

In next I will show how to control Drone Through PC with code!



2 Axis and 3 Axis Gimbal Camera system for UAV




 2 Axis and 3 Axis Gimbal Camera system for UAV

This document contains information on

  1. Introduction to UAV Camera
  2. Different Types of camera used in UAV
  3. Servo and Brushless Gimbal Camera
  4. 2 axis and 3 axis Brushless Gimbal Camera
  5. References

 UAV – An Unmanned Aerial Vehicle (UAV) is an aircraft that flies without a human pilot onboard, controlled remotely or flown autonomously via pre-programmed flight plans or other automated guidance systems. Traditionally, UAVs were largely deployed in military missions, but are increasingly being adopted by civil applications including firefighting, law enforcement, assessment of natural disasters and environmental monitoring [4].

Drones are used in several different fields. For instance, they can be used for mapping and surveying land. This type of work more than likely utilizes still photography to capture images of hills and valleys, and in areas where steep terrain is unreachable by foot [1].

For filmmaking or aerial photography produces a better quality video. If there is an extra pair of hands operating the camera, it allows for two radio transmitters-one to pilot and one to operate the actual camera. The drawback to the 3 axis is that it is heavier than the 2 axis therefore it will draw more battery life, and it is more expensive than its counterpart [3].


We heavily rely on vision to interact and navigate with the world we live in, with the advancement both in camera equipment and image processing, the use of cameras is becoming more commonly found in robotics. There are many possible applications of a camera sensor, from simply getting a raw image which could be returned to the operator, to more advanced features such as object detection and tracking, visual odometry (much like an optical mouse) and even three dimensional depth extraction giving similar data to that of the LiDAR.

Unlike humans, cameras don’t have to operate in the visual spectrum. Specialized cameras can for-instance detect heat (infrared) or ultra-violet radiation (higher and lower frequencies are possible to image, however building capable detectors and lenses become increasingly difficult) [5].

Types of Camera’s used in UAV

Direct fitting

Simply fix your camera by means of scratch, adhesive tape or glue depending on your machine. Some frames are equipped with attachments for watertight cases such as GoPro or foreseen with bars will allow to hang a little support [3].

This solution is more adapted for FPV (First Person View) or occasional video.


  • Light
  • Almost no costs


  • Every movement of the drone is visible on the image.
  • Necessity to pilot quietly if you wish to exploit your video shootings.


A gimbal is a mechanism that typically consists of rings which pivot at right angles such as a compass or chronometer that keeps an instrument horizontal in moving vessel or aircraft. Despite the object’s movement, the gimbal keeps things upright [12].


Fig 1: How a Gimbal works

How does it Work?

A modern drone gimbal uses many of the same technologies as your smart phone, video game controllers and your drone flight controller system. These new electro-mechanical devices are known by the acronym MEMS – which stands for Micro-Electro-Mechanical Systems. We will see them described by more specific names and functions such as IMU (Inertial Measurement Units), Accelerometers and Gyroscopes. In almost all cases, the functions are somewhat similar – taking a mechanical force (like you swinging your hand with a Wii controller in it) and translating it to an electronic signal which can then be fed into a computer.

Bringing it all together

To make the gimbal work requires a LOT of computing power – this is often encased in a circuit board called the controller. This board also contains the MEMS as well as firmware (built-in software) which the manufacturers has created.

This controller sends out – many times each second – commands to the 3 brushless motors that stabilize the camera. These commands not only keep the camera level, but can be tuned to remove most of the vibration caused by the propellers and flight motors on the drone itself.

What makes a good gimbal?

  • Vibrations isolated from the frame: This is important for video regardless of whether a gimbal is used. Typically, rubber dampers are used, but other methods are possible such as sorbothane gels, closed-cell foam, etc. Also, tight and rigid bearings are important to reduce resonances.
  • Closed loop control: There are two closed-loop architectures found in most multicopters: the flight controller may have a built-in function to control a gimbal (such as in the Naza/WKM, PixHawk/APM, etc), or there may be a separate/dedicated sensor and controller that controls the gimbal. The latter is preferred for performance.
  • Low-friction, high-speed motors: It used to be that servo motors were popular for stabilization. However, most hobby grade servos have some form of mechanical transmission system like an integrated gearbox, and a position feedback controller built-in. Most gimbal designers figured there is no need for the gearbox (because not that much torque is needed to swing a balanced camera around, and gearboxes introduce other problems like backlash, mechanical losses, etc). The position feedback controller built into a servo is also redundant (and possibly not configurable / closed-box), because it will be wrapped in an outer control loop to level the gimbal. So for smaller and lighter weight cameras, direct-drive brushless DC motors with separate controllers have become the standard because of their quiet, smooth operation and flexibility to configure. In the future, it is possible we may see more direct-drive servos on the market with configurable parameters, which may make these systems more modular and simple.
  • Balance: The ability to balance the weight of the camera perfectly inside the frame reduces the electric power needed for stabilization [9].

There are two types in Gimbal based Camera

  1. Servo Gimbal
  1. Brushless Gimbal

Serve Gimbal

These gimbals have generally a small size, they take on board small model-making cameras but also some other mini-cameras [7].

A servo gimbal is a cheap, lightweight gimbal that is good for RC (Radio Control Airplanes) airplanes and quadcopters. Many flight controllers support Servo Gimbals because they can plug the Servos directly in to the FC (flight controller) without worrying about having to add an additional control board.


  1. Lightweight
  2. Rather good stabilization of the image.
  3. Can be directly piloted by a large number of flight controllers.

1. Rather limited movements
2. Slight lack of fluidity with regard to stabilization


Fig: 2 Servo Gimbal

Brushless gimbal

Brushless gimbals are common because the video quality is much better. Brushless motor gimbals are great if shooting aerial photography or video. Brushless motors control the camera position and are designed to fit a variety of different camera styles and weight. Weight is the most important factor with multicoptors. The heavier a drone is the less agile it becomes. This is important for the First Person View enthusiast. The lighter the weight, the more flying time the drone has. Some view a camera gamble as a luxury and not a necessity, but again, it depends on what the drone is going to be used for [6].

1. Perfect stabilization impeccable, ultra-fluid movements
2. Freedom of movement (possibility of centering what you are shooting without being obliged to move the drone).
3. Noiseless

1. Necessity to have a dedicated stabilization card.
2. Rather expensive
3. Weight

The video quality offered from a brushless gimbal is better. The reaction is fast, and the movement is very smooth.



Fig: 3 Brushless Gimbal






There are 2 type of axis gimbals

  1. 2D Axis Gimbal
  2. 3D Axis Gimbal


The simplest way to understand what a 3-axis brushless gimbal is, we need to work backwards:

Gimbal — a device that keeps the camera level by pivoting around it.

Brushless — the gimbal uses electric brushless motors to stabilize the camera.

3-Axis — the gimbal stabilizes motion in 3 axes: pitch, roll, and yaw.


Gimbals bring together an array of complex electronics, sensors, motors, and physics to accomplish the seemingly impossible task of canceling out motion on the fly before it reaches the camera.

Basically, a motor is placed on the 3 different axes around the camera. When the sensors detect motion on these axes, the motors counteract that motion to cancel it out almost instantly. This keeps bumps and jolts from ever reaching the camera as it sits motionless in the middle of all of this activity.

2D and 3D both refer to the number of axis that move and are stabilized. A 2D camera mount will provide roll and tilt movement and stabilization but the whole camera mount will yaw/pan with the helicopter as it moves. If the helicopter yaws to the left the camera will move with it. Ultimately the camera will appear to be stable in tilt and roll but will move with the helicopter in yaw as the helicopter moves.

A 3D camera mount will have roll and tilt movement/stabilization like a 2D mount but it will also be free to move and provide stabilization in pan as the helicopter yaws. The movement of the helicopter about the axis that runs vertically through the center is called Yaw, the motion of the camera about the same axis is called Pan. Similar but different. Depending on the controller that is stabilizing the camera mount there may be different features for the Pan control such as heading lock (the camera mount tries to maintain a fixed heading as the helicopter varies in Yaw) and POI (Point of Interest, the camera stays pointed at a fixed spot on the ground as the helicopter flies around it) [11].

The main difference for a new pilot to keep in mind when comparing a 2D vs a 3D camera mount is that a 2D mount is much easier to monitor and control for a single operator than a 3D mount. In most cases a 3D mount will require that a second operator will be available to use a second radio/receiver to “fly” the mount while the helicopter is being flown by the pilot.

3-axis gimbals generally provide better video stability than 2-axis gimbals. This is because 3-axis gimbals stabilizes your video on all 3 axis (yaw, pitch and roll) while 2-axis gimbals stabilizes only on the pitch and roll axis.

Jello, or jittery horizontal movement, is more obvious in videos taken using a 2-axis gimbal due to the lack of stabilization in the yaw axis [6].

3-axis gimbals are able to greatly reduce and sometimes completely eliminate jello due to a third motor that helps absorb unwanted movement in the yaw axis.

However, 3-axis gimbals are heavier and more expensive than their 2-axis counterparts. They also draw more battery power due to having more motors.


Fig 4: 2 Axis Gimbal




Fig: 5 3 Axis Gimbal











  4. Wikipedia
  5. “Error Analysis of Algorithms for Camera Rotation Calculation in GPS/IMU/Camera Fusion for UAV Sense and Avoid Systems” Tamas Zsedrovits†*, Peter Bauer* , Akos Zarandy†*, Balint Vanek* , Jozsef Bokor* , Tamas Roska†*