Skip to content

emNavi/AirGym

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirGym

This project is inspired by Aerial Gym Simulator but greatly improves it.

This project provides a realistic dynamics and RL framework for Sim2Real tasks of quadcopter. Drones can be trained in AirGym and then transferred to reality.

Requirements

  1. Ubuntu 20.04 or 22.04
  2. Conda or Miniconda
  3. NVIDIA Isaac Gym Preview 4 (Pytorch needs to upgrade for 40 series of GPUs. Please follow the installation guidance.)

Note this repository has been tested on Ubuntu 20.04/22.04 with PyTorch 2.0.0 + CUDA11.8.

Installation

1. Install IsaacGym Preview 4 with torch2.0.0+cuda11.8

  1. Download package from the official page and unzip.
  2. Edit install_requires in python/setup.py:
    install_requires=[
                "numpy",
                "scipy",
                "pyyaml",
                "pillow",
                "imageio",
                "ninja",
            ],
    
  3. Edit dependencies in python/rlgpu_conda_env.yml:
    dependencies:
    - python=3.8
    - numpy=1.20
    - pyyaml
    - scipy
    - tensorboard
  4. Create a new conda environment named rlgpu and install isaacgym:
    cd isaacgym
    ./create_conda_env_rlgpu.sh
  5. Install PyTorch2.0.0 and CUDA11.8:
    conda activate rlgpu
    conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia

2. Install rlPx4Controller

  1. Install Eigen (The recommend version is 3.3.7):
    sudo apt install libeigen3-dev
  2. Install pybind11:
    pip install pybind11
  3. Install rlPx4Controller
    git clone [email protected]:FP-Flight/rlPx4Controller.git
    cd rlPx4Controller
    pip install -e .

3. Install AirGym

git clone [email protected]:FP-Flight/AirGym.git
cd AirGym/
pip install -e .

4. Test the installation

Run the example script:

cd airgym/scripts
python example.py --controller_test

Training and Displaying

We train the model by rl-games==1.6.1.

Training:

cd airgym/rl_games/
python runner.py --headless

Algorithm related parameters can be edited in .yaml files. Environment and simulator related parameters are located in ENV_config files like X152bPx4_config.py.

Displaying:

cd airgym/rl_games/
python runner.py --play --num_envs 64 --checkpoint <path-to-ckpt>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages