Skip to content

Modules for polynomial path planning for flying the Bitcraze Crazyflie 2.X with Qualisys motion capture integration in the control loop.

Notifications You must be signed in to change notification settings

shreeram-murali/crazypaths

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crazypaths

Modules that enable path planning with the Bitcraze Crazyflie2.X with motion capture systems integrated in the control loop.

What is this?

This repository is largely a derivative of the scripts contained within whoenig/uav_trajectories and crazyflie-lib-python/qualisys_hl_commander.py. I have made minor changes from these scripts in order to streamline the process for global path planning with Crazyflie and Qualisys motion capture in the high-level loop. The main contribution in this repo is that qualisys_hl_commander.py will import directly from the polynomial CSV file and that it can be run through the command line.

Setup

I developed and tested these on Ubuntu 20.04 with Python 3.8 and macOS Monterey with Python 3.10.

Dependencies

$ sudo pip3 install scipy matplotlib pandas numpy cfclient

Usage

Clone the Git repository. To do so, navigate into a directory of your choice and run:

git clone https://github.com/shreeram-murali/crazypaths.git

Then, cd into crazypaths. Make a time-varying waypoint .csv file t, x, y, z in the /paths/ directory.

For example, this is an example in the format "interpreter program input output":

python3 trajectory_scripts/generate_trajectory.py /paths/circle_waypoints.csv paths/circle_polynomial_2.csv

To see the plot of the path, run:

python3 trajectory_scripts/plot_trajectory.py /paths/circle_polynomial_2.csv

To have the Crazyflie execute this path (if you have Qualisys -- more on that below), run:

python3 cf_commander/qualisys_hl_commander.py paths/circle_polynomial_2.csv cf1 192.168.0.106

The above command follows the format "python3 program polynomial-file rigid-body-name QTM-IP"

(Tip: Please use tab-autocomplete feature instead of copy pasting these commands.)

Qualisys

In order for this to work properly, one must:

  1. Open QTM (Qualisys Track Manager) to the "Markers" page

  2. Connect to WiFi

  3. Make sure 6DOF tracking is enabled in project options

Example

python3 trajectory_scripts/generate_trajectory.py paths/circle_waypoints.csv paths/circle_polynomial_2.csv

0.0003152763976201386
0.011047588610698116
1.6705698923561263e-06
python3 trajectory_scripts/plot_trajectory.py paths/circle_polynomial_2.csv 

max speed (m/s):  0.47347308702566904
max acceleration (m/s^2):  1.3208665682570173
max omega (rad/s):  1.5487862531350483
max roll (deg):  7.029917967616536
max pitch (deg):  3.094890561377085

Screenshot of the plot:

screenshot

References

C. Richter, A. Bry, and N. Roy, “Polynomial trajectory planning for aggressive quadrotor flight in dense indoor environments,” in International Journal of Robotics Research, Springer, 2016.

About

Modules for polynomial path planning for flying the Bitcraze Crazyflie 2.X with Qualisys motion capture integration in the control loop.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages