跳到主要内容
Robot Lab 基于 Isaac Lab 的机器人强化学习实战指南 | 极客日志
Python AI 算法
Robot Lab 基于 Isaac Lab 的机器人强化学习实战指南 Robot Lab 扩展库为各类机器人提供标准化的强化学习训练环境,无需修改核心 Isaac Lab 仓库。教程涵盖 Isaac Sim 与 Isaac Lab 的核心概念解析、环境安装配置、常用快捷键及多类型机器人支持列表。通过 Unitree Go2 和 G1 示例演示了从训练、监控到策略测试的全流程,并深入讲解了自定义机器人资产定义、任务配置编写及环境注册方法。此外还涉及多 GPU 训练、知识蒸馏等高级功能及常见问题排查,旨在帮助开发者高效完成从仿真到实物的强化学习部署。
王初壹 发布于 2026/4/12 更新于 2026/4/24 2 浏览Robot Lab 基于 Isaac Lab 的机器人强化学习实战指南
1. 项目简介
Robot Lab 是一个基于 NVIDIA Isaac Lab 构建的机器人强化学习扩展库,专注于为各类机器人提供标准化的强化学习训练环境。开发者可以在独立的环境中开发,无需修改核心 Isaac Lab 仓库。
要理解这套工具链,得先理清 NVIDIA 机器人平台的架构。它主要由两大核心组件构成:基础仿真平台 Isaac Sim,以及构建于其上的机器人学习应用框架 Isaac Lab。
Isaac Sim 是什么?它是一个通用的机器人模拟器,提供了高保真的物理引擎(PhysX)和照片级的渲染技术(RTX)。核心任务是构建精确、逼真的虚拟环境,包括机器人模型、传感器数据和物理交互。
核心概念解析
Application (App) :最高层级管理者,负责所有资源的生命周期,包括启动和销毁仿真进程。即使在无头模式下运行,App 依然是总控制器。
Simulation (Sim) :定义虚拟世界的'规则',如物理定律(重力方向)、时间步长(dt)及渲染频率。它将每一步划分为不同的子步骤(physics_step, render_step),掌管着 World 对象。
World :为仿真提供空间背景,定义笛卡尔坐标系的原点和单位。所有尺寸和距离问题都在此参考系内解答。
USD 图元 (Prim) :USD 场景的基本构建块,可理解为容器。每个 Prim 有唯一路径(如 /World/MyRobot/Gripper),包含属性(颜色、大小)和关系(材质指定)。父级属性可被子级继承,实现复杂场景组合。
Scene :Isaac Lab 中管理 Stage 上所有与向量化相关的图元。当用户指定创建多个环境副本时,Scene 会自动在 Stage 上克隆这些实体(机器人、桌子等),并将它们放置在不同坐标位置,实现在单一世界中进行大规模并行训练。
Stage :世界的'组成结构'。以通用场景描述(USD)为基础,将仿真元素表示为层级化的树状结构,每个节点都是一个图元(Prim)。
Isaac Lab 本身不是一个模拟器,而是利用 Isaac Sim 提供的环境来进行大规模的 AI 模型训练。
1.1 Isaac Sim 操作快捷键参考
熟练掌握快捷键能显著提升工作效率。以下是常用操作汇总:
基本操作
类型 键位 效果 基本操作 鼠标左键 选中物体 基本操作 ESC 取消选中 基本操作 Ctrl + Z / Y 撤销 / 重做 基本操作 Ctrl + S / O / N 保存 / 打开 / 新建场景 基本操作 Delete 删除选中的物体 基本操作 Ctrl + D / C / V / X 复制 / 剪切 / 粘贴
视野操作
类型 键位 效果 视野操作 目标 + F 聚焦于选中的物体 视野操作 不选中 + F 聚焦于整个场景 视野操作
物体操作与变换 类型 键位 效果 变换操作 W / E / R 平移 / 旋转 / 缩放模式 变换操作 Shift + 拖拽 特定轴精确移动 变换操作 Ctrl + 拖拽 启用吸附功能 变换操作 Ctrl + Shift + 拖拽 对物体施加力
仿真控制 类型 键位 效果 仿真控制 空格键 播放/暂停仿真 仿真控制 Ctrl + 空格 单步执行仿真 仿真控制 Ctrl + Shift + 空格 停止并重置 仿真控制 . / , 前进/后退一帧
注:Mac 系统下 Ctrl 通常对应 Cmd 键。部分快捷键需在特定上下文(如 3D 视口激活)下使用。
2. 支持的机器人 Robot Lab 支持多种主流机器人,涵盖四足、轮式和人形。
2.1 四足机器人 (Quadruped) 机器人 环境 ID 制造商 ANYmal D RobotLab-Isaac-Velocity-Rough-Anymal-D-v0ANYbotics Unitree Go2 RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0Unitree Unitree B2 RobotLab-Isaac-Velocity-Rough-Unitree-B2-v0Unitree Unitree A1 RobotLab-Isaac-Velocity-Rough-Unitree-A1-v0Unitree Deeprobotics Lite3 RobotLab-Isaac-Velocity-Rough-Deeprobotics-Lite3-v0Deeprobotics
2.2 轮式机器人 (Wheeled) 机器人 环境 ID 制造商 Unitree Go2W RobotLab-Isaac-Velocity-Rough-Unitree-Go2W-v0Unitree Unitree B2W RobotLab-Isaac-Velocity-Rough-Unitree-B2W-v0Unitree Deeprobotics M20 RobotLab-Isaac-Velocity-Rough-Deeprobotics-M20-v0Deeprobotics
2.3 人形机器人 (Humanoid) 机器人 环境 ID 制造商 Unitree G1 RobotLab-Isaac-Velocity-Rough-Unitree-G1-v0Unitree Unitree H1 RobotLab-Isaac-Velocity-Rough-Unitree-H1-v0Unitree FFTAI GR1T1 RobotLab-Isaac-Velocity-Rough-FFTAI-GR1T1-v0FFTAI Booster T1 RobotLab-Isaac-Velocity-Rough-Booster-T1-v0Booster
提示 : 所有环境都支持 Rough(崎岖地形)和 Flat(平地)两种地形配置。
3. 环境准备
3.1 安装 Isaac Lab 确保已正确安装 Isaac Sim,并配置好环境变量。具体安装细节请参考官方文档。
3.2 安装 Robot Lab
cd ~
git clone https://github.com/fan-ziqi/robot_lab.git
cd robot_lab
conda activate isaaclab
python -m pip install -e source /robot_lab
python scripts/tools/list_envs.py
深入理解:安装配置详解 当你运行 pip install -e 时,实际上是在执行可编辑模式安装 。关键配置文件 setup.py 定义了包的元数据和依赖关系。
INSTALL_REQUIRES=[
"psutil" ,
"colorama" ,
"xacrodoc" ,
"numpy" ,
"pandas" ,
"pinocchio" ,
"cusrl[all]" ,
]
基础依赖 :psutil 用于监控训练时的资源占用;colorama 美化日志输出。
运动模仿依赖 :pinocchio 性能极高,用于正向/逆向运动学计算,在 BeyondMimic 中将人类动作映射到机器人。
强化学习框架 :cusrl[all] 提供 PPO、SAC 等算法实现。
4. 快速开始
4.1 示例 1: 训练四足机器人(Unitree Go2)
训练
conda activate isaaclab
cd ~/robot_lab
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--headless \
--num_envs 4096
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--num_envs 512
--task: 环境 ID
--headless: 无头模式(不显示 GUI)
--num_envs: 并行环境数量(根据 GPU 显存调整)
训练日志保存在 logs/rsl_rl/<task_name>/<timestamp> 目录。
监控训练 tensorboard --logdir=logs
浏览器访问 http://localhost:6006 查看训练曲线。
测试策略
python scripts/reinforcement_learning/rsl_rl/play.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--checkpoint /path/to/model_2400.pt \
--num_envs 64
python scripts/reinforcement_learning/rsl_rl/play.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--checkpoint /path/to/model_2400.pt \
--num_envs 1 \
--keyboard
X 轴移动:Numpad 8 / Arrow Up (前), Numpad 2 / Arrow Down (后)
Y 轴移动:Numpad 4 / Arrow Right (右), Numpad 6 / Arrow Left (左)
Z 轴旋转:Numpad 7 / Z (左转), Numpad 9 / X (右转)
录制视频
python scripts/reinforcement_learning/rsl_rl/play.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--num_envs 4 \
--video \
--video_length 200
4.2 示例 2: 训练人形机器人(Unitree G1)
基础速度控制
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-G1-v0 \
--headless
python scripts/reinforcement_learning/rsl_rl/play.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-G1-v0
强化学习实现运动控制的基本流程 :
Train → Play → Sim2Sim → Sim2Real
Train : 在 Isaac Lab 任务上并行仿真训练策略。
Play : 加载 checkpoint 在仿真中回放/可视化。
Sim2Sim : 把导出的策略放到其它仿真器(如 Mujoco)验证迁移。
Sim2Real : 把策略部署到实物机器人(需调试模式/安全防护)。
模仿策略学习
python scripts/tools/beyondmimic/csv_to_npz.py \
-f path/to/motion.csv \
--input_fps 60 \
--headless
python scripts/tools/beyondmimic/replay_npz.py \
-f path/to/motion.npz
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-BeyondMimic-Flat-Unitree-G1-v0 \
--headless
python scripts/reinforcement_learning/rsl_rl/play.py \
--task=RobotLab-Isaac-BeyondMimic-Flat-Unitree-G1-v0 \
--num_envs 2
4.3 示例 3: AMP 舞蹈动作学习 对抗性运动先验(AMP)可以学习更自然的运动模式。
python scripts/reinforcement_learning/skrl/train.py \
--task=RobotLab-Isaac-G1-AMP-Dance-Direct-v0 \
--algorithm AMP \
--headless
python scripts/reinforcement_learning/skrl/play.py \
--task=RobotLab-Isaac-G1-AMP-Dance-Direct-v0 \
--algorithm AMP \
--num_envs 32
5. 高级功能
5.1 多 GPU 训练
单机多卡
python -m torch.distributed.run \
--nnodes=1 \
--nproc_per_node=2 \
scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--headless \
--distributed
多机多卡 python -m torch.distributed.run \
--nproc_per_node=2 \
--nnodes=2 \
--node_rank=0 \
--rdzv_id=123 \
--rdzv_backend=c10d \
--rdzv_endpoint=localhost:5555 \
scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--headless \
--distributed
python -m torch.distributed.run \
--nproc_per_node=2 \
--nnodes=2 \
--node_rank=1 \
--rdzv_id=123 \
--rdzv_backend=c10d \
--rdzv_endpoint=192.168.1.100:5555 \
scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--headless \
--distributed
5.2 对称性数据增强
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Rough-Anymal-D-v0 \
--headless \
--agent=rsl_rl_with_symmetry_cfg_entry_point \
--run_name=ppo_with_symmetry \
agent.algorithm.symmetry_cfg.use_data_augmentation=true
python scripts/reinforcement_learning/rsl_rl/play.py \
--task=RobotLab-Isaac-Velocity-Rough-Anymal-D-v0 \
--agent=rsl_rl_with_symmetry_cfg_entry_point \
--run_name=ppo_with_symmetry
5.3 教师 - 学生蒸馏
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Flat-Anymal-D-v0 \
--headless \
--run_name=teacher
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Flat-Anymal-D-v0 \
--headless \
--agent=rsl_rl_distillation_cfg_entry_point \
--load_run teacher \
--run_name=student
python scripts/reinforcement_learning/rsl_rl/play.py \
--task=RobotLab-Isaac-Velocity-Flat-Anymal-D-v0 \
--agent=rsl_rl_distillation_cfg_entry_point \
--load_run student
5.4 恢复训练
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--headless \
--resume \
--load_run <run_folder_name>
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Rough-Unitree-Go2-v0 \
--headless \
--resume \
--load_run <run_folder_name> \
--checkpoint /path/to/model_5000.pt
5.5 特技动作训练
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Flat-HandStand-Unitree-A1-v0 \
--headless
python scripts/reinforcement_learning/rsl_rl/play.py \
--task=RobotLab-Isaac-Velocity-Flat-HandStand-Unitree-A1-v0
6. 自定义机器人
6.1 项目结构 robot_lab/
├── source /
│ └── robot_lab/
│ ├── assets/
│ │ └── unitree.py
│ ├── tasks/
│ │ └── manager_based/
│ │ └── locomotion/
│ │ └── velocity/
│ │ ├── velocity_env_cfg.py
│ │ └── config/
│ │ └── unitree_a1/
│ │ ├── flat_env_cfg.py
│ │ └── agent/
│ │ └── rsl_rl_ppo_cfg.py
│ └── ui_extension_example.py
└── scripts/
├── reinforcement_learning/
│ └── rsl_rl/
│ ├── train.py
│ └── play.py
└── tools/
6.2 添加新机器人的步骤
步骤 1: 定义机器人资产 在 source/robot_lab/assets/ 创建机器人定义文件(例如 my_robot.py):
from omni.isaac.lab.actuators import ActuatorNetMLPCfg, DCMotorCfg
from omni.isaac.lab.assets.articulation import ArticulationCfg
import omni.isaac.lab.sim as sim_utils
MY_ROBOT_CFG = ArticulationCfg(
spawn=sim_utils.UsdFileCfg(
usd_path="/path/to/my_robot.usd" ,
activate_contact_sensors=True ,
),
rigid_props=sim_utils.RigidBodyPropertiesCfg(
disable_gravity=False ,
retain_accelerations=False ,
linear_damping=0.0 ,
angular_damping=0.0 ,
max_linear_velocity=1000.0 ,
max_angular_velocity=1000.0 ,
max_depenetration_velocity=1.0 ,
),
articulation_props=sim_utils.ArticulationRootPropertiesCfg(
enabled_self_collisions=False ,
solver_position_iteration_count=4 ,
solver_velocity_iteration_count=0 ,
),
init_state=ArticulationCfg.InitialStateCfg(
pos=(0.0 , 0.0 , 0.6 ),
joint_pos={".*_hip_joint" : 0.0 , ".*_thigh_joint" : 0.7 , ".*_calf_joint" : -1.4 },
joint_vel={".*" : 0.0 },
),
actuators={
"legs" : DCMotorCfg(
joint_names_expr=[".*_hip_joint" , ".*_thigh_joint" , ".*_calf_joint" ],
effort_limit=33.5 ,
saturation_effort=33.5 ,
velocity_limit=21.0 ,
stiffness=25.0 ,
damping=0.5 ,
friction=0.0 ,
),
},
)
步骤 2: 创建任务配置 在 source/robot_lab/tasks/manager_based/locomotion/velocity/config/ 创建机器人配置目录。
理解并行环境与 Interactive Scene
强化学习训练需要大量的并行环境来加速学习。想象一下,如果只有一个机器人在学习走路,效率很低。但如果有 4096 个机器人同时在 4096 个独立的环境中练习,AI 就能同时从经验中学习,训练速度提升数千倍!这就是 Isaac Lab 中 Interactive Scene 的作用。
{ENV_REGEX_NS} 魔法变量
这是 Isaac Lab 中最重要的概念之一。当你写下 prim_path="{ENV_REGEX_NS}/Robot" 时,Isaac Lab 会在创建环境时自动将它替换为每个环境的唯一路径:
prim_path="{ENV_REGEX_NS}/Robot"
机器人 :必须使用,每个环境的机器人需要独立控制。
传感器 :必须使用,每个环境的传感器需要独立读取数据。
地面/灯光 :不需要,所有环境共享同一个无限大的平面或光源。
这种设计使得我们可以用一份配置 轻松创建成千上万个并行环境 ,大幅加速强化学习训练!
首先创建 rough_env_cfg.py (包含完整配置):
from isaaclab.utils import configclass
from robot_lab.assets import MY_ROBOT_CFG
from robot_lab.tasks.manager_based.locomotion.velocity.velocity_env_cfg import (
LocomotionVelocityRoughEnvCfg,
)
@configclass
class MyRobotRoughEnvCfg (LocomotionVelocityRoughEnvCfg ):
base_link_name = "base"
foot_link_name = ".*_foot"
joint_names = [
"FR_hip_joint" , "FR_thigh_joint" , "FR_calf_joint" ,
"FL_hip_joint" , "FL_thigh_joint" , "FL_calf_joint" ,
"RR_hip_joint" , "RR_thigh_joint" , "RR_calf_joint" ,
"RL_hip_joint" , "RL_thigh_joint" , "RL_calf_joint" ,
]
def __post_init__ (self ):
super ().__post_init__()
self .scene.robot = MY_ROBOT_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot" )
self .scene.height_scanner.prim_path = "{ENV_REGEX_NS}/Robot/" + self .base_link_name
self .observations.policy.base_lin_vel.scale = 2.0
self .observations.policy.base_ang_vel.scale = 0.25
self .observations.policy.joint_pos.scale = 1.0
self .observations.policy.joint_vel.scale = 0.05
self .observations.policy.joint_pos.params["asset_cfg" ].joint_names = self .joint_names
self .observations.policy.joint_vel.params["asset_cfg" ].joint_names = self .joint_names
self .actions.joint_pos.scale = {
".*_hip_joint" : 0.125 ,
"^(?!.*_hip_joint).*" : 0.25
}
self .actions.joint_pos.clip = {".*" : (-100.0 , 100.0 )}
self .actions.joint_pos.joint_names = self .joint_names
self .rewards.lin_vel_z_l2.weight = -2.0
self .rewards.ang_vel_xy_l2.weight = -0.05
self .rewards.flat_orientation_l2.weight = 0
self .rewards.base_height_l2.weight = 0
self .rewards.joint_torques_l2.weight = -2.5e-5
self .rewards.joint_acc_l2.weight = -2.5e-7
self .commands.base_velocity.ranges.lin_vel_x = (-1.0 , 1.5 )
self .commands.base_velocity.ranges.lin_vel_y = (-0.5 , 0.5 )
self .commands.base_velocity.ranges.ang_vel_z = (-1.0 , 1.0 )
然后创建 flat_env_cfg.py (继承 rough 并禁用某些功能):
from isaaclab.utils import configclass
from .rough_env_cfg import MyRobotRoughEnvCfg
@configclass
class MyRobotFlatEnvCfg (MyRobotRoughEnvCfg ):
def __post_init__ (self ):
super ().__post_init__()
self .scene.terrain.terrain_type = "plane"
self .scene.terrain.terrain_generator = None
self .scene.height_scanner = None
self .observations.policy.height_scan = None
self .observations.critic.height_scan = None
self .curriculum.terrain_levels = None
self .rewards.base_height_l2.params["sensor_cfg" ] = None
if self .__class__.__name__ == "MyRobotFlatEnvCfg" :
self .disable_zero_weight_rewards()
LocomotionVelocityRoughEnvCfg (Isaac Lab 基类)
↑
MyRobotRoughEnvCfg (完整配置:地形生成、高度扫描、所有传感器)
↑
MyRobotFlatEnvCfg (简化配置:平地、无高度扫描)
步骤 3: 配置训练参数 在 agent/ 目录创建 rsl_rl_ppo_cfg.py:
from isaaclab.utils import configclass
from isaaclab_rl.rsl_rl import (
RslRlOnPolicyRunnerCfg,
RslRlPpoActorCriticCfg,
RslRlPpoAlgorithmCfg,
)
@configclass
class MyRobotRoughPPORunnerCfg (RslRlOnPolicyRunnerCfg ):
num_steps_per_env = 24
max_iterations = 20000
save_interval = 100
experiment_name = "my_robot_rough"
policy = RslRlPpoActorCriticCfg(
init_noise_std=1.0 ,
actor_obs_normalization=False ,
critic_obs_normalization=False ,
actor_hidden_dims=[512 , 256 , 128 ],
critic_hidden_dims=[512 , 256 , 128 ],
activation="elu" ,
)
algorithm = RslRlPpoAlgorithmCfg(
value_loss_coef=1.0 ,
use_clipped_value_loss=True ,
clip_param=0.2 ,
entropy_coef=0.01 ,
num_learning_epochs=5 ,
num_mini_batches=4 ,
learning_rate=1.0e-3 ,
schedule="adaptive" ,
gamma=0.99 ,
lam=0.95 ,
desired_kl=0.01 ,
max_grad_norm=1.0 ,
)
@configclass
class MyRobotFlatPPORunnerCfg (MyRobotRoughPPORunnerCfg ):
def __post_init__ (self ):
super ().__post_init__()
self .max_iterations = 5000
self .experiment_name = "my_robot_flat"
步骤 4: 注册环境 在 config/my_robot/__init__.py 注册环境:
import gymnasium as gym
from . import agents
gym.register(
id ="RobotLab-Isaac-Velocity-Flat-My-Robot-v0" ,
entry_point="isaaclab.envs:ManagerBasedRLEnv" ,
disable_env_checker=True ,
kwargs={
"env_cfg_entry_point" : f"{__name__} .flat_env_cfg:MyRobotFlatEnvCfg" ,
"rsl_rl_cfg_entry_point" : f"{agents.__name__} .rsl_rl_ppo_cfg:MyRobotFlatPPORunnerCfg" ,
},
)
gym.register(
id ="RobotLab-Isaac-Velocity-Rough-My-Robot-v0" ,
entry_point="isaaclab.envs:ManagerBasedRLEnv" ,
disable_env_checker=True ,
kwargs={
"env_cfg_entry_point" : f"{__name__} .rough_env_cfg:MyRobotRoughEnvCfg" ,
"rsl_rl_cfg_entry_point" : f"{agents.__name__} .rsl_rl_ppo_cfg:MyRobotRoughPPORunnerCfg" ,
},
)
步骤 5: 验证和训练
python scripts/tools/list_envs.py | grep "My-Robot"
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=RobotLab-Isaac-Velocity-Flat-My-Robot-v0 \
--headless
调优技巧
观察空间调整 :增加关键传感器信息(IMU、关节状态),使用历史缓冲提供时序信息,适当的归一化和缩放。
奖励函数设计 :平衡任务目标(速度跟踪)和约束(能耗、稳定性),避免奖励稀疏或过于密集。
超参数调整 :根据任务复杂度调整网络大小,增加环境数量加速训练,调整学习率和 PPO clip 范围。
域随机化 :添加质量、摩擦力、电机参数的随机化,模拟传感器噪声,提升 Sim2Real 迁移性能。
7. 常见问题
7.1 安装问题 Q: 提示找不到 Isaac Sim
A: 确保已正确安装 Isaac Sim,并设置环境变量:
export ISAAC_SIM_PATH="/path/to/isaac-sim"
Q: pip 安装失败
A: 尝试升级 pip 和 setuptools:
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e source /robot_lab
7.2 训练问题 Q: GPU 内存不足(OOM)
A: 减少并行环境数量:
python scripts/reinforcement_learning/rsl_rl/train.py \
--task=<ENV_NAME> \
--num_envs 1024
Q: 训练速度慢
A: 检查以下几点:使用无头模式(--headless),增加并行环境数,使用更强的 GPU,检查 CPU 瓶颈。
Q: 奖励不收敛
A: 常见原因:奖励函数设计不合理,超参数需要调整,观察空间不足,任务过于复杂。
7.3 仿真问题 rigid_props=sim_utils.RigidBodyPropertiesCfg(
max_depenetration_velocity=1.0 ,
),
articulation_props=sim_utils.ArticulationRootPropertiesCfg(
solver_position_iteration_count=8 ,
solver_velocity_iteration_count=2 ,
),
7.4 部署问题 Q: 如何部署到真实机器人?
A: 建议使用相关开源项目进行 Gazebo 仿真验证及 ROS/ROS2 集成。
7.5 Pylance 找不到模块 A: 在 .vscode/settings.json 添加路径:
{ "python.analysis.extraPaths" : [ "${workspaceFolder}/source/robot_lab" , "/path/to/IsaacLab/source/isaaclab" ] }
7.6 清理 USD 缓存 rm -rf /tmp/IsaacLab/usd_*
8. 参考链接 相关免费在线工具 加密/解密文本 使用加密算法(如AES、TripleDES、Rabbit或RC4)加密和解密文本明文。 在线工具,加密/解密文本在线工具,online
RSA密钥对生成器 生成新的随机RSA私钥和公钥pem证书。 在线工具,RSA密钥对生成器在线工具,online
Mermaid 预览与可视化编辑 基于 Mermaid.js 实时预览流程图、时序图等图表,支持源码编辑与即时渲染。 在线工具,Mermaid 预览与可视化编辑在线工具,online
curl 转代码 解析常见 curl 参数并生成 fetch、axios、PHP curl 或 Python requests 示例代码。 在线工具,curl 转代码在线工具,online
Base64 字符串编码/解码 将字符串编码和解码为其 Base64 格式表示形式即可。 在线工具,Base64 字符串编码/解码在线工具,online
Base64 文件转换器 将字符串、文件或图像转换为其 Base64 表示形式。 在线工具,Base64 文件转换器在线工具,online