User Tools

Site Tools


projects:crazyflie2:expansionboards:zranger

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
projects:crazyflie2:expansionboards:zranger [2017-03-14 14:20]
tobias [Usage]
projects:crazyflie2:expansionboards:zranger [2017-04-21 12:19]
tobias [Standard usage]
Line 17: Line 17:
 Z-ranger expansion deck {{ :projects:crazyflie2:expansionboards:z-ranger_rev.b.pdf|schematic}} Z-ranger expansion deck {{ :projects:crazyflie2:expansionboards:z-ranger_rev.b.pdf|schematic}}
  
-===== Usage ===== +===== Default usage ===== 
-The Z-ranger deck will be automatically detected when it is mounted. To activate precise height control press the [[https://wiki.bitcraze.io/doc:crazyflie:client:pycfclient:index#creating_new_mappings|altitude hold]] button on the gamepad and release the thrustThis will "lock" the height as the Crazyflie 2.0 goes into automatic height control mode. The up and down commands will then control the desired height instead of thrust.+The Z-ranger deck will be automatically detected when it is mounted. By default the range is available on the log variable "range.zrange" and is used instead of the pressure by internal algorithms.
  
-The sensor can measure distances up to 2 meters but often fails at distances above 1.5m. In case of unreliable readings the Crazyflie 2.0 will slowly descend until reaching a height where measurements are reliable.+The best way to use the Z-Ranger deck is to enable the [[doc:crazyflie:client:pycfclient:index#flightcontrol|Height-hold]] mode in the client. This requires at least client and firmware [[https://github.com/bitcraze/crazyflie-release/releases|2017.04]] so make sure to update your Crazyflie. 
 + 
 + 
 +===== Usage with the experimental Kalman filter ===== 
 + 
 +The Kalman filter is a sensor fusion algorithm that is still experimental. You can try it by recompiling the Crazyflie firmware. 
 + 
 +To enable altitude control using the Z-ranger with the kalman filter, the Crazyflie firmware has to be recompiled with the following config.mk: 
 +<file make config.mk> 
 +ESTIMATOR=kalman 
 +CFLAGS += -DUPDATE_KALMAN_WITH_RANGING -DKALMAN_DECOUPLE_XY 
 +</file> 
 + 
 +Once the recompiled firmware, precise height control using the altitude-hold mode. To activate precise height control press the [[https://wiki.bitcraze.io/doc:crazyflie:client:pycfclient:index#creating_new_mappings|altitude hold]] button on the gamepad and release the thrust. This will "lock" the height as the Crazyflie 2.0 goes into automatic height control mode. The up and down commands will then control the desired vertical speed instead of thrust. 
 + 
 +The sensor can measure distances up to 2 meters but often fails at distances above 1.5m. In case of unreliable readings the Crazyflie 2.0 will slowly drift. If that happens bring it down to the detection range.
  
 **Note: Currently the mobile clients does not support this functionality!** **Note: Currently the mobile clients does not support this functionality!**
projects/crazyflie2/expansionboards/zranger.txt · Last modified: 2021-06-24 16:13 by kimberly