Skip to content

An Open-source Strong Baseline for SE(3) Planning in Autonomous Drone Racing

License

Notifications You must be signed in to change notification settings

ZJU-FAST-Lab/Fast-Racing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast-Racing

An Open-source Strong Baseline for SE(3) Planning in Autonomous Drone Racing

0. Overview

Fast-Racing is a strong baseline that focuses on high-quality and extremely aggressive SE(3) trajectory generation.

The back-end optimization is a parallel extension of GCOPTER for drone racing, also powered by MINCO.

Related Paper:

Please cite BOTH papers below if this repo helps you.

Video Links: youtube or bilibili.

1. Setup

All the tests are conducted in the Linux environment on a computer equipped with an Intel Core i7-10700 CPU and a GeForce RTX 2060 GPU.

Moreover, Our software is developed and tested in Ubuntu 18.04, 20.04 with ROS installed.

ROS can be installed here: ROS Installation.

Also, we need to install gcc>=8.0.0 and Eigen>=3.3.0.

(Notion: if you are using Ubuntu 20.04, just ignore this step because higher version of gcc and Eigen have been installed while you are installing ROS; but if you are using Ubuntu18.04, you need to update these versions.)

Install gcc>=8.0.0:

  1. Type the following command to install it.

    sudo apt-get install gcc-8 g++-8
    
  2. Verify installation by:

    gcc-8 --version
    

Install Eigen>=3.3.0

You can download the source code package from Eigen Installation.

Please make sure to install the correct version.

Your can run the following command to check Eigen version.

sudo gedit /usr/include/eigen3/Eigen/src/Core/util/Macros.h

2. Download Track Binaries

  1. Download the settings.json and move it to~/Documents/AirSim/settings.json.

  2. Download any one of the tracks such as Zhangjiajie.zip, and unzip it.

  3. Test it. Take Zhangjiajie as an example. Open a terminal window, cd to Zhangjiajie/directory. and type the following command:

    ./run.sh -windowed
    

3. Build on ROS

  1. Install the dependence.

    sudo apt-get install libarmadillo-dev
    sudo apt-get install ros-${ROS_VERSION_NAME}-octomap*
    sudo apt-get install ros-${ROS_VERSION_NAME}-tf2-sensor-msgs ros-${ROS_VERSION_NAME}-tf2-geometry-msgs ros-${ROS_VERSION_NAME}-mavros*
    

    where ${ROS_VERSION_NAME} is the name of your ROS release.

  2. Create an empty new workspace and clone this repository to your workspace:

    cd ~/your_catkin_ws/src
    git clone https://github.com/ZJU-FAST-Lab/Fast-Racing
    cd ..
    
  3. Compile it.

    If your default gcc isn't 8 or greater (check using gcc --version), then compilation will fail. In that case, use gcc-8 explicitly as follows.

    catkin_make -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 
    

4. Run the Simulation

  1. Run the track binary.

    Before the simulation racing, you need to run the rack binary.

    Open a terminal window, cd to Zhangjiajie/, Urbancity/ or Moderncity/ directory. and type the following command:

    ./run.sh -windowed
    
    1. Run the planner.

    Open a new terminal window, cd to ~/your_catkin_ws/ and type:

    source devel/setup.bash
    

    Then, run the script corresponding to the track. Take Zhangjiajie as the example:

    ./zhangjiajie.sh 
    

    After the global map is set up, you can use the 3D Nav Goal in RVIZ to trigger the planning.

Here is an example:

5. Use GPU or Not

Packages in this repo, plan_manage have GPU, CPU two different versions. By default, they are in CPU version for better compatibility. By changing

set(ENABLE_CUDA false)

in the CMakeList.txt in plan_manage packages, to

set(ENABLE_CUDA true)

CUDA will be turned-on to use the parallel architecture to speed up the computation of the optimization.

Please remember to also change the 'arch' and 'code' flags in the line of

    set(CUDA_NVCC_FLAGS 
      -gencode arch=compute_70,code=sm_70;
    ) 

in CMakeList.txt, if you encounter compiling error due to different Nvidia graphics card you use. You can check the right code here.

Don't forget to re-compile the code!

For installation of CUDA, please go to CUDA ToolKit

6. Licence

The source code is released under GPLv3 license.

7. Maintaince

For any technical issue, please contact Zhichao HAN ([email protected]) or Zhepei WANG ([email protected]).

For commercial inquiries, please contact Fei GAO ([email protected]).