Skip to content

Gym environment pybullet based for simulating a quadruped (optionally) PEA equipped.

License

Notifications You must be signed in to change notification settings

francescovezzi/quadruped-springs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quadruped-Sim

This repository contains an environment for simulating a quadruped robot optionally equipped with PEA (Parallel Elastic Actuator) accomplishing several higly-dynamical jumping based tasks as:

  • explosive jumping in place and forward
  • continuous jumping forward
  • backflip

using the methodology described here: Two-Stage Learning.

Here you can see some results:

A full video presentation of the whole project and results is available here.

If you are interested only in the environment to work on a cleaner and leaner code you can find it here: environment_only.

Installation

Recommend using conda with python3.7 or higher. After installing conda, this can be done as follows:

conda create -n [YOUR_ENV_NAME] python=3.7

To activate the virtualenv:

conda activate [YOUR_ENV_NAME]

Install all dependencies:

pip install -r requirements.txt

Code structure

  • 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.
  • load_model.py provide an interface for loading a RL pre-trained model based on stable-baselines3.
  • get_demonstrations.py runs a pre-trained model and collects a numpy file containing the trajectory reference performed by the agent during the episode. Such demonstrations are useful for Imitation Learning.
  • 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.

Training

For training take a look at rl-baselines3-zoo in the YAML support section.

Code resources

Acknowledgements

The quadruped env was original created by Guillaume Bellegarda, who developed the hopf_network.py.

Releases

No releases published

Packages

No packages published