Skip to content

Commit

Permalink
📚 Add RofuncRL repo template
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylark0924 committed Mar 21, 2024
1 parent 8d94a8d commit f3f05ef
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 11 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,11 @@ The available functions and plans can be found as follows.

`RofuncRL` is one of the most important sub-packages of `Rofunc`. It is a modular easy-to-use Reinforcement Learning sub-package designed for Robot Learning tasks. It has been tested with simulators like `OpenAIGym`, `IsaacGym`, `OmniIsaacGym` (see [example gallery](https://rofunc.readthedocs.io/en/latest/examples/learning_rl/index.html)), and also differentiable simulators like `PlasticineLab` and `DiffCloth`. Here is a list of robot tasks trained by `RofuncRL`:

> **Note**\
> You can customize your own project based on RofuncRL by following the [**RofuncRL customize tutorial**](https://rofunc.readthedocs.io/en/latest/tutorial/customizeRL.html).\
> We also provide a [**RofuncRL-based repository template**](https://github.com/Skylark0924/RofuncRL-template) to generate your own repository following the RofuncRL structure by one click.\
> For more details, please check [**the documentation for RofuncRL**](https://rofunc.readthedocs.io/en/latest/examples/learning_rl/index.html).






| Tasks | Animation | Performance | [ModelZoo](https://github.com/Skylark0924/Rofunc/blob/main/rofunc/config/learning/model_zoo.json) |
|-------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|---------------------------------------------------------------------------------------------------|
| Ant | ![](doc/img/task_gifs/AntRofuncRLPPO.gif) | ||
Expand Down
Binary file added doc/source/img/template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 45 additions & 5 deletions doc/source/tutorial/customizeRL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,50 @@
# RofuncRL tutorial

This tutorial shows how to customize your own tasks and use [`RofuncRL`](https://rofunc.readthedocs.io/en/latest/lfd/RofuncRL/index.html) to train them.
This tutorial shows how to customize your own project based on [`RofuncRL`](https://rofunc.readthedocs.io/en/latest/lfd/RofuncRL/index.html).

## Project structure

```plaintext
project_name/
├── configs/
│ ├── task/
│ │ ├── task_config1.yaml # task-specific config
│ │ ├── task_config2.yaml
│ │ ├── ...
│ ├── train/
│ │ ├── train_config1.yaml # training-specific config according to the agent
│ │ ├── train_config2.yaml
│ │ ├── ...
│ ├── config.yaml # just copy the default config.yaml from RofuncRL
├── agents/ # optional, if you want to define your own agent
│ ├── __init__.py
│ ├── new_agent.py
│ ├── new_agent2.py
│ ├── ...
├── models/ # optional, if you want to define your own model
│ ├── __init__.py
│ ├── ...
├── tasks/ # your own task definition
│ ├── __init__.py
│ ├── myenv.py
│ ├── ...
├── trainers/ # optional, if you want to define your own trainer
│ ├── __init__.py
│ ├── new_trainer.py
│ ├── ...
├── ...
├── main.py # your own training and inference script
```

We provide a [**RofuncRL-based repository template**](https://github.com/Skylark0924/RofuncRL-template) to generate your own repository following the RofuncRL structure by one click.

![RofuncRL-based repository template](../img/template.png)

:::{tip}
For more details about the configuration system, please refer to [Configuration System](https://rofunc.readthedocs.io/en/latest/tutorial/config_system.html).
:::



## Define your env as OpenAI Gym Env

Expand Down Expand Up @@ -97,7 +141,3 @@ if __name__ == '__main__':
inference(custom_args)
```

:::{tip}
1. For more details about the configuration system, please refer to [Configuration System](https://rofunc.readthedocs.io/en/latest/tutorial/config_system.html).
2. More examples can be found in [Example/RofuncRL](https://rofunc.readthedocs.io/en/latest/examples/learning_rl/index.html).
:::

0 comments on commit f3f05ef

Please sign in to comment.