Skip to content

hibetterheyj/Crazyflie_Auto_Navigation_Landing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CrazyPracticals (21 Spring)

Members: Yujie He, Jianhao Zheng, and Longlai Qiu

[Video] [Code] [Slide]

Goal: Autonomous Navigation and Landing for Crazyflie

In this practical, we programed based on Crazyflie 2.1 to find and precisely land on a platform with height of 10 cm by utilizing z reading from flow deck. Additionally, We also utilized sensor readings from multi-ranger deck to avoid the obstacles presented in the environment.

cover

Pipeline

Autonomous navigation & landing Workflow
✓ Local obstacle avoidance
✓ Grid-based coverage path planning
✓ Waypoint following
✓ A* search-based re-planning
pipeline_final

Code

Code folder: ./code/crazyflie-lib-python/group_7/

.
├── cf_load_params.py
├── cf_search.py
├── cf_state_class.py
├── cf_utilis.py
├── overall.py
├── draw_traj_demo.py
├── logs
│   ├── overall-20210530_1930_x.csv
│   ├── overall-20210530_1930_x_half.csv
│   ├── overall-20210530_1930_y.csv
│   └── overall-20210530_1930_y_half.cs
└── readme.md
  • overall.py: overall pipeline from taking off to landing.

    # -x (float) for setting initial x position
    # -y (float) for setting initial y position
    # -v (bool) for enabling visualization
    python overall.py -x 0.6 -y 0.6 -v

    cf_land

  • draw_traj.py: x-y trajectory visualization with region annotation

    # --log_folder (str) for assigning input log folder
    # --logname (str) for loding log file
    # --img_folder (str) for assigning output image folder
    # -n/--name (str) for assigning output image name
    # --zone_anno (bool) for enabling region annotation
    python draw_traj_demo.py --logname overall-20210530_1930 -n cf_demo --zone_anno

    cf_demo

The estimated values drift considerably after long flights. Moreover, the predicted starting position is significantly different from the starting point after the drone re-takes off.

Experimental setup

Features Figures
✓ Size: 480 cm (W) × 120 cm (H)
✓ Starting & Landing pad
- starting (x, y) = (60 cm, 60 cm)
- landing pad randomly placed
✓ Circular and rectangular obstacles
experimental_setup

Features

  • Modular library for different tasks

    ├── cf_load_params.py  # parameter setting
    ├── cf_search.py       # searching functions such as, coverage planning, box edge detection, A* search
    ├── cf_state_class.py  # state estimation class for the proposed task
    └── cf_utilis.py       # utility functions, such as live plotting
    
  • Utilized argparse for quick parameter adjustment and tuning

  • Utilized matplotlib for real-time visualization

Acknowledgement

Thanks to Prof. Dario Floreano and TAs from LIS at EPFL for these amazing tutorials and examples!