How chengxuxin/extreme-parkour works
Project Type and Purpose
• This is a full-stack robotics Reinforcement Learning (RL) framework combining:
• A simulation/environment layer (legged_gym) built on NVIDIA Isaac Gym.
• An RL algorithm and training layer (rsl_rl) implemented in PyTorch.
• Command-line scripts for training, evaluation, playing back, saving JIT’d models, and visualization.
• The README confirms the goal: train and evaluate legged-robot parkour policies using Isaac Gym and PyTorch.
File Structure
• Top-level packages:
• legged_gym/… — defines environments, tasks, robot configurations, utilities, and simulation resources (URDFs, meshes, actuator nets).
• rsl_rl/… — implements RL algorithms (PPO), neural-network modules (actor-critic, recurrent, perception backbones), vectorized environment wrappers, runners (on-policy), and rollout storage.
• Resources and licensed assets (robots, terrains) live under legged_gym/resources.
• Installer logic (install.sh, setup.py files) and external-dependency manifests (requirements.txt).
README Insights
• Confirms two-stage training (base policy → distillation), CLI arguments, dependencies (Torch, Isaac Gym, numpy, wandb, Flask/web viewer).
• Usage patterns: scripts → initialize environment via legged_gym → interface to rsl_rl for learning updates → logs & artifacts.
Main Components & Their Relationships
a. Environment & Simulation Layer (legged_gym)
• Sub-components:
• Env configurations (a1, anymal, cassie, go1)
• BaseTask + LeggedRobot abstractions
• Terrain generator & utilities
• Webviewer server/client (Flask + webviewer.html)
• Dependencies: NVIDIA Isaac Gym binary (C++), URDF/meshes, actuator networks.
b. RL Core Layer (rsl_rl)
• Sub-components:
• Algorithms: PPO
• Neural modules: actor_critic, recurrent, depth_backbone, estimator
• VecEnv wrapper for parallel envs
• Runners: OnPolicyRunner orchestrates rollout collection and policy updates
• RolloutStorage for trajectories
c. CLI Scripts (legged_gym/scripts)
• Entry points for training, evaluation, playback, JIT exporting, visualization
• Parse CLI → instantiate rsl_rl runner + legged_gym env → loop
d. External Services & Tools
• Logging: wandb
• Model persistence: filesystem under legged_gym/logs
• Visualization: web viewer (Flask + browser), Isaac Gym GUI
e. Build & Installation
• install.sh + setup.py for editable installs
• requirements.txt lists Python packages
Architectural Patterns & Design Principles
• Modular separation into environment vs. learning algorithm.
• Runner pattern: decouples data collection (sim step) from policy update.
• Plugin-style env registration (task_registry) enabling new robots/terrains.
• Use of vectorized envs for throughput.
• JIT tracing for deployment.