Views
No views yet
dm_control physics-based environment and rollouts from these experts containing proprioceptive observations and actions. MoCapAct allows researchers to sidestep the computationally intensive task of training low-level control policies from MoCap data and instead use MoCapAct's expert agents and demonstrations for learning advanced locomotion behaviors. It also allows improving on our low-level policies by using them and their demonstration data as a starting point.dm_control.
We then re-use the learned low-level component to efficiently learn other high-level tasks.
Finally, we use MoCapAct to train an autoregressive GPT model and show that it can perform natural motion completion given a motion prompt.
We encourage the reader to visit our project website to see videos of our results as well as get links to our paper and code.├── all
│ └── experts
│ ├── experts_1.tar.gz
│ ├── experts_2.tar.gz
│ ...
│ └── experts_8.tar.gz
│
├── sample
│ └── experts.tar.gz
│
├── multiclip_policy.tar.gz
│ ├── full_dataset
│ └── locomotion_dataset
│
├── transfer.tar.gz
│ ├── go_to_target
│ │ ├── general_low_level
│ │ ├── locomotion_low_level
│ │ └── no_low_level
│ │
│ └── velocity_control
│ ├── general_low_level
│ ├── locomotion_low_level
│ └── no_low_level
│
├── gpt.ckpt
│
└── videos
├── full_clip_videos.tar.gz
└── snippet_videos.tar.gzall/experts/experts_*.tar.gz: Contains all of the clip snippet experts. Due to file size limitations, we split the experts among multiple tarball files.sample/experts.tar.gz: Contains the clip snippet experts used to run the examples on the dataset website.1from mocapact import observables
2from mocapact.sb3 import utils
3expert_path = "/path/to/experts/CMU_083_33/CMU_083_33-0-194/eval_rsi/model"
4expert = utils.load_policy(expert_path, observables.TIME_INDEX_OBSERVABLES)
5
6from mocapact.envs import tracking
7from dm_control.locomotion.tasks.reference_pose import types
8dataset = types.ClipCollection(ids=['CMU_083_33'], start_steps=[0], end_steps=[194])
9env = tracking.MocapTrackingGymEnv(dataset)
10obs, done = env.reset(), False
11while not done:
12 action, _ = expert.predict(obs, deterministic=True)
13 obs, rew, done, _ = env.step(action)
14 print(rew)1python -m mocapact.clip_expert.evaluate \
2 --policy_root /path/to/experts/CMU_016_22/CMU_016_22-0-82/eval_rsi/model \
3 --act_noise 0 \
4 --ghost_offset 1 \
5 --always_init_at_clip_startgpt.ckpt and can be loaded using PyTorch Lightning:1from mocapact.distillation import model
2policy = model.GPTPolicy.load_from_checkpoint('/path/to/gpt.ckpt', map_location='cpu')mocapact/distillation/motion_completion.py, as in the following example:1python -m mocapact.distillation.motion_completion.py \
2 --policy_path /path/to/gpt.ckpt \
3 --nodeterministic \
4 --ghost_offset 1 \
5 --expert_root /path/to/experts/CMU_016_25 \
6 --max_steps 500 \
7 --always_init_at_clip_start \
8 --prompt_length 32 \
9 --min_steps 32 \
10 --device cuda \
11 --clip_snippet CMU_016_25multiclip_policy.tar.gz file contains two policies:full_dataset: Trained on the entire MoCapAct datasetlocomotion_dataset: Trained on the locomotion_small portion of the MoCapAct datasetfull_dataset as an example, a multi-clip policy can be loaded using PyTorch Lightning:1from mocapact.distillation import model
2policy = model.NpmpPolicy.load_from_checkpoint('/path/to/multiclip_policy/full_dataset/model/model.ckpt', map_location='cpu')mocapact/distillation/evaluate.py, as in the following example:1python -m mocapact.distillation.evaluate \
2 --policy_path /path/to/multiclip_policy/full_dataset/model/model.ckpt \
3 --act_noise 0 \
4 --ghost_offset 1 \
5 --always_init_at_clip_start \
6 --termination_error_threshold 10 \
7 --clip_snippets CMU_016_22transfer.tar.gz file contains policies for downstream tasks. The main difference between the contained folders is what low-level policy is used:general_low_level: Low-level policy comes from multiclip_policy/full_datasetlocomotion_low_level: Low-level policy comes from multiclip_policy/locomotion_datasetno_low_level: No low-level policy used├── best_model.zip
├── low_level_policy.ckpt
└── vecnormalize.pkllow_level_policy.ckpt (only present in general_low_level and locomotion_low_level) contains the low-level policy and is loaded with PyTorch Lightning.
The best_model.zip file contains the task policy parameters.
The vecnormalize.pkl file contains the observation normalizer.
The latter two files are loaded with Stable-Baselines3.mocapact/transfer/evaluate.py, as in the following example:1python -m mocapact.transfer.evaluate \
2 --model_root /path/to/transfer/go_to_target/general_low_level \
3 --task /path/to/mocapact/transfer/config.py:go_to_targetfull_clip_videos.tar.gz contains videos of the full MoCap clips.snippet_videos.tar.gz contains videos of the snippets that were used to train the experts.
Note that they are playbacks of the clips themselves, not rollouts of the corresponding experts.