Parrot AR.Drone controlled by Kinect for Xbox 360 Kutztown University Fall 2012 Graduate Research by Kyle Wamlsey with Dr. Oskars Rieksts made possible by a grant from TYCO EducaOonal FoundaOon
Parrot AR.Drone controlled by
Kinect for Xbox 360
Kutztown University Fall 2012 Graduate Research by Kyle Wamlsey
with Dr. Oskars Rieksts made possible by a grant from TYCO EducaOonal FoundaOon
QuesOon
Can we create an interacOve roboOcs demonstraOon for students K-‐12 to generate interest in Computer Science using a Kinect for Xbox 360 to control a Parrot AR.Drone Quad Helicopter?
High Level Design
Dependencies
AR.Drone SDK 1.8
Movement library funcOons: • ardrone_tool_set_ui_pad_start( int start); – Start = 1, take off – Start = 0, land
AR.Drone SDK 1.8 (cont)
Movement library funcOons:
• Ardrone_at_set_progress( bool enable, enable = True to use funcOon
float phi, phi = posiOve number -‐> right phi = negaOve number -‐> leb
float theta, theta = posiOve number -‐> Forward
theta = negaOve number -‐> Backward float gaz, gaz = posiOve number -‐> Ascend
gaz = negaOve number -‐> Descend float yaw ); yaw = 0 -‐> rotate right or leb not used
Gestures to match Drone SDK calls Gesture Command
Name AR.Drone Command
Exit ardrone_tool_set_ui_pad_start( 0 )
Take Off ardrone_tool_set_ui_pad_start( 1 )
Land ardrone_tool_set_ui_pad_start( 0 )
Right ardrone_at_set_progress_cmd( TRUE, 0.5, 0.0, 0.0, 0.0 )
Leb ardrone_at_set_progress_cmd( TRUE, -‐0.5, 0.0, 0.0, 0.0 )
Backward ardrone_at_set_progress_cmd( TRUE, 0.0, 0.5, 0.0, 0.0 )
Forward ardrone_at_set_progress_cmd( TRUE, 0.0, -‐0.5, 0.0, 0.0 )
Ascend ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, 0.5, 0.0 )
Descend ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, -‐0.5, 0.0 )
Rotate Leb ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, 0.0, 0.5 )
Rotate Right ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, 0.0, -‐0.5 )
Hover ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, 0.0, 0.0 )
How a Kinect works
PrimeSense Nite User Tracking
PrimeSense Nite Skeleton Tracking
Joints used in this research
Check for Exit
If( (lebHandPos.X – rightHandPos.X) > 100 ) Land drone and exit program
Check for TakeOff
Check for Land
If( rightHandPos.X is the same as lebHandPos.X ) Land Drone
Check for Right/Leb
If( (rightHandPos.X – lebHandPos.X) > xWidth) If( ( lebHandPos.Y – rightHandPos.Y ) > 100 ) set Phi to 0.5 to move right
Check for Forward/Backward
If( (rightHandPos.X – lebHandPos.X) > xWidth ) If( (lebHandPos.Z AND rightHandPos.Z) < forwardZLimit ) set Theta to -‐0.5 move forward
Check for Ascend/Descend
If( (rightHandPos.X – lebHandPos.X ) > xWidth ) If( (lebHandPos.Y AND rightHandPos.Y) > upperYLimit) set Gaz to -‐0.5 to move forward
Gesture RecogniOon Algorithm if( check for exit pose){
exit; }else{
if( !airborn ){ if( check for take off pose){ take off command airborn = TRUE; calculate X_width } }else{ if( check for land pose){ land command airborn = FALSE; }else{ check for phi (right or leb) check for theta (forward or backward) check for gaz(verOcal movement) move drone with phi, theta and gaz components } }
}
Gestures to match Drone SDK calls Gesture Command
Name AR.Drone Command
Exit ardrone_tool_set_ui_pad_start( 0 )
Take Off ardrone_tool_set_ui_pad_start( 1 )
Land ardrone_tool_set_ui_pad_start( 0 )
Right ardrone_at_set_progress_cmd( TRUE, 0.5, 0.0, 0.0, 0.0 )
Leb ardrone_at_set_progress_cmd( TRUE, -‐0.5, 0.0, 0.0, 0.0 )
Backward ardrone_at_set_progress_cmd( TRUE, 0.0, 0.5, 0.0, 0.0 )
Forward ardrone_at_set_progress_cmd( TRUE, 0.0, -‐0.5, 0.0, 0.0 )
Ascend ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, 0.5, 0.0 )
Descend ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, -‐0.5, 0.0 )
Rotate Leb ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, 0.0, 0.5 )
Rotate Right ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, 0.0, -‐0.5 )
Hover ardrone_at_set_progress_cmd( TRUE, 0.0, 0.0, 0.0, 0.0 )
Known Problems
• NoOce there is a lag between acOons performed and the matching movement by the Drone.
• As more movements are executed by the Drone it will begin to “drib” in random direcOons.