Skip to content

Commit

Permalink
Merge pull request #3 from rail-berkeley/serl_launcher_state
Browse files Browse the repository at this point in the history
Add SERL launcher with a Franka Arm from state example
  • Loading branch information
youliangtan authored Dec 15, 2023
2 parents 9529a1e + afc5a62 commit 76c771b
Show file tree
Hide file tree
Showing 16 changed files with 1,036 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ repos:
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
# - repo: https://github.com/pycqa/isort
# rev: 5.12.0
# hooks:
# - id: isort
- repo: https://github.com/srstevenson/nb-clean
rev: 3.1.0
hooks:
Expand Down
63 changes: 61 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,64 @@
![](https://github.com/rail-berkeley/serl/workflows/pre-commit/badge.svg)

## Installation
- Conda Environment:
- create an environment with `conda create -n serl python=3.10`
1. Conda Environment:
create an environment with
```bash
conda create -n serl python=3.10
```

2. Install RL library
- the examples here use jaxrl-minimal as the RL library.
- To install jaxrl-minimal, with `serl_dev` branch is based off the latest `main` branch.
```bash
git clone https://github.com/rail-berkeley/jaxrl_minimal/tree/serl_dev
```
- install and its dependencies
```bash
cd jaxrl_minimal
pip install -e .
pip install -r requirements.txt
```
- For GPU: (change cuda12 to cuda11 if you are using older driver versions)
```bash
pip install --upgrade "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
```

- For TPU
```bash
pip install --upgrade "jax[tpu]" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
```
- See the [Jax Github page](https://github.com/google/jax) for more details on installing Jax.

3. Install the serl_launcher
```bash
cd serl_launcher
pip install -e .
```

1. Install Franka Sim library (Optional)
```bash
cd franka_sim
pip install -e .
pip install -r requirements.txt
```

Try if franka_sim is running via `python franka_sim/franka_sim/test/test_gym_env_human.py`

## Quick Start with Franka Arm in Sim
```bash
cd examples/async_sac_state_sim
```

Run learner node:
```bash
bash run_learner.sh
```

Run actor node with rendering window:
```bash
# add --ip x.x.x.x if running on a different machine
bash run_actor.sh
```

You can optionally launch learner and actor on separate machines. For example, if learner node is running on a PC with `ip=x.x.x.x`, you can launch the actor node on a different machine with internet access to `ip=x.x.x.x` and add `--ip x.x.x.` to the commands in `run_actor.sh`.
Loading

0 comments on commit 76c771b

Please sign in to comment.