3. Testing Assistive VR Gym with Pretrained Policies - Healthcare-Robotics/assistive-vr-gym GitHub Wiki

We provide pretrained control policies for each robot and assistive task.
These controllers are trained using Proximal Policy Optimization (PPO) implemented in PyTorch.
The pretrained models were trained for 10,000,000 time steps (50,000 simulation rollouts) on a 36 virtual core AWS machine.

Install Reinforcement Learning Library

The PyTorch library and pretrained policies can be downloaded using the commands below.

# Install pytorch RL library
pip install git+https://github.com/Zackory/pytorch-a2c-ppo-acktr --no-cache-dir
# Install OpenAI Baselines 0.1.6
pip install git+https://github.com/openai/baselines.git

Download Pretrained Policies

You can download the models directly from the GitHub release page.
Then, unzip all files into the assistive-vr-gym/trained_models/ppo directory.

Robot assisting a static person in VR

Here we evaluate a pretrained Revised policy for a Jaco robot assisting to feed a person, while the person sits with a static pose in a wheelchair. This policy is trained on the new environment with revised human biomechanics (see the publication). This will launch the simulated environment in VR, and align the simulated human model to your real body pose as determined by your Oculus Rift S.

python enjoy_vr_trial.py --gender male --vr-env FeedingVRJacoNew-v0 --env FeedingJacoNew-v0

Replay a recorded trial from VR

The enjoy_vr_trial.py script above will record the entire VR trial (robot and human state at each time step), which can then be replayed. The command below will replay (visualize) the entire interaction that occurred in VR.

python replay_vr.py --env FeedingJacoNew-v0 --replay-dir <fill in replay directory here>

The --replay-dir argument should be set to the directory created from enjoy_vr_trial.py. For example: participant_0\feeding_vr_data_jaco_NewStatic_participant_0_2020-07-10_00-35-31

Training a new policy

Finally, new control policies can be trained using the command below:

python -m ppo.train –-env-name "ScratchItchJacoNew-v0" --num-env-steps 10000000 –-save-dir ./trained_models_new/