IGParkourEnv
The main Isaac Gym environment for motion tracking and parkour tasks.Initialization
config(dict): Environment configuration containing:env: Environment-specific settings- Character model, terrain, observation/action spaces
num_envs(int): Number of parallel environmentsdevice(str): PyTorch device (“cuda:0” or “cpu”)visualize(bool): Enable visualization and rendering
ig_parkour_env.py:40-149
Key Attributes
Observation Space
Observations include:- Root state: Position, rotation, velocity, angular velocity
- Joint rotations: Character joint angles
- DOF velocities: Joint velocities
- Key body positions: End effector positions
- Target observations: Future reference motion states (if enabled)
- Contact information: Binary contact states (if enabled)
- Heightmap: Local terrain height field
ig_parkour_env.py:842-965
Action Space
Core Methods
reset()
Resets specified environments to initial state.env_ids(torch.Tensor, optional): Environment indices to reset. If None, resets all.
obs(torch.Tensor): Observations[num_envs, obs_dim]info(dict): Additional information
ig_parkour_env.py:809-829
step()
Executes one simulation step with actions.action(torch.Tensor): Actions[num_envs, action_dim]
next_obs(torch.Tensor): Next observationsreward(torch.Tensor): Rewards[num_envs]done(torch.Tensor): Done flags[num_envs]info(dict): Additional information including:rewards: Detailed reward componentstimestep: Current timestep per environmentchar_contact_forces: Contact forces on character
ig_parkour_env.py:831-840
Reward Structure
Reward computation based on multiple components:pose_r: Joint rotation similarity to referencevel_r: Joint velocity similarityroot_pos_r: Root position tracking errorroot_vel_r: Root velocity tracking errorkey_pos_r: Key body position tracking errorcontact_penalty: Contact timing mismatch penalty
ig_parkour_env.py:984-1044
Termination Conditions
Episode termination occurs when:- Height termination: Root height below threshold
- Pose termination: Pose deviation exceeds limit (if enabled)
- Root position termination: Root position error too large
- Root rotation termination: Root rotation error too large
- Time limit: Episode length exceeded
- Motion completion: Reference motion finished
ig_parkour_env.py:967-982
DeepMimicEnv
DeepMimic-style motion tracking environment with motion library.Initialization
config(dict): Configuration with DeepMimic settingsnum_envs(int): Number of parallel environmentsdevice(str): PyTorch devicevisualize(bool): Enable visualizationchar_model: Kinematic character model
dm_env.py:19-93
Motion Library
dm_env.py:473-521
Terrain Management
build_terrain()
Builds procedural terrain for motions."square": Grid layout of terrains"wide": Linear arrangement"file": Load from motion files
dm_env.py:95-316
load_terrain()
Loads pre-built terrain from file.dm_env.py:447-463
Reference Motion Updates
_update_ref_motion()
Updates reference motion state for current timestep.dm_env.py:523-545
compute_tar_obs()
Computes target observations for future timesteps.dm_env.py:594-626
Failure Rate Tracking
dm_env.py:628-665
Utility Methods
dm_env.py:737-758