Browse Source

Revert waist Kp override — NN actively controls waist

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 <noreply@anthropic.com>
main
Joe DiPrima 4 weeks ago
parent
commit
56c9bcb9a2
  1. 6
      gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp

6
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<float>(waist_offset_rad);

Loading…
Cancel
Save