Rohan Walia1, Morgane Billot1, Kevin Garzon-Aguirre1, Swathika Subramanian2, Huiyi Wang1, Mohamed Irfan Refai2, Guillaume Durandau1
1McGill University 2University of Twente
MyoBack is a human back model part of the MyoSuite framework, derived from a physiologically accurate OpenSim model. MyoBack was validated empirically by integrating a passive back exoskeleton in simulation and comparing forces exerted on the back with values from experimental trials.
MyoBack model can be applied to a range of contexts, including both passive and active exoskeletons, or even to entirely different use cases. To give a basis, we have added an example where a RL agent is trained to control the muscles in the model to balance it and keep it from leaning forward.
The folder rl_example includes a sample training script and baseline with which the MyoBack model developed can be tested. Use the instructions below to set up and run the training scripts or load the baseline on your own machine.
To simply view the model, you can use the MuJoCo simulate GUI or the MuJoCo Python bindings with an example given in test_dynamic.py.
Install our conda environment on a Linux machine. On Ubuntu 20.04 you need to install the following apt packages for mujoco:
$ sudo apt install -y libosmesa6-dev libgl1-mesa-glx libglfw3 patchelfWe recommend Mambaforge instead of the standard anaconda distribution for faster installation:
$ mamba env create -f conda_environment.yamlbut you can use conda as well:
$ conda env create -f conda_environment.yamlTo start training the agent, use the following command:
cd rl_example
python train_back_RL.py --group myoback_1 --num_envs 1 --learning_rate 0.0002 --clip_range 0.1 --seed 7
--group: Wandb training group name--num_envs: Number of envs to train in parallel--learning_rate: learning rate for PPO--clip_range: clip range for PPO--seed: env seeding
To view the performance of the baseline model, navigate to: baseline_side_video.mp4
For more information or assistance, contact:
Email: huiyi.wang@mail.mcgill.ca
GitHub: cherylwang20
