Browse Source

Reduce neutral hold gains to 3x (10x caused motor distress)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
main
Joe DiPrima 4 weeks ago
parent
commit
68f70dcc55
  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,10 +2829,9 @@ 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 10x gains for stiff hold — useful for visual joint calibration.
// Robot must be in test harness (free-hanging) for this mode.
// Uses 3x gains for firm hold — useful for visual joint calibration.
if (g_neutral_hold_mode.load()) { if (g_neutral_hold_mode.load()) {
constexpr float neutral_gain_mult = 10.0f;
constexpr float neutral_gain_mult = 3.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