Coder Social home page Coder Social logo

gazebo_uav_rl's Introduction

UAV Obstacle Avoidance-DQN-Gazebo

Based on the Gazebo simulation, this repository focuses on the UAV obstacle avoidance problem, which leverages visual inputs and the DQN algorithm.
If you have your own gazebo world file, please run the code after roslaunch! From my side, the roslaunch command is

roslaunch hector_quadrotor_gazebo quadrotor_empty_world.launch

Please make sure that the relevant dependencies have been installed before the training process

sudo apt-get update
sudo apt-get upgrade
pip install rospkg
pip install catkin-tools
pip install opencv-python
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 # I'm using torch2.0.1+cuda11.7

As for the other dependencies, please install them according to your error messages.

After that, you can start training straight away by running

python3 main.py

Moreover, you can define your own goal/start/obstacle positions in config.py. Definitions regarding the simulation environment, such as resetting the environment, can be found in env.py. ddqn.py describes the DQN algorithm and its derivatives. validate.py is used to test the parameters.

Since the training process requires real physical time to give the drone time to perform the maneuvers, the training time is long (about 10 hours or so to see the REWARD noticeably rise phenomenon), so please be patient. If you need to do gazebo simulation acceleration, please refer to this website. The training curves are shown below.

Reward Comparison
The collision-free trajectories are shown below.
Tra1 Tra2 Tra3
This work has been published in [AIAA Aviation 2023 Forum](https://arc.aiaa.org/doi/abs/10.2514/6.2023-3813). Please kindly refer to the following format for citations if needed
@inproceedings{zhang2023partially,
  title={Partially-Observable Monocular Autonomous Navigation for UAV through Deep Reinforcement Learning},
  author={Zhang, Yuhang and Low, Kin Huat and Lyu, Chen},
  booktitle={AIAA AVIATION 2023 Forum},
  pages={3813},
  year={2023}
}

gazebo_uav_rl's People

Contributors

zzzzzyh111 avatar

Stargazers

 avatar Giang Dao avatar Bo Zhao avatar  avatar haolin avatar  avatar Zhefan Xu avatar Toyoid avatar  avatar snow avatar  avatar  avatar zheng avatar  avatar  avatar  avatar  avatar  avatar MoeBuTa avatar  avatar Mr. Featherwit avatar  avatar  avatar YanChao avatar  avatar Zenaida Orn avatar

Watchers

 avatar

Forkers

abiaoaaaaa toyoid

gazebo_uav_rl's Issues

CPU memory increasing

Hello, first of all, thank you very much for your kind works! I do have a question, though. When I am training, the CPU memory keeps increasing continuously, and it doesn't decrease much at the start of each new episode. Do you have any solutions to this issue? Looking forward to your reply, and once again, thank you for your work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.