diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index fcf56ce63..f1c5c0eed 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: '3.8' + python-version: '3.10' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb2923cfa..0f8163e82 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: '3.8' + python-version: '3.10' - name: Install dependencies run: | python -m pip install --upgrade pip @@ -44,7 +44,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: '3.8' + python-version: '3.10' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/README.md b/README.md index e013a98cf..9f3d6b087 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,30 @@ # gym-pybullet-drones -2023 remastering +![video](files/readme_images/helix.gif) ![control](files/readme_images/helix.png) ## Installation -TBD - ```sh -tbd +git clone https://github.com/utiasDSL/gym-pybullet-drones.git +cd gym-pybullet-drones/ + +conda create -n drones python=3.10 +conda activate drones + +pip3 install --upgrade pip +pip3 install -e . ``` ## Use -TBD - ```sh -tbd +cd gym_pybullet_drones/examples/ +python3 pid.py ``` ## Citation -If you wish, please cite our work [(link)](https://arxiv.org/abs/2103.02142) as +If you wish, please cite [our IROS 2021 paper](https://arxiv.org/abs/2103.02142) as ```bibtex @INPROCEEDINGS{panerati2021learning, @@ -30,8 +34,8 @@ If you wish, please cite our work [(link)](https://arxiv.org/abs/2103.02142) as year={2021}, volume={}, number={}, - pages={}, - doi={} + pages={7512-7519}, + doi={10.1109/IROS51168.2021.9635857} } ``` diff --git a/gym_pybullet_drones/envs/__init__.py b/gym_pybullet_drones/envs/__init__.py index 6585dce8e..15a98e4e9 100644 --- a/gym_pybullet_drones/envs/__init__.py +++ b/gym_pybullet_drones/envs/__init__.py @@ -1,4 +1,3 @@ from gym_pybullet_drones.envs.CtrlAviary import CtrlAviary -from gym_pybullet_drones.envs.DynAviary import DynAviary from gym_pybullet_drones.envs.VelocityAviary import VelocityAviary from gym_pybullet_drones.envs.VisionAviary import VisionAviary diff --git a/gym_pybullet_drones/examples/pid-velocity.py b/gym_pybullet_drones/examples/pid_velocity.py similarity index 100% rename from gym_pybullet_drones/examples/pid-velocity.py rename to gym_pybullet_drones/examples/pid_velocity.py diff --git a/pyproject.toml b/pyproject.toml index 7b1b1147a..f618ca2a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,17 +12,13 @@ packages = [ [tool.poetry.dependencies] python = "^3.8" -numpy = "^1.22" -Pillow = "^9.0" -matplotlib = "^3.5" -cycler = "^0.10" +numpy = "^1.24" +scipy = "^1.10" +matplotlib = "^3.7" +pybullet = "^3.2.5" +stable-baselines3 = "^1.8.0" +torch = "^2.0.0" gym = "^0.21" -pybullet = "^3.2" -stable-baselines3 = "1.5.0" -scipy = "^1.8" -torch = "1.11.0" -"ray[rllib]" = "1.9" -tensorboard = "^2.9" [tool.poetry.dev-dependencies] diff --git a/tests/test_examples.py b/tests/test_examples.py index 8ded78358..b49bcfe52 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -1,23 +1,15 @@ -def test_compare(): - from gym_pybullet_drones.examples.compare import run - run(gui=False,plot=False,output_folder='tmp') - def test_downwash(): from gym_pybullet_drones.examples.downwash import run run(gui=False,plot=False,output_folder='tmp') def test_fly(): - from gym_pybullet_drones.examples.fly import run - run(gui=False,plot=False,output_folder='tmp') - -def test_groundeffect(): - from gym_pybullet_drones.examples.groundeffect import run + from gym_pybullet_drones.examples.pid import run run(gui=False,plot=False,output_folder='tmp') def test_learn(): - from gym_pybullet_drones.examples.learn import run + from gym_pybullet_drones.examples.learning.learn import run run(gui=False,plot=False,output_folder='tmp') def test_velocity(): - from gym_pybullet_drones.examples.velocity import run + from gym_pybullet_drones.examples.pid_velocity import run run(gui=False,plot=False,output_folder='tmp') diff --git a/tests/test_experiments.py b/tests/test_experiments.py deleted file mode 100644 index 18bf9a78d..000000000 --- a/tests/test_experiments.py +++ /dev/null @@ -1,28 +0,0 @@ -import sys -import glob - -def test_single_agent(): - initial_models = set(glob.glob('**/best_model.zip', recursive=True)) - sys.path.append('experiments/learning/') - from experiments.learning.singleagent import run as run_train - run_train(steps=30, output_folder='tmp') - - from experiments.learning.test_singleagent import run as run_test - new_models = set(glob.glob('**/best_model.zip', recursive=True)) - test_model = new_models - initial_models - assert len(test_model) > 0, initial_models - path = '/'.join(next(iter(test_model)).split('/')[:-1]) - run_test(path, plot=False, gui=False, output_folder='tmp') - -# def test_multi_agent(self): -# initial_models = set(glob.glob('**/best_model.zip', recursive=True)) -# sys.path.append('experiments/learning') -# from experiments.learning.multiagent import run as run_train -# run_train(steps=30, output_folder='tmp') - -# from experiments.learning.test_multiagent import run as run_test -# new_models = set(glob.glob('**/best_model.zip', recursive=True)) -# test_model = new_models - initial_models -# assert len(test_model) > 0, initial_models -# path = '/'.join(next(iter(test_model)).split('/')[:-1]) -# run_test(path, plot=False, gui=False, output_folder='tmp')