User Tools

Site Tools


misc:hacks:kinect

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
misc:hacks:kinect [2013-08-19 11:39]
macke created
misc:hacks:kinect [2021-06-24 16:45] (current)
kimberly
Line 1: Line 1:
 +<WRAP center round important 60%>
 +This page has deprecated and will be archived. Please go to [[https://www.bitcraze.io/]].
 +</WRAP>
 ====== Piloting the Crazyflie with the Kinect ====== ====== Piloting the Crazyflie with the Kinect ======
-This is documentation for the proof-of-concept where the Kinect is used to automatically pilot the Crazyflie. The code is available in the  [[https://bitbucket.org/bitcraze/crazyflie-pc-client|Crazyflie PC client repo]] on the ''dev-kinect'' branch.+This is documentation for the proof-of-concept where the Kinect is used to automatically pilot the Crazyflie. The code is available in the  [[https://github.com/bitcraze/crazyflie-clients-python/tree/dev-kinect|Crazyflie Python client repo]] on the ''dev-kinect'' branch.
  
 The application is intended as a proof-of-concept to show that this is possible and also to act as a starting point for anyone that wants to do some development using the Kinect and the Crazyflie. The application will probably not work out of the box for everyone since the image processing is still pretty basic and some tuning might be needed to detect the Crazyflie. The application is intended as a proof-of-concept to show that this is possible and also to act as a starting point for anyone that wants to do some development using the Kinect and the Crazyflie. The application will probably not work out of the box for everyone since the image processing is still pretty basic and some tuning might be needed to detect the Crazyflie.
Line 26: Line 29:
 python setup.py install python setup.py install
 </code> </code>
-  * Clone the crazyflie-pc-client repository and switch to the ''dev-kinect'' branch+  * Clone the crazyflie-clients-python repository and switch to the ''dev-kinect'' branch
 <code> <code>
-hg clone https://bitbucket.org/bitcraze/crazyflie-pc-client +git clone https://github.com/bitcraze/crazyflie-clients-python.git 
-hg update dev-kinect+git checkout dev-kinect
 </code> </code>
   * Connect your Kinect and set up the test as explained below   * Connect your Kinect and set up the test as explained below
   * Start the cfkinect client   * Start the cfkinect client
 <code> <code>
-cd crazyflie-pc-client/bin+cd crazyflie-clients-python/bin
 ./cfkinect ./cfkinect
 </code> </code>
-  * The Crazyflie should now fly itself but it will probably require some tweaking... Note that as soon as the application looses track of the Crazyflie it will kill the motors.+  * The Crazyflie should now fly itself but it will probably require some tweaking... Note that as soon as the application loses track of the Crazyflie it will kill the motors
 + 
 +The set-point can be moved when holding down the mouse button in the RGB window.
  
 ====== Tweaking and development ====== ====== Tweaking and development ======
 To tweak and develop have a look at the following files: To tweak and develop have a look at the following files:
 <code> <code>
-crazyflie-pc-client/lib/kinect/cfkinect.py +crazyflie-clients-python/lib/kinect/cfkinect.py 
-crazyflie-pc-client/lib/kinect/kinect.py +crazyflie-clients-python/lib/kinect/kinect.py 
-crazyflie-pc-client/lib/kinect/pid.py+crazyflie-clients-python/lib/kinect/pid.py
 </code> </code>
  
Line 61: Line 66:
 ====== Conclusions ====== ====== Conclusions ======
 ===== Depth ===== ===== Depth =====
-The most tricky part to detect is the depth which is why we used the Kinect. The problem is that the effective range of the IR laser detection is about 0.- 2 meters, which is a bit too small. At two meters the RGB image is about 1.5x1.5 meters which is a bit too small to do flight maneuvers. To do more fancy stuff a larger area would be required which means that the depth measurement would be lost with the Kinect.+The most tricky part to detect is the depth which is why we used the Kinect. The problem is that, with the current implementation, the effective range of the IR laser detection is about 0.- 2 meters, which is a bit too small. At two meters the RGB image is about 1.5x1.5 meters which is a bit too small to do flight maneuvers. To do more fancy stuff a larger area would be required which means that the depth measurement would be lost with the Kinect.
  
 ===== Yaw ===== ===== Yaw =====
-Only using one visual marker makes it impossible to detect the yaw. So more visual markers would have to be added and tracked to fix this.+Only using one visual marker makes it impossible to detect the yaw. So more visual markers would have to be added and tracked to fix this. One idea investigated is to add a black dot in the center of the red ball and to try to keep this dot in the middle as seen from the camera.
  
 ===== FPS ===== ===== FPS =====
 Currently the application is running at ~30 FPS which is too low when the Crazyflie moves fast. The image becomes smeared and with a small operating area of 1.5x1.5 meters the Crazyflie quickly goes out of the frame. Currently the application is running at ~30 FPS which is too low when the Crazyflie moves fast. The image becomes smeared and with a small operating area of 1.5x1.5 meters the Crazyflie quickly goes out of the frame.
 +
 +===== Regulation =====
 +The model for the regulation has be be improved a lot to get the Crazyflie more stable.
  
 ====== Improvements ====== ====== Improvements ======
 The image processing should be improved to be more robust and generic. The image processing should be improved to be more robust and generic.
  
-Currently the set-point is static, which means that the Crazyflie will try to reach it and stay around it. The idea is to improve this so it would be possible to change the set-point or even give it a line/figure to follow.+The regulation has to be improved. 
 + 
 +Better result could be achieved by calibrating the kinect(?).
misc/hacks/kinect.1376905158.txt.gz · Last modified: 2015-07-15 16:30 (external edit)