Overview
The synthesis pipeline:- Generate terrain - Create procedural terrains (boxes, paths, stairs, or from files)
- Plan path - Use A* pathfinding on the terrain
- Generate motions - Use MDM to create candidate motions along the path
- Filter candidates - Apply kinematic heuristics (contact/penetration loss)
- Optimize - Refine motions with kinematic optimization
- Create variants - Save both original and mirrored versions
Quick Start
Configuration Guide
Core Settings
Terrain Settings
Procedural Generation Modes
Mode: BOXES
Generates random box obstacles:Mode: PATHS
Generates path-based terrains:Mode: STAIRS
Generates staircase terrains:Mode: FILE
Use pre-made terrain files:A* Path Planning
Configure the pathfinding algorithm:MDM Motion Generation
Configure how the MDM generates motions:Motion Quality Filtering
Set thresholds for accepting generated motions:Kinematic Optimization
Refine motions with optimization:Generation Modes
Terrain-Only Generation
To only generate terrains without motions:.pkl files with terrain and path data only, useful for testing terrain generation.
Full Generation
Important Files
See the implementation in:scripts/parc_2_kin_gen.py- Main generation scriptparc/motion_synthesis/procgen/astar.py- A* pathfindingparc/motion_synthesis/procgen/mdm_path.py- Autoregressive motion generationparc/motion_synthesis/motion_opt/motion_optimization.py- Kinematic optimizationparc/util/terrain_util.py- Terrain generation utilities
Output Format
Each.pkl file contains:
- motion_frames: Root positions, rotations, joint rotations, contacts
- terrain: Heightfield data
- path_nodes: Path waypoints
- hf_mask_inds: Terrain contact indices
- body_constraints: Body constraint data (if computed)
- fps: Frame rate
- loop_mode: CLAMP or WRAP
Troubleshooting
No Valid Motions Generated
Symptoms: Script keeps retrying, finds 0 valid motions Solutions:- Increase
max_contact_loss,max_pen_loss,max_total_loss - Adjust A* settings (reduce
max_z_diff, increasemax_jump_xy_dist) - Increase
mdm_batch_sizeto generate more candidates - Check if MDM model is properly trained
A* Cannot Find Path
Symptoms: “something wrong with procgen” error Solutions:- Reduce
min_start_end_xy_distin astar config - Simplify terrain (set
simplify_terrain: True) - Adjust
max_z_diffand jump parameters - For FILE mode, ensure terrain has traversable regions
Optimization Takes Too Long
Solutions:- Reduce
num_iters(try 1000 instead of 3000) - Reduce
mdm_batch_size(fewer candidates to optimize) - Reduce
top_kto 1
Motions Look Unnatural
Solutions:- Increase
w_smoothnessin opt config - Enable
remove_hesitation: True - Adjust
w_jerkto penalize abrupt changes - Lower
cfg_scalein mdm_gen (0.5 instead of 0.65)