This repository contains an environment for simulating a quadruped robot.
Recommend using a virtualenv (or conda) with python3.6 or higher. After installing virtualenv with pip, this can be done as follows:
virtualenv {quad_env, or choose another name venv_name} --python=python3
To activate the virtualenv:
source {PATH_TO_VENV}/bin/activate
Your command prompt should now look like:
(venv_name) user@pc:path$
Install all dependencies:
pip install -r requirements.txt
- env for the quadruped environment files, please see the gym simulation environment quadruped_gym_env.py, the robot specific functionalities in quadruped.py, and config variables in configs_go1.py. You will need to make edits in quadruped_gym_env.py, and review quadruped.py carefully for accessing robot states and calling functions to solve inverse kinematics, return the leg Jacobian, etc.
- go1_description contains the robot mesh files and urdf.
- utils for some file i/o and plotting helpers.
- hopf_network.py provides a CPG class skeleton for various gaits, and maps these to be executed on an instance of the quadruped_gym_env class. Please fill in this file carefully.
- load_sb3.py provide an interface for loading a RL pre-trained model based on stable-baselines3. For training take a look at the documentation or at rl-baselines3-zoo.
- The PyBullet Quickstart Guide is the current up-to-date documentation for interfacing with the simulation.
- The quadruped environment took inspiration from Google's motion-imitation repository based on this paper.
- Reinforcement learning algorithms from stable-baselines3. Also see for example ray[rllib] and spinningup.
The CPGs are based on the following papers:
- L. Righetti and A. J. Ijspeert, "Pattern generators with sensory feedback for the control of quadruped locomotion," 2008 IEEE International Conference on Robotics and Automation, 2008, pp. 819-824, doi: 10.1109/ROBOT.2008.4543306. link
- M. Ajallooeian, S. Pouya, A. Sproewitz and A. J. Ijspeert, "Central Pattern Generators augmented with virtual model control for quadruped rough terrain locomotion," 2013 IEEE International Conference on Robotics and Automation, 2013, pp. 3321-3328, doi: 10.1109/ICRA.2013.6631040. link
- M. Ajallooeian, S. Gay, A. Tuleu, A. Spröwitz and A. J. Ijspeert, "Modular control of limit cycle locomotion over unperceived rough terrain," 2013 IEEE/RSJ International Conference on Intelligent Robots and Systems, 2013, pp. 3390-3397, doi: 10.1109/IROS.2013.6696839. link
The quadruped env was original created by Guillaume Bellegarda