• Stars
    star
    324
  • Rank 128,946 (Top 3 %)
  • Language
    Python
  • Created over 3 years ago
  • Updated 8 months ago

Reviews

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

Repository Details

This is a project about deep reinforcement learning autonomous obstacle avoidance algorithm for UAV.

Typing SVG

README

This is a project about deep reinforcement learning autonomous obstacle avoidance algorithm for UAV. The whole project includes obstacle avoidance in static environment and obstacle avoidance in dynamic environment. In the static environment, Multi-Agent Reinforcement Learning and artificial potential field algorithm are combined. In the dynamic environment, the project adopts the combination of disturbed flow field algorithm and single agent reinforcement learning algorithm.

Static environment

There are four methods to solve:

  1. MADDPG
  2. Fully Centralized DDPG
  3. Fully Decentralized DDPG
  4. Fully Centralized TD3

The third and the fourth methods perform better than others.

Dynamic environment

There are four methods to solve:

  1. PPO+GAE(with multi-processing )
  2. TD3
  3. DDPG
  4. SAC

The first three methods perform just the same. PPO convergence needs less episodes. TD3 and DDPG converge fast. Though Soft Actor-Critic is an outstanding algorithm in DRL, it has no obvious effect in my environment.

Traditional methods for UAV path planning

Three traditional methods are written with MATLAB:

  1. A * search algorithm*
  2. RRT algorithm
  3. Ant colony algorithm

C++:

  1. D star algorithm

The experiments show that A* search algorithm is much better than others but it is less effective than reinforcement learning path planning.

Artificial potential field algorithm

This project provides the MATLAB and Python realization of artificial potential field algorithm.

Python realization: ./APF/APFPy2.py ./APF/APFPy3.py ./APF/ApfAlgorithm.py (two-dimensional and three-dimensional)

Matlab realization: ./APF/APF_matlab (two-dimensional)

IFDS and IIFDS algorithm

This is an obstacle avoidance planning algorithm based on flow field. I realize it with matlab. The code is in folder IIFDS_and_IFDS.

How to begin trainning

For example, you want to train the agent in dynamic environment with TD3, what you need to do is just running the main.py, then test.py, finally open matlab and run the test.m to draw.

If you want to test the model in the environment with 4 obstacles, you just need to run Multi_obstacle_environment_test.py.

Requirements

numpy

torch

matplotlib

seaborn==0.11.1

Files to illustrate

calGs.m: calculate the index Gs which shows the performance of the route.

calLs.m: calculate the index Ls which shows the performance of the route.

draw.py: this file includes the Painter class which can draw the reward curve of various methods.

config.py: this file give the setting of the parameters in trainning process of the algorithm such as the MAX_EPISODE, batch_size and so on.

Method.py: this file concludes many important methods such as how to calculate the reward of the agents.

static_obstacle_environment.py: there are many static obstacle environments' parameters in this file.

dynamic_obstacle_environment.py: there are many dynamic obstacle environments' parameters in this file.

Multi_obstacle_environment_test.py: this file test the dynamic model in the environment in dynamic_obstacle_environment.py.

data_csv: this file save some data such as the trace of UAV and the reward in trainning.

AntColonybenchmark.m: ACO algorithm realized by MATLAB.

Astarbenchmark.m: A* algorithm realized by MATLAB.

RRTbenchmark.m: RRT algorithm realized by MATLAB.

A simple simulation example

  • avatar

all rights reserved.

More Repositories

1

DRL_algorithm_library

This is a reinforcement learning algorithm library. The code takes into account both performance and simplicity, with little dependence.
Python
83
star
2

DRL4SnakeGame

Using deep reinforcement learning to play Snake game(贪吃蛇).
Python
76
star
3

QtDiary

QT(C++)开发小众日记app项目
C++
46
star
4

KITTI-velodyne-viewer-matlab

KITTI point cloud viewer with 3D Box realized by Matlab. At the same time, I realize the point-cloud car detection by DL. You just need to click the mouse once then the results got.
MATLAB
24
star
5

MiniKV

A high-performance minimalist KV database.
C++
10
star
6

ElegantDIS

Distributed simulation system based on muduo
C++
9
star
7

ElegantWebServer

An elegant web server based C++
CSS
8
star
8

GreyWolfOptimization-GWO

GWO algorithm realized by matlab and python.
Python
6
star
9

ElegantDataStructure

C++ implementation of data structure
C++
4
star
10

ElegantDesignPattern

Use C++to implement some common design patterns
C++
4
star
11

Dynamic-A-D-algorithm-by-C-

Dynamic A*(D*) algorithm realized by C++
C++
4
star
12

EchoServerLinux

echo server for linux with epoll, poll and select.
C++
3
star
13

MiniToDoList

A compact and elegant Todo list.
C++
3
star
14

zyunfeii.github.io

My web powerd by Jekyll.
Python
2
star
15

SimpleGrpc

This is a simple example of grpc using C++.
CMake
2
star
16

MyParallelComputingServer

This is a concurrent computing server based on process pool, which is used to solve any order inverse matrix for clients in parallel.
C++
2
star
17

TinyWorkflow

A tiny workflow engine by Java.
Java
2
star
18

OneMarkdownForCppLearning

一个文件记录C++的大部分基础知识点(A file that records most of the basic knowledge points of C++ )
1
star
19

CppLeetcodeOneMarkdown

一个文件记录C++Leetcode刷题解析(A file record of C++Leetcode question solving analysis)
1
star
20

test_git

1
star
21

ZYunfeii

1
star