Skip to content

Commit

Permalink
update readme for drone-rl
Browse files Browse the repository at this point in the history
  • Loading branch information
KafuuChikai committed Dec 27, 2024
1 parent 20a566b commit 0f8d57f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions examples/drone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,37 @@ Run with:
python fly.py -v -m
```

### 3. Hover Environment (`hover_env.py`, `hover_train.py`, `hover_eval.py`)

The hover environment (`hover_env.py`) is designed to train a drone to maintain a stable hover position by reaching randomly generated target points. The environment includes:

- Initialization of the scene and entities (plane, drone and target).
- Reward functions to provide feedback to the agent based on its performance in reaching the target points.
- **Command resampling to generate new random target points** and environment reset functionalities to ensure continuous training.

**Acknowledgement**: The reward design is inspired by [Champion-level drone racing using deep
reinforcement learning (Nature 2023)](https://www.nature.com/articles/s41586-023-06419-4.pdf)

#### 3.1 Training

Train the drone hovering policy using the `HoverEnv` environment.

Run with:

```bash
python hover_train.py -e drone-hovering -B 8192 --max_iterations 500
```

#### 3.2 Evaluation

Evaluate the trained drone hovering policy.

Run with:

```bash
python hover_eval.py -e drone-hovering --ckpt 500 --record
```

## Technical Details

- The drone model used is the Crazyflie 2.X (`urdf/drones/cf2x.urdf`)
Expand Down

0 comments on commit 0f8d57f

Please sign in to comment.