Drone project
Cyphy Lab.
Queensland University of Technology
2 System Overview 2
2.1 AR.Drone platform . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 Initial ARDrone coordinates . . . . . . . . . . . . . . . . . . . 2
2.3 Navdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.4 ROS topic name . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 VICON comparison 4
6 Scale Estimation 13
6.1 Scale calibration . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2 Online scale estimation . . . . . . . . . . . . . . . . . . . . . . 13
6.3 Experimental validation . . . . . . . . . . . . . . . . . . . . . 13
7 Control 13
7.1 System Identification . . . . . . . . . . . . . . . . . . . . . . . 13
7.2 Controller design . . . . . . . . . . . . . . . . . . . . . . . . . 14
7.3 Performance evaluation . . . . . . . . . . . . . . . . . . . . . . 14
8 Experimental results 14
1
1 Introduction
This document addresses the procedure how to develop an autonomous fly
system based on off-the-shelf AR.Drone.
2 System Overview
2.1 AR.Drone platform
2.2 Initial ARDrone coordinates
This document describes our ardrone coordinate systems: a IMU and a cam-
era.
Figure 1: Close look. IMU and camera coordinate definitions. Red, green
and blue denote x,y,z respectively.
2.3 Navdata
navdata is a fundamental data structure which contains Euler angles, alti-
tude, accelerations, linear velocity1 . This data can be obtained up to 100 Hz.
1
ROS Header message definition. http://www.ros.org/doc/api/roslib/html/msg/
Header.html
2
Table 1: navdata structure definition with SI unit.
3
/cmd_vel
linear.x
linear.y
linear.z drone_teleop cyphy_kbd
angular.z
/keycode
Cmd
ARDrone /cmd_vel
/tf
Parrot ardrone_brown ardrone_pose_estimation rviz
/world to /base_link
Data
/ardrone/navdata
/ardrone/image_raw
Figure 2: Blue boxes denote ROS nodes the orange box is a ardrone platform.
Gray boxes present both ROS topic name and data structure. Generally a
prefix “/” stands for ROS topic.
0.8
ardrone vx
0.6 ground truth vx
0.4
0.2
m/s
ï0.2
ï0.4
ï0.6
ï0.8
0 10 20 30 40 50 60 70
sec
1.5
ardrone vy
ground truth vy
1
0.5
m/s
ï0.5
ï1
ï1.5
0 10 20 30 40 50 60 70
sec
Figure 3: Blue denotes ground truth velocity obtained from VICON and red
is AR.Drone estimated lateral x and y velocity respectively.
3 VICON comparison
In this section ground truthed comparison is presented. We compared lat-
eral body velocity estimation from AR.Drone to velocity obtained from sub-
millimetre accuracy VICON system. In addition roll-pitch-yaw angle estima-
tion comparison is presented.
4
15
ardrone roll (degree)
10 ground truth roll
5
Deg
ï5
ï10
0 10 20 30 40 50 60 70
sec
10
ardrone pitch (degree)
5 ground truth pitch
0
Deg
ï5
ï10
ï15
ï20
0 10 20 30 40 50 60 70
sec
10
ardrone yaw (degree)
ground truth yaw
5
Deg
ï5
ï10
0 10 20 30 40 50 60 70
sec
Figure 4: Blue denotes ground truth angles obtained from VICON and red
is AR.Drone estimated angles, roll, pitch and yaw respectively.
5
2 mkdir b u i l d
3 cd b u i l d
4 cmake . .
5 make
Now you should see the ardrone driver appearing under subfolder /bin.
6
Figure 5: Plotting all data using rxplot tool.
7
1 roscore
2 a r d r o n e b r o n e ( d i r path=ardrone brown / bi n )
3 ROS NAMESPACE=a r d r o n e r o s r u n i m a g e p r o c i m a g e p r o c ( d i r
path=i m a g e p i p e l i n e / i m a g e p r o c / b in )
4 r o s l a u n c h . / ptam . launch ( d i r path e t h z a s l p t a m /ptam/
launch )
You should be able to see Fig.6.
8
(a) Image overlaying window with tracking features and the reference frame.
Figure 6: PTAM
9
4.5 Building ardrone pose estimation package
As mentioned before, let’s make a working copy to workspace.
1 cp −a . / a r d r o n e s i d e p r o j e c t / s r c / o u r s /
a r d r o n e p o s e e s t i m a t i o n /home/ enddl22 / Workspace /
fuerte /
2 cd /home/ enddl22 / Workspace / f u e r t e /
ardrone pose estimation
3 rosmake a r d r o n e p o s e e s t i m a t i o n
You should be able to see the following log message
...
[ rosmake ] Results :
[ rosmake ] Cleaned 20 p a c k a g e s .
[ rosmake ] B u i l t 20 p a c k a g e s with 0 f a i l u r e s .
[ rosmake ] Summary output t o d i r e c t o r y
You should be able to see build, bin folders and also can see executable files
from bin folder inside.
10
Figure 7: Position estimation visualisation using rviz.
11
[ rosmake ] Summary output t o d i r e c t o r y
5.1 States
States are expressed w.r.t world coordinate.
T
Xk = xk yk ẋk ẏk (1)
zk = HXk (4)
where zk is 4 × 1 position and velocity measurement vector. Position is
obtained from PTAM with scale estimation at 15 Hz and velocity comes from
AR.Drone onboard at 160Hz. We choose Q and R matrix as
2
Q =diag 0.1 m 0.1 m 0.3 m/s 0.3 m/s
2
R =diag 0.1 m 0.1 m 0.05 m/s 0.05 m/s
2
wikipedia Kalman Filter. http://en.wikipedia.org/wiki/Kalman_filter
12
5.4 Prediction
States prediction may be represented
X̂−
k = FX̂k−1 (5)
P̂− T
k =FP̂k−1 F + Q (6)
P̂−
k is predicted covariance and P̂k−1 is estimated covariance at k − 1.
5.5 Update
Compute Kalman gain.
S =HP̂− T
kH +R
K =P̂−
k HS
−1
N =z − HX̂−
k
X̂k =X̂−
k + KN
P̂k =P̂− −
k − KHP̂k
6 Scale Estimation
6.1 Scale calibration
6.2 Online scale estimation
6.3 Experimental validation
7 Control
7.1 System Identification
For x,y,z,yaw models.
13
7.2 Controller design
Something about PIDs.
8 Experimental results
Hovering and way points following.
14