Back to Module
Reinforcement Learning
Courses & Resources
Code Demos
PPO with Isaac Gym
GPU Required
Run in Playground
使用 Isaac Gym 训练四足机器人行走策略
python
import isaacgym
from isaacgym import gymapi, gymtorch
import torch
# Initialize Isaac Gym
gym = gymapi.acquire_gym()
sim_params = gymapi.SimParams()
sim_params.use_gpu_pipeline = True
# Create simulation
sim = gym.create_sim(0, 0, gymapi.SIM_PHYSX, sim_params)
# Load robot asset
asset_root = "./assets"
asset_file = "anymal_c/urdf/anymal_c.urdf"
asset = gym.load_asset(sim, asset_root, asset_file)
print("Isaac Gym environment ready for RL training!")
print(f"Number of bodies: {gym.get_asset_rigid_body_count(asset)}")
print(f"Number of DOFs: {gym.get_asset_dof_count(asset)}")