by researchers from the Intelligent Motion Lab at Duke University
This package is a stand-alone implementation of our UAV trajectory generator. It is able to generate optimal (minimizing jerk/snap and traversal time) trajectories in real-time. For example, trajectories for flying through a gazebo in a forest is shown below:
This package only requires a C++ complier and a Python interpretor. We have tested it on macOS High Sierra and Ubuntu 16.04.
This implementation relies on Mosek, a commercial QP solver that provides free license for educational purpose. One can obtain a free personal academic license from here, and place it inside a folder name "mosek" in the home directory.
C++: Please make sure that the following C++ packages are installed, which means that they can be found through CMake's find_package command.
- Pybind11. A package that allows people to call C++ code from Python.
- Boost. There is no required minimum version, but the lowest version we have tested upon is 1.58.
- Eigen3. A C++ linear algebra library.
Python: Please make sure that the following Python packages are installed.
- Mosek. We uses the MOSEK Optimizer API for Python.
- NumPy, SciPy, matplotlib, tabulate. You may be able to install the above Python packages by:
# Install Mosek
pip install -f https://download.mosek.com/stable/wheel/index.html Mosek --user # skip --user for a system-wide installation
# Install other packages
pip install numpy, scipy, matplotlib, tabulate --user # skip --user for a system-wide installation
- Please make sure that all the C++ and Python dependencies are installed.
- Please make sure that a license for Mosek is installed.
- Download this repo
git clone https://github.com/OxDuke/Bilevel-Planner.git
- Complie C++ code
cd Bilevel-Planner
mkdir build
cd build
cmake ..
make
- Run an example
cd ..
python spatialSolver.py 58
- At this stage, you should see several figures popping up and some results printed in the terminal:
- Run more examples: There are 100 examples included in the "dataset/" directory. If you want to run the i-th (i = 1, ..., 100) example, run:
python spatialSolver.py i
The theory of this planner is described in the paper:
Fast UAV Trajectory Optimization using BilevelOptimization with Analytical Gradients
- To get the most of our software, we recommend using Sqopt to solve the QP. Unfortunately, Sqopt is not available as a free software, it comes along with SNOPT. If you have a copy of Sqopt and are interested in using it as the QP solver, please contact us.
If you any problems with this package or the paper, feel free to report an issue or contact us.