From 84fbf87c1458aa5b55fcd1343c271a738e9c4745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E6=9D=B0?= Date: Thu, 16 Apr 2026 14:54:59 +0800 Subject: [PATCH] fix: adjust g1 ppo motrix --- conf/ppo/task/g1_joystick/motrix.yaml | 23 +-- src/unilab/assets/robots/g1/g1.xml | 11 ++ src/unilab/assets/robots/g1/scene_flat.xml | 11 ++ src/unilab/envs/locomotion/common/base.py | 11 +- src/unilab/envs/locomotion/g1/base.py | 14 +- src/unilab/envs/locomotion/g1/joystick.py | 143 +++++++++++++++--- .../envs/motion_tracking/g1/motion_loader.py | 3 +- tests/config/test_config_system.py | 19 ++- tests/conftest.py | 26 ++-- tests/dr/test_manager.py | 4 +- tests/envs/test_env_configs.py | 100 +++++++++++- tests/scripts/test_train_scripts.py | 22 ++- tests/utils/test_algo_utils.py | 9 +- 13 files changed, 331 insertions(+), 65 deletions(-) diff --git a/conf/ppo/task/g1_joystick/motrix.yaml b/conf/ppo/task/g1_joystick/motrix.yaml index 7ac8fb949..6a1910fbd 100644 --- a/conf/ppo/task/g1_joystick/motrix.yaml +++ b/conf/ppo/task/g1_joystick/motrix.yaml @@ -4,7 +4,7 @@ training: sim_backend: motrix algo: num_envs: 2048 - max_iterations: 151 + max_iterations: 220 empirical_normalization: true obs_groups: actor: @@ -23,18 +23,22 @@ env: action_scale: 0.5 commands: vel_limit: - - [0.45, 0.0, 0.0] - - [0.55, 0.0, 0.0] - gait_phase_init_mode: independent + - [0.4, 0.0, 0.0] + - [0.7, 0.0, 0.0] + gait_phase_init_mode: offset_phase reset_base_qvel_limit: 0.05 reward: scales: - tracking_lin_vel: 3.0 + tracking_lin_vel: 2.0 tracking_ang_vel: 0.25 - forward_progress: 1.5 - under_speed: -1.0 + forward_progress: 0.0 + under_speed: -0.2 upper_body_pose: -0.05 - feet_phase: 0.5 + penalty_feet_ori: 0.0 + feet_phase: 1.2 + feet_phase_contrast: 1.5 + feet_phase_contact: 1.0 + feet_double_stance: -1.0 lin_vel_z: -1.0 ang_vel_xy: -0.2 base_height: -120.0 @@ -45,6 +49,7 @@ reward: gait_frequency: 1.5 feet_phase_swing_height: 0.09 feet_phase_tracking_sigma: 0.008 - base_height_target: 0.754 + base_height_target: 0.765 + min_forward_speed_for_gait_reward: 0.05 min_base_height: 0.5 max_tilt_deg: 35.0 diff --git a/src/unilab/assets/robots/g1/g1.xml b/src/unilab/assets/robots/g1/g1.xml index f4fb54b98..69802e15f 100644 --- a/src/unilab/assets/robots/g1/g1.xml +++ b/src/unilab/assets/robots/g1/g1.xml @@ -11,6 +11,9 @@ + + + @@ -106,6 +109,10 @@ diaginertia="0.00167218 0.0016161 0.000217621"/> + + + +