Skip to content

Commit

Permalink
updated README and resolved merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbinschmid committed Mar 11, 2024
1 parent def8a3b commit 451dcd3
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 17 deletions.
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This repository is a fork of [gym-pybullet-drones](https://github.com/utiasDSL/g

- The drone can follow arbitrary trajectories.
- It is given two next target waypoints as observation. If the two target waypoints are close, it will reach the target slower.
- The learned policy is well-suited to smoothly follow arbitrary trajectories and corresponds to the obtained result after _slow-phase training_ in [Penicka et al. [1]](https://rpg.ifi.uzh.ch/docs/RAL_IROS22_Penicka.pdf).
- The learned policy corresponds to the obtained result after _slow-phase training_ in [Penicka et al. [1]](https://rpg.ifi.uzh.ch/docs/RAL_IROS22_Penicka.pdf).

## Implemented New Features

Expand All @@ -19,9 +19,48 @@ This repository is a fork of [gym-pybullet-drones](https://github.com/utiasDSL/g

## Setup

Tested on ArchLinux and Ubuntu. Note that Eigen must be installed on the system. On linux, install via your package manager. E.g. on Ubuntu:

```s
$ sudo apt-get install libeigen3-dev
```

It is strongly recommended to use a python virtual environment, such as _conda_ or _pyvenv_.

1. Initialise repository. Repository must be pulled recursively

```s
$ git clone git@github.com:danielbinschmid/RL-pybullets-cf.git
$ git submodule --init --recursive
```

2. Initialise virtual environment. Tested with python version 3.10.13. E.g.:

```s
$ pyenv install 3.10.13
$ pyenv local 3.10.13
$ python3 -m venv ./venv
$ source ./venv/bin/activate
$ pip3 install --upgrade pip
```

3. Install dependencies and build

```s
$ pip3 install -e . # if needed, `sudo apt install build-essential` to install `gcc` and build `pybullet`
```

## Usage

## Implementation Overview

## Dev


## Common Issues

- *Existing and mismatching CMakeCache.txt in [trajectories/trajectories_generation](./trajectories/trajectories_generation).* Solution: Remove CMakeCache.txt in build folder of [trajectories/trajectories_generation](./trajectories/trajectories_generation).

## References

- [1]: Penicka, Robert, et al. [*Learning minimum-time flight in cluttered environments.*](https://rpg.ifi.uzh.ch/docs/RAL_IROS22_Penicka.pdf) IEEE Robotics and Automation Letters 7.3 (2022): 7209-7216.
Expand Down
17 changes: 1 addition & 16 deletions agents/C_trajectory_following.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,14 @@
####################################

###### TEST TRAIN FLAGS ############
TRAIN = False
TRAIN = True
TEST = True
####################################

###### ENVIRONMENT PARAMS ##########
<<<<<<< HEAD
TIMESTEPS = 1e6
N_ENVS = 5
EPISODE_LEN_SEC = 6
=======
TIMESTEPS = 2.5e6
N_ENVS = 20
EPISODE_LEN_SEC = 20
>>>>>>> test_suite
####################################

###### HYPERPARAMS #################
Expand Down Expand Up @@ -91,14 +85,9 @@ def run(output_folder=OUTPUT_FOLDER,
# CONFIG ##################################################
t_traj, init_wp = init_targets()

<<<<<<< HEAD
# output_folder = f"{output_folder}/k_p={k_p}_k_wp={k_wp}_k_s={k_s}_max_reward_distance={max_reward_distance}_waypoint_dist_tol={waypoint_dist_tol}"
# print(f"Output folder: {output_folder}")
=======
# random number in range 10-99
output_folder = f"{output_folder}/wp_b={waypoint_buffer_size}_k_p={k_p}_k_wp={k_wp}_k_s={k_s}_max_reward_distance={max_reward_distance}_waypoint_dist_tol={waypoint_dist_tol}"
print(f"Output folder: {output_folder}")
>>>>>>> test_suite

config = Configuration(
action_type=ACT,
Expand Down Expand Up @@ -129,11 +118,7 @@ def run(output_folder=OUTPUT_FOLDER,
env_factory=env_factory)

if test:
<<<<<<< HEAD
for _ in range(5):
=======
for _ in range(10):
>>>>>>> test_suite
run_test(config=config,
env_factory=env_factory)

Expand Down

0 comments on commit 451dcd3

Please sign in to comment.