Complete videos: [video1](https://www.youtube.com/watch?v=NvR8Lq2pmPg&feature=emb_logo), [video2](https://www.youtube.com/watch?v=YcEaFTjs-a0), [video3](https://www.youtube.com/watch?v=toGhoGYyoAY). Demonstrations about this work have been reported on the IEEE Spectrum: [page1](https://spectrum.ieee.org/automaton/robotics/robotics-hardware/video-friday-nasa-lemur-robot), [page2](https://spectrum.ieee.org/automaton/robotics/robotics-hardware/video-friday-india-space-humanoid-robot), [page3](https://spectrum.ieee.org/automaton/robotics/robotics-hardware/video-friday-soft-exoskeleton-glove-extra-thumb) (search for _HKUST_ in the pages). To run this project in minutes, check [Quick Start](#1-Quick-Start). Check other sections for more detailed information. Please kindly star :star: this project if it helps you. We take great efforts to develope and maintain it :grin::grin:. ## Table of Contents * [Quick Start](#1-Quick-Start) * [Algorithms and Papers](#2-Algorithms-and-Papers) * [Setup and Config](#3-Setup-and-Config) * [Run Simulations](#4-run-simulations) * [Use in Your Application](#5-use-in-your-application) * [Updates](#6-updates) * [Known issues](#known-issues) ## 1. Quick Start This project has been tested on Ubuntu 18.04(ROS Melodic) and 20.04(ROS Noetic). Firstly, you should install __nlopt v2.7.1__: ``` git clone -b v2.7.1 https://github.com/stevengj/nlopt.git cd nlopt mkdir build cd build cmake .. make sudo make install ``` Next, you can run the following commands to install other required tools: ``` sudo apt-get install libarmadillo-dev ``` Then simply clone and compile our package (using ssh here): ``` cd ${YOUR_WORKSPACE_PATH}/src git clone https://github.com/HKUST-Aerial-Robotics/Fast-Planner.git cd ../ catkin_make ``` You may check the detailed [instruction](#3-setup-and-config) to setup the project. After compilation you can start the visualization by: ``` source devel/setup.bash && roslaunch plan_manage rviz.launch ``` and start a simulation (run in a new terminals): ``` source devel/setup.bash && roslaunch plan_manage kino_replan.launch ``` You will find the random map and the drone in ```Rviz```. You can select goals for the drone to reach using the ```2D Nav Goal``` tool. A sample simulation is showed [here](#demo1). ## 2. Algorithms and Papers The project contains a collection of robust and computationally efficient algorithms for quadrotor fast flight: * Kinodynamic path searching * B-spline-based trajectory optimization * Topological path searching and path-guided optimization * Perception-aware planning strategy (to appear) These methods are detailed in our papers listed below. Please cite at least one of our papers if you use this project in your research: [Bibtex](files/bib.txt). - [__Robust and Efficient Quadrotor Trajectory Generation for Fast Autonomous Flight__](https://ieeexplore.ieee.org/document/8758904), Boyu Zhou, Fei Gao, Luqi Wang, Chuhao Liu and Shaojie Shen, IEEE Robotics and Automation Letters (**RA-L**), 2019. - [__Robust Real-time UAV Replanning Using Guided Gradient-based Optimization and Topological Paths__](https://arxiv.org/abs/1912.12644), Boyu Zhou, Fei Gao, Jie Pan and Shaojie Shen, IEEE International Conference on Robotics and Automation (__ICRA__), 2020. - [__RAPTOR: Robust and Perception-aware Trajectory Replanning for Quadrotor Fast Flight__](https://arxiv.org/abs/2007.03465), Boyu Zhou, Jie Pan, Fei Gao and Shaojie Shen, IEEE Transactions on Robotics (__T-RO__). All planning algorithms along with other key modules, such as mapping, are implemented in __fast_planner__: - __plan_env__: The online mapping algorithms. It takes in depth image (or point cloud) and camera pose (odometry) pairs as input, do raycasting to update a probabilistic volumetric map, and build an Euclidean signed distance filed (ESDF) for the planning system. - __path_searching__: Front-end path searching algorithms. Currently it includes a kinodynamic path searching that respects the dynamics of quadrotors. It also contains a sampling-based topological path searching algorithm to generate multiple topologically distinctive paths that capture the structure of the 3D environments. - __bspline__: A implementation of the B-spline-based trajectory representation. - __bspline_opt__: The gradient-based trajectory optimization using B-spline trajectory. - __active_perception__: Perception-aware planning strategy, which enable to quadrotor to actively observe and avoid unknown obstacles, to appear in the future. - __plan_manage__: High-level modules that schedule and call the mapping and planning algorithms. Interfaces for launching the whole system, as well as the configuration files are contained here. Besides the folder __fast_planner__, a lightweight __uav_simulator__ is used for testing. ## 3. Setup and Config ### Prerequisites 1. Our software is developed and tested in Ubuntu 18.04(ROS Melodic) and 20.04(ROS Noetic). 2. We use [**NLopt**](https://nlopt.readthedocs.io/en/latest/NLopt_Installation) to solve the non-linear optimization problem. The __uav_simulator__ depends on the C++ linear algebra library __Armadillo__. The two dependencies can be installed by the following command. Firstly, you should install __nlopt v2.7.1__: ``` git clone -b v2.7.1 https://github.com/stevengj/nlopt.git cd nlopt mkdir build cd build cmake .. make sudo make install ``` Next, you can run the following commands to install other required tools: ``` sudo apt-get install libarmadillo-dev ``` ### Build on ROS After the prerequisites are satisfied, you can clone this repository to your catkin workspace and catkin_make. A new workspace is recommended: ``` cd ${YOUR_WORKSPACE_PATH}/src git clone https://github.com/HKUST-Aerial-Robotics/Fast-Planner.git cd ../ catkin_make ``` If you encounter problems in this step, please first refer to existing __issues__, __pull requests__ and __Google__ before raising a new issue. Now you are ready to [run a simulation](#4-run-simulations). ### Use GPU Depth Rendering (can be skipped optionally) This step is not mandatory for running the simulations. However, if you want to run the more realistic depth camera in __uav_simulator__, installation of [CUDA T