• Stars
    star
    1,376
  • Rank 34,176 (Top 0.7 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Note!

Our recently developed planner EGO-Swarm is an evolution from EGO-Planner. It is more robust and safe, and therefore, is more recommended to use. If you have only one drone, just set the drone_id to 0 in EGO-Swarm's launch files. Of course, some topic names are changed from EGO-Planner, check it using rqt_graph and rosnode info <package name>.

Quick Start within 3 Minutes

Compiling tests passed on ubuntu 16.04, 18.04 and 20.04 with ros installed. You can just execute the following commands one by one.

sudo apt-get install libarmadillo-dev
git clone https://github.com/ZJU-FAST-Lab/ego-planner.git
cd ego-planner
catkin_make
source devel/setup.bash
roslaunch ego_planner simple_run.launch

If your network to github is slow, We recommend you to try the gitee repository https://gitee.com/iszhouxin/ego-planner. They synchronize automatically.

If you find this work useful or interesting, please kindly give us a star ⭐, thanks!πŸ˜€

Acknowledgements

  • The framework of this repository is based on Fast-Planner by Zhou Boyu who achieves impressive proformance on quadrotor local planning.

  • The L-BFGS solver we use is from LBFGS-Lite. It is a C++ head-only single file, which is lightweight and easy to use.

  • The map generated in simulation is from mockamap by William Wu.

  • The hardware architecture is based on an open source implemation from Teach-Repeat-Replan.

EGO-Planner

EGO-Planner: An ESDF-free Gradient-based Local Planner for Quadrotors

EGO-Planner is a lightweight gradient-based local planner without ESDF construction, which significantly reduces computation time compared to some state-of-the-art methods . The total planning time is only around 1ms and don't need to compute ESDF.

Video Links: YouTube, bilibili (for Mainland China)

1. Related Paper

EGO-Planner: An ESDF-free Gradient-based Local Planner for Quadrotors, Xin Zhou, Zhepei Wang, Chao Xu and Fei Gao (Accepted by RA-L). arXiv Preprint, IEEE Xplore, and IEEE Spectrum report.

2. Standard Compilation

Requirements: ubuntu 16.04, 18.04 or 20.04 with ros-desktop-full installation.

Step 1. Install Armadillo, which is required by uav_simulator.

sudo apt-get install libarmadillo-dev

Step 2. Clone the code from github or gitee. This two repositories synchronize automaticly.

From github,

git clone https://github.com/ZJU-FAST-Lab/ego-planner.git

Or from gitee,

git clone https://gitee.com/iszhouxin/ego-planner.git

Step 3. Compile,

cd ego-planner
catkin_make -DCMAKE_BUILD_TYPE=Release

Step 4. Run.

In a terminal at the ego-planner/ folder, open the rviz for visuallization and interactions

source devel/setup.bash
roslaunch ego_planner rviz.launch

In another terminal at the ego-planner/, run the planner in simulation by

source devel/setup.bash
roslaunch ego_planner run_in_sim.launch

Then you can follow the gif below to control the drone.

3. Using an IDE

We recommend using vscode, the project file has been included in the code you have cloned, which is the .vscode folder. This folder is hidden by default. Follow the steps below to configure the IDE for auto code completion & jump. It will take 3 minutes.

Step 1. Install C++ and CMake extentions in vscode.

Step 2. Re-compile the code using command

catkin_make -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=Yes

It will export a compile commands file, which can help vscode to determine the code architecture.

Step 3. Launch vscode and select the ego-planner folder to open.

code ~/<......>/ego-planner/

Press Ctrl+Shift+B in vscode to compile the code. This command is defined in .vscode/tasks.json. You can add customized arguments after "args". The default is "-DCMAKE_BUILD_TYPE=Release".

Step 4. Close and re-launch vscode, you will see the vscode has already understood the code architecture and can perform auto completion & jump.

4. Use GPU or Not

Packages in this repo, local_sensing 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 local_sensing packages, to

set(ENABLE_CUDA true)

CUDA will be turned-on to generate depth images as a real depth camera does.

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

    set(CUDA_NVCC_FLAGS 
      -gencode arch=compute_61,code=sm_61;
    ) 

in CMakeList.txt. If you encounter compiling error due to different Nvidia graphics card you use or you can not see proper depth images as expected, you can check the right code via link1 or link2.

Don't forget to re-compile the code!

local_sensing is the simulated sensors. If ENABLE_CUDA true, it mimics the depth measured by stereo cameras and renders a depth image by GPU. If ENABLE_CUDA false, it will publish pointclouds with no ray-casting. Our local mapping module automatically selects whether depth images or pointclouds as its input.

For installation of CUDA, please go to CUDA ToolKit

5. Utilize the Full Performance of CPU

The computation time of our planner is too short for the OS to increase CPU frequency, which makes the computation time tend to be longer and unstable.

Therefore, we recommend you to manually set the CPU frequency to the maximum. Firstly, install a tool by

sudo apt install cpufrequtils

Then you can set the CPU frequency to the maximum allowed by

sudo cpufreq-set -g performance

More information can be found in http://www.thinkwiki.org/wiki/How_to_use_cpufrequtils.

Note that CPU frequency may still decrease due to high temperature in high load.

Improved ROS-RealSense Driver

We modified the ros-relasense driver to enable the laser emitter strobe every other frame, allowing the device to output high quality depth images with the help of emitter, and along with binocular images free from laser interference.

This ros-driver is modified from https://github.com/IntelRealSense/realsense-ros and is compatible with librealsense2 2.30.0. Tests are performed on Intel RealSense D435 and D435i.

Parameter emitter_on_off is to turn on/off the added function. Note that if this function is turned on, the output frame rate from the device will be reduced to half of the frame rate you set, since the device uses half of the stream for depth estimation and the other half as binocular grayscale outputs. What's more, parameters depth_fps and infra_fps must be identical, and enable_emitter must be true as well under this setting.

Install

The driver of librealsense2 2.30.0 should be installed explicitly. On a x86 CPU, this can be performed easily within 5 minutes. Firstly, remove the currently installed driver by

sudo apt remove librealsense2-utils

or manually remove the files if you have installed the librealsense from source. Then, you can install the library of version 2.30.0 by

sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE

For ubuntu 16.04

sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u

For ubuntu 18.04

sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u

Then continue with

sudo apt-get install librealsense2-dkms
sudo apt install librealsense2=2.30.0-0~realsense0.1693
sudo apt install librealsense2-gl=2.30.0-0~realsense0.1693
sudo apt install librealsense2-utils=2.30.0-0~realsense0.1693
sudo apt install librealsense2-dev=2.30.0-0~realsense0.1693
sudo apt remove librealsense2-udev-rules
sudo apt install librealsense2-udev-rules=2.30.0-0~realsense0.1693

Here you can varify the installation by

realsense-viewer

Run

If everything looks well, you can now compile the ros-realsense package named modified_realsense2_camera.zip by catkin_make, then run ros realsense node by

roslaunch realsense_camera rs_camera.launch

Then you will receive depth stream along with binocular stream together at 30Hz by default.

Licence

The source code is released under GPLv3 license.

Maintaince

We are still working on extending the proposed system and improving code reliability.

For any technical issues, please contact Xin Zhou ([email protected]) or Fei GAO ([email protected]).

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

More Repositories

1

Fast-Drone-250

hardware and software design of the 250mm autonomous drone
C++
1,358
star
2

ego-planner-swarm

An efficient single/multi-agent trajectory planner for multicopters.
C++
1,178
star
3

GCOPTER

A General-Purpose Trajectory Optimizer for Multicopters
C++
722
star
4

Swarm-Formation

Formation Flight in Dense Environments
C++
382
star
5

EGO-Planner-v2

Swarm Playground, the codebase of the paper "Swarm of micro flying robots in the wild"
C++
355
star
6

Dftpav

A lightweight differential flatness-based trajectory planner for car-like robots
C++
344
star
7

LBFGS-Lite

LBFGS-Lite: A header-only L-BFGS unconstrained optimizer.
C++
314
star
8

Fast-Racing

An Open-source Strong Baseline for SE(3) Planning in Autonomous Drone Racing
C++
216
star
9

sampling-based-path-finding

C++
212
star
10

large_scale_traj_optimizer

Fast (Fastest?) Minimum Snap Trajectory Generation with Analytical Gradient
C++
199
star
11

CMPCC

CMPCC: Corridor-based Model PredictiveContouring Control for Aggressive Drone Flight
C
197
star
12

Implicit-SDF-Planner

[IROS 2023] Continuous Implicit SDF Based Any-shape Robot Trajectory Optimization
C++
188
star
13

Fast-tracker

C++
187
star
14

am_traj

Alternating Minimization Based Trajectory Generation for Quadrotor Aggressive Flight
C++
185
star
15

Elastic-Tracker

Elastic Tracker: A Spatio-temporal Trajectory Planner Flexible Aerial Tracking
C++
167
star
16

FAST-Dynamic-Vision

Detecting and Tracking Dynamic Objects with Event and Depth Sensing
C++
126
star
17

Implicit-SVSDF-Planner

[SIGGRAPH 2024 & TOG]
C++
119
star
18

VID-Fusion

VID-Fusion: Robust Visual-Inertial-Dynamics Odometry for Accurate External Force Estimation
C++
115
star
19

Car-like-Robotic-swarm

Source code for the decentralized car-like robotic swarm
C++
114
star
20

uneven_planner

An Efficient Trajectory Planner for Car-like Robots on Uneven Terrain
C++
103
star
21

FastSim

93
star
22

EVA-planner

EVA-planner: an EnVironmental Adaptive Gradient-based Local Planner for Quadrotors.
C++
91
star
23

TGK-Planner

C++
91
star
24

Terrestrial-Aerial-Navigation

An autonomous navigation framework that brings complete autonomy to terrestrial-aerial bimodal vehicles (TABVs)
C++
82
star
25

Fast-Perching

Real-Time Trajectory Planning for Aerial Perching
C++
73
star
26

kino_sampling_with_regional_opti

C++
73
star
27

3D2M-planner

C#
72
star
28

SDLP

Seidel's LP Algorithm: Linear-Complexity Linear Programming for Small-Dimensional Variables
C++
70
star
29

Radar-Diffusion

Python
66
star
30

SDQP

Small-Dimensional Quadratic Programming in Linear Time
C++
61
star
31

visPlanner

C++
58
star
32

OPNet

Learning Unknown Space for Autonomous Navigation in Clustered Environment
C++
56
star
33

VID-Dataset

C++
55
star
34

VertexEnumeration3D

Fast Vertex Enumeration for 3D Polytopes
C++
52
star
35

forces_resilient_planner

External Forces Resilient Safe Motion Planning for Quadrotor
C
47
star
36

EDG-TEAM

Enhanced Decentralized Autonomous Aerial Robot Teams with Group Planning
C++
42
star
37

std-trees

STD-Trees: Spatio-temporal Deformable Trees for Multirotors Kinodynamic Planning
C++
41
star
38

Auto-Filmer

A Videography Planner for Quadrotors
C++
38
star
39

CertifiableMutualLocalization

MATLAB
29
star
40

laser_simulator

lightweight laser simulator
C++
25
star
41

GPA-Teleoperation

C++
24
star
42

e2e_opt

JavaScript
20
star
43

VID-Flight-Platform

The flight platforn for the VID-Dataset
19
star
44

UnityVisExample

C#
19
star
45

TABV-Platform

A cusomized terrestrial-aerial bimodal vehicle (TABV) platform for terrestrial-aerial autonomous navigation.
16
star
46

Primitive-Planner

Primitive-Planner: An Ultra Lightweight Quadrotor Planner with Time-optimal Primitives
16
star
47

LMBM

Nonsmooth Unconstrained Optimization via Limited Memory Bundle Method
Fortran
15
star
48

mpc-car-tutorial

A tutorial of using MPC (both implementations of nonlinear MPC and linear time-varying MPC) for reference tracking with a bicycle model.
C
12
star
49

FACT-Coordinate-Initialization

Open source dode for paper FACT: Fast and Active Coordinate Initialization for Vision-based Drone Swarm
C++
11
star
50

OSQP_Interface

An Easy-to-Use OSQP Interface for Convex Quadratic Programming.
C++
7
star
51

Assistive-Racing

A Trajectory-based Flight Assistive System for Novice Pilots in Drone Racing Scenario
C++
7
star
52

Auto-Param-Adaption

Automatic parameter adaptation for quadrotor trajectory planning
6
star
53

Xsens_driver

Python
4
star
54

GLPK_Interface

An Easy-to-Use GLPK Interface for General-Dimension Linear Programming.
C++
3
star
55

LF-3PM

a LiDAR-based Framework for Perception-aware Planning with Perturbation-induced Metric
3
star
56

Active-Relative-Localization

Open source dode for paper Preserving Relative Localization of FoV-Limited Drone Swarm via Active Mutual Observation
1
star