diff --git a/go2_gym_deploy/unitree_sdk2_bin/lcm_position_go2.cpp b/go2_gym_deploy/unitree_sdk2_bin/lcm_position_go2.cpp index 78e644f..33eaa00 100644 --- a/go2_gym_deploy/unitree_sdk2_bin/lcm_position_go2.cpp +++ b/go2_gym_deploy/unitree_sdk2_bin/lcm_position_go2.cpp @@ -363,21 +363,25 @@ void Custom::LowCmdWrite(){ sleep(0.5); while (true) - { - sleep(0.5); + { // 初始化button值,防止damping被误触发 + key.components.A = 0; + key.components.B = 0; + key.components.L2 = 0; + sleep(0.2); + if ((int)key.components.B==1 && (int)key.components.L2==1) // [L2+B] is pressed again { exit(0); }else if ((int)key.components.A==1 && (int)key.components.L2==1) { - std::cout << "======= activate sport_mode service ========"<