Top Banner
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
20

ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360&...

Jun 18, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

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  

Page 2: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

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?  

Page 3: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

High  Level  Design  

Page 4: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

Dependencies  

Page 5: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

AR.Drone  SDK  1.8  

Movement  library  funcOons:  •  ardrone_tool_set_ui_pad_start(  int  start);  – Start  =  1,  take  off  – Start  =  0,  land  

Page 6: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

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  

Page 7: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

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  )  

Page 8: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

How  a  Kinect  works  

Page 9: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

PrimeSense  Nite  User  Tracking  

Page 10: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

PrimeSense  Nite  Skeleton  Tracking  

Page 11: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

Joints  used  in  this  research  

Page 12: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

Check  for  Exit  

If(  (lebHandPos.X  –  rightHandPos.X)  >  100  )    Land  drone  and  exit  program  

Page 13: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

Check  for  TakeOff  

Page 14: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

Check  for  Land  

If(  rightHandPos.X  is  the  same  as  lebHandPos.X  )    Land  Drone  

Page 15: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

Check  for  Right/Leb  

If(  (rightHandPos.X  –  lebHandPos.X)  >  xWidth)    If(  (  lebHandPos.Y  –  rightHandPos.Y  )  >  100  )      set  Phi  to  0.5  to  move  right  

Page 16: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

Check  for  Forward/Backward  

If(  (rightHandPos.X  –  lebHandPos.X)  >  xWidth  )    If(  (lebHandPos.Z  AND  rightHandPos.Z)  <  forwardZLimit  )      set  Theta  to  -­‐0.5  move  forward  

Page 17: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

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  

Page 18: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

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      }    }  

}    

Page 19: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

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  )  

Page 20: ParrotAR.Drone& - Kutztown University of Pennsylvaniafaculty.kutztown.edu/rieksts/robotics/Drone_Kinect.pdf · 2012-12-01 · ParrotAR.Drone& controlled&by&& Kinectfor&Xbox&360& Kutztown&University&Fall&2012&

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.