Browse Source

Bump neutral hold gains to 10x for free-hanging calibration

5x wasn't enough to overcome ankle parallel linkage friction.
Robot is harness-supported so higher gains are safe.

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

5
gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp

@ -2829,9 +2829,10 @@ class G1Deploy {
MotorCommand motor_command_tmp; MotorCommand motor_command_tmp;
// Neutral hold mode: bypass NN, command default angles directly (key 'n') // Neutral hold mode: bypass NN, command default angles directly (key 'n')
// Uses 5x gains for stiff hold — useful for visual joint calibration.
// Uses 10x gains for stiff hold — useful for visual joint calibration.
// Robot must be in test harness (free-hanging) for this mode.
if (g_neutral_hold_mode.load()) { if (g_neutral_hold_mode.load()) {
constexpr float neutral_gain_mult = 5.0f;
constexpr float neutral_gain_mult = 10.0f;
for (int i = 0; i < G1_NUM_MOTOR; i++) { for (int i = 0; i < G1_NUM_MOTOR; i++) {
motor_command_tmp.q_target.at(i) = static_cast<float>(default_angles[i]); motor_command_tmp.q_target.at(i) = static_cast<float>(default_angles[i]);
motor_command_tmp.tau_ff.at(i) = 0.0; motor_command_tmp.tau_ff.at(i) = 0.0;

Loading…
Cancel
Save