fix: MuJoCo sim2sim default_angles match MotrixSim training

This commit is contained in:
8x54zj-m
2026-07-01 20:55:16 +08:00
parent 2bd4c05e1b
commit 63b235d186
3 changed files with 8 additions and 7 deletions

View File

@@ -222,8 +222,8 @@ class DreamWaQPPO(PPO):
cv = std_r / (mean_r + 1e-6) cv = std_r / (mean_r + 1e-6)
if not (0 <= cv < 1e6): # NaN 或 Inf → 保持当前 prob if not (0 <= cv < 1e6): # NaN 或 Inf → 保持当前 prob
return return
# CV → bootstrap 概率CV 高→不稳定→多用 GT上限 0.9 保证 CENet vel head 有梯度 # CV → bootstrap 概率CENet vel head 通过 VAE loss 已有梯度,无需额外保护
self.actor._adaboot_prob = max(0.0, min(0.9, cv * 5.0)) self.actor._adaboot_prob = max(0.0, min(1.0, cv * 5.0))
def _compute_surrogate_loss( def _compute_surrogate_loss(
self, actions_batch, actions_log_prob_batch, self, actions_batch, actions_log_prob_batch,

View File

@@ -136,7 +136,7 @@ class rslrl:
runner.actor.class_name = ( runner.actor.class_name = (
"motrix_rl.rslrl.torch.models.cenet_actor:CENetActorModel") "motrix_rl.rslrl.torch.models.cenet_actor:CENetActorModel")
runner.actor.hidden_dims = [512, 256, 128] runner.actor.hidden_dims = [512, 256, 128]
runner.actor.init_noise_std = 0.5 # 与 fixed schedule 配合 runner.actor.init_noise_std = 1.0 # 论文原值
# Critic标准 MLPModel输入 privileged_obs # Critic标准 MLPModel输入 privileged_obs
runner.critic.class_name = "MLPModel" runner.critic.class_name = "MLPModel"

View File

@@ -37,11 +37,12 @@ MAX_VX, MAX_VY, MAX_WZ = 1.0, 1.0, 1.0
# DreamWaQ default joint angles — MUST match MuJoCo XML joint order: # DreamWaQ default joint angles — MUST match MuJoCo XML joint order:
# qpos[7:19] = FR_hip,FR_thigh,FR_calf, FL_hip,FL_thigh,FL_calf, RR_hip,RR_thigh,RR_calf, RL_hip,RL_thigh,RL_calf # qpos[7:19] = FR_hip,FR_thigh,FR_calf, FL_hip,FL_thigh,FL_calf, RR_hip,RR_thigh,RR_calf, RL_hip,RL_thigh,RL_calf
# 必须与 MotrixSim 训练的 default_angles 完全一致!
DEFAULT_ANGLES = np.array([ DEFAULT_ANGLES = np.array([
-0.1, 0.8, -1.5, # FR 0.0, 0.9, -1.8, # FR
0.1, 0.8, -1.5, # FL 0.0, 0.9, -1.8, # FL
-0.1, 1.0, -1.5, # RR 0.0, 0.9, -1.8, # RR
0.1, 1.0, -1.5, # RL 0.0, 0.9, -1.8, # RL
], dtype=np.float32) ], dtype=np.float32)