Browse Source

Bump waist roll/pitch Kp to 200, Kd to 10

Higher stiffness better simulates the missing physical waist clamp.
Saturates at ~7° error which is tight enough for rigid behavior.
Kd scaled proportionally for proper damping.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
main
Joe DiPrima 4 weeks ago
parent
commit
ce1237fa41
  1. 8
      gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp

8
gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp

@ -2842,10 +2842,10 @@ class G1Deploy {
// avoid stripping gears against a clamp, but without the clamp the waist // avoid stripping gears against a clamp, but without the clamp the waist
// flops under dynamic loads. Higher gains keep it rigid. // flops under dynamic loads. Higher gains keep it rigid.
// MuJoCo 13 = waist_roll, 14 = waist_pitch. // MuJoCo 13 = waist_roll, 14 = waist_pitch.
motor_command_tmp.kp.at(13) = 100.0f;
motor_command_tmp.kd.at(13) = 5.0f;
motor_command_tmp.kp.at(14) = 100.0f;
motor_command_tmp.kd.at(14) = 5.0f;
motor_command_tmp.kp.at(13) = 200.0f;
motor_command_tmp.kd.at(13) = 10.0f;
motor_command_tmp.kp.at(14) = 200.0f;
motor_command_tmp.kd.at(14) = 10.0f;
// Optional pitch offset (keys 7/8). Default 0°. // Optional pitch offset (keys 7/8). Default 0°.
double waist_offset_rad = g_waist_pitch_offset_deg.load() * M_PI / 180.0; double waist_offset_rad = g_waist_pitch_offset_deg.load() * M_PI / 180.0;
if (waist_offset_rad != 0.0) { if (waist_offset_rad != 0.0) {

Loading…
Cancel
Save