silvery107/rl-mpc-locomotion
소개
사족 보행 로봇의 보행을 MPC로 제어하기 위한 심층 강화학습
과학 및 공학측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +2
- in 1 month
- +3
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalRL MPC Locomotion
This repo aims to provide a fast simulation and RL training framework for a quadruped locomotion task by dynamically predicting the weight parameters of a MPC controller. The control framework is a hierarchical controller composed of a higher-level policy network and a lower-level model predictive controller.
The MPC controller refers to Cheetah Software but written in python, and it completely opens the interface between sensor data and motor commands, so that the controller can be easily ported to any mainstream simulators.
The RL training utilizes the NVIDIA Isaac Gym in parallel using Unitree Robotics Aliengo model, and transferring it from simulation to reality on a real Aliengo robot (sim2real is not included in this codebase).
Frameworks

Dependencies
- Python - 3.8
- PyTorch - 1.10.0 with CUDA 11.3
- Isaac Gym - Preview 4
Installation
- Clone this repository
git clone [email protected]:silvery107/rl-mpc-locomotion.git - Initialize submodules
Or use thegit submodule update --init--recurseoption in step 1 to clone submodules at the same time. - Create the conda environment:
conda env create -f environment.yml - Install
rsl_rlat commit 2ad79cf under<extern>foldercd extern/rsl_rl pip install -e . - Compile python binding of the MPC solver:
pip install -e .
Quick Start
Play the MPC controller on Aliengo:
python RL_MPC_Locomotion.py --robot=AliengoAll supported robot types are
Go1,A1andAliengo.Note that you need to plug in your Xbox-like gamepad to control it, or pass
--disable-gamepad. The controller mode is default toFsm(Finite State Machine), and you can also tryMinfor the minimum MPC controller without FSM.Gamepad keymap
Press
LBto switch gait types betweenTrot,WalkandBound.Press
RBto switch FSM states betweenLocomotionandRecovery Stand
Train a new policy:
cd RL_Environment python train.py task=Aliengo headless=FalsePress the
vkey to disable viewer updates, and press again to resume. Setheadless=Trueto train without rendering.Tensorboard support is available, run
tensorboard --logdir runs.Load a pretrained checkpoint:
python train.py task=Aliengo checkpoint=runs/Aliengo/nn/Aliengo.pth test=True num_envs=4Set
test=Falseto continue training.Run the pretrained weight-policy for MPC controller on Aliengo: Set
bridge_MPC_to_RLtoFalsein<MPC_Controller/Parameters.py>python RL_MPC_Locomotion.py --robot=Aliengo --mode=Policy --checkpoint=path/to/ckptIf no
checkpointis given, it will load the latest run.
Roadmap

- MPC Controller
- Quadruped,
- RobotRunner ->

- RL Environment
- Gamepad Reader,
- Simulation Utils,
- Weight Policy,
- Train ->
User Notes
- Setup a Simulation in Isaac Gym
- Install MIT Cheetah Software
- OSQP, qpOASES and CVXOPT Solver Instructions
- Development Logs
Gallery
관련 프로젝트 살펴보기
불러오는 중…