From 56c9bcb9a26dab0972a7999d34beb3249a1f098d Mon Sep 17 00:00:00 2001 From: Joe DiPrima Date: Mon, 23 Feb 2026 18:07:21 -0600 Subject: [PATCH] =?UTF-8?q?Revert=20waist=20Kp=20override=20=E2=80=94=20NN?= =?UTF-8?q?=20actively=20controls=20waist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The waist shows dynamic movement during walking (swagger), meaning the NN IS trained to control it. Overriding Kp amplifies the NN's calibrated actions and causes oscillation. Revert to default gains. Keep optional offset keys for future tuning. Co-Authored-By: Claude Opus 4.6 --- .../src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp b/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp index 48dfab1..32e2d15 100644 --- a/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp +++ b/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp @@ -2842,11 +2842,7 @@ class G1Deploy { // avoid stripping gears against a clamp, but without the clamp the waist // flops under dynamic loads. Higher gains keep it rigid. // MuJoCo 13 = waist_roll, 14 = waist_pitch. - // Only stiffen waist_pitch (14) — the backward tilt axis. - // Leave waist_roll (13) at default to avoid fighting lateral balance. - motor_command_tmp.kp.at(14) = 125.0f; - motor_command_tmp.kd.at(14) = 7.0f; - // Optional pitch offset (keys 7/8). Default 0°. + // Optional waist pitch offset (keys 7/8). Default 0°. double waist_offset_rad = g_waist_pitch_offset_deg.load() * M_PI / 180.0; if (waist_offset_rad != 0.0) { motor_command_tmp.q_target.at(14) += static_cast(waist_offset_rad);