From 3c6021b7e9a5fb78a02bd732be28b114b97ee80c Mon Sep 17 00:00:00 2001 From: youjian <1124895509@qq.com> Date: Thu, 25 Jul 2024 20:34:25 +0800 Subject: [PATCH] Stop gyro when robot revives. --- include/rm_manual/chassis_gimbal_shooter_manual.h | 1 + src/chassis_gimbal_shooter_manual.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/rm_manual/chassis_gimbal_shooter_manual.h b/include/rm_manual/chassis_gimbal_shooter_manual.h index 1d3e2f35..552b42ea 100644 --- a/include/rm_manual/chassis_gimbal_shooter_manual.h +++ b/include/rm_manual/chassis_gimbal_shooter_manual.h @@ -36,6 +36,7 @@ class ChassisGimbalShooterManual : public ChassisGimbalManual void remoteControlTurnOff() override; void remoteControlTurnOn() override; void robotDie() override; + void robotRevive() override; void rightSwitchDownRise() override; void rightSwitchMidRise() override; void rightSwitchUpRise() override; diff --git a/src/chassis_gimbal_shooter_manual.cpp b/src/chassis_gimbal_shooter_manual.cpp index f9d61a46..6a8c853e 100644 --- a/src/chassis_gimbal_shooter_manual.cpp +++ b/src/chassis_gimbal_shooter_manual.cpp @@ -628,4 +628,10 @@ void ChassisGimbalShooterManual::ctrlQPress() gimbal_calibration_->reset(); } +void ChassisGimbalShooterManual::robotRevive() +{ + setChassisMode(rm_msgs::ChassisCmd::FOLLOW); + ManualBase::robotRevive(); +} + } // namespace rm_manual