Overview
The recording process:- Loads a trained tracking controller
- Runs tracking in parallel environments
- Records the physics simulation output
- Filters out failed tracking attempts
- Handles partial tracking with multiple starting points
- Saves successful recordings as new motion files
Quick Start
Configuration Guide
Basic Configuration
How It Works
The script performs the following:- Load dataset config - Reads
create_dataset_configto get the list of reference motions - Count motions - Determines how many parallel environments to create (one per motion)
- Configure environment - Sets up recording environment with:
motion_file: Path to dataset YAMLoutput_motion_dir: Where to save recorded motions
- Run recording - Executes tracking controller in “record” mode
- Save results - Writes successfully tracked motions to output directory
Environment Configuration
The recording script automatically modifies the environment config:- The environment loads the correct reference motions
- Terrain data is saved for debugging
- Recorded motions go to the right directory
Recording Process Details
Parallel Recording
The script creates one environment per motion in the dataset, allowing all motions to be tracked in parallel:Success Filtering
Only motions that are successfully tracked without early termination are saved. This prevents failed or low-quality motions from being added back to the dataset.Partial Tracking Recovery
From the guide documentation:Sometimes a reference motion has a particular segment that is too difficult to track, but the rest of the motion is interesting and is able to be tracked. This script helps address this case by attempting to record at different starting times.Strategy:
- Try tracking the full motion from the start
- If it fails, try starting at a later time (e.g., 25% through)
- If still failing, try starting at 50% through
- Give up if tracking still fails
Output Structure
Recorded Motion Format
Each.pkl file contains physics-based motion data:
- Root positions and rotations (from physics sim)
- Joint rotations (from PD controller)
- Contact states (from physics sim)
- Terrain heightfield
- Metadata (fps, loop mode, etc.)
Integration with PARC Loop
In the full PARC pipeline:Command Line Arguments
The script builds arguments for the underlyingrun_tracker.main() function:
--mode record tells the environment to save motions instead of training.
Important Files
scripts/parc_4_phys_record.py- Recording launcher scriptparc/motion_tracker/run_tracker.py- Main execution with “record” modeparc/motion_tracker/envs/ig_parkour/dm_env.py- Environment that handles recording
Troubleshooting
No Motions Saved
Symptoms:recorded_motions/ directory is empty
Causes:
- Tracking controller fails on all motions
- Early termination triggers on every motion
- Reference motions are too difficult
- Check if tracker was trained long enough
- Visualize tracking to see failure modes
- Review termination conditions in environment config
- Try recording with a subset of simpler motions first
Out of Memory
Symptoms: CUDA out of memory during recording Causes:- Too many parallel environments (one per motion)
- Record in batches: split dataset into smaller chunks
- Reduce number of motions in
create_dataset_config - Use a GPU with more memory
- Reduce environment observation/state sizes
Recording Takes Too Long
Symptoms: Recording runs for hours Causes:- Large dataset with many motions
- Long motion sequences
- Ensure GPU is being used (
device: "cuda:0") - Check that parallel environments are working (should be fast)
- Use fewer motions per batch
- Verify no visualization is enabled
Motions Look Different from Reference
Symptoms: Recorded motions don’t match kinematic references Causes:- Tracking controller not trained well
- Physics simulation settings differ from training
- Reference motions are physically infeasible
- Train tracker longer or with better hyperparameters
- Verify physics parameters match training environment
- Check reference motions with MotionScope viewer
- Increase reward weights for tracking accuracy
Dataset Path Errors
Symptoms: Cannot find motions, file not found errors Causes:- Incorrect path in
create_dataset_config - Relative vs absolute path issues
- Use absolute paths in dataset config
- Verify motion
.pklfiles exist at specified paths - Check
$DATA_DIRenvironment variable is set correctly - Print the loaded dataset path for debugging
Advanced Usage
Recording Specific Motions
To record only a subset of motions:- Create a temporary dataset config with only those motions
- Point
create_dataset_configto the temporary config - Run recording
Batch Recording
For very large datasets:Debugging Failed Recordings
To visualize why recording fails:Next Steps
After recording:- Add to dataset: Include recorded motions in your motion library for the next PARC iteration
- Visualize: Use MotionScope to review recorded motions
- Iterate: Train a new generator on the expanded dataset