ikostrikov / walk_in_the_park

MIT License
244 stars 33 forks source link

A Walk in the Park

Code to replicate A Walk in the Park: Learning to Walk in 20 Minutes With Model-Free Reinforcement Learning, which contains code for training a simulated or real A1 quadrupedal robot to walk. Project page: https://sites.google.com/berkeley.edu/walk-in-the-park

Installation

Install dependencies:

pip install -r requirements.txt

To install the robot SDK, first install the dependencies in the README.md

To build, run:

cd real/third_party/unitree_legged_sdk
mkdir build
cd build
cmake ..
make

Finally, copy the built robot_interface.XXX.so file to this directory.

Training

Example command to run simulated training:

MUJOCO_GL=egl XLA_PYTHON_CLIENT_PREALLOCATE=false python train_online.py --env_name=A1Run-v0 \
                --utd_ratio=20 \
                --start_training=1000 \
                --max_steps=100000 \
                --config=configs/droq_config.py

To run training on the real robot, add --real_robot=True