From b6b1dc410bc6b57192fc018f7fb773cab7a5ea09 Mon Sep 17 00:00:00 2001 From: Sucan126 <632190820@qq.com> Date: Sun, 21 Sep 2025 15:21:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor(custom=5Frobot):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E8=BF=90=E5=8A=A8=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除BodyHeight、SwitchGait、ContinuousGait、MoveToPos和FastWalk等不再使用的运动控制命令处理逻辑,简化代码结构 --- src/custom_robot.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/custom_robot.cpp b/src/custom_robot.cpp index 9730e90..64f4aad 100644 --- a/src/custom_robot.cpp +++ b/src/custom_robot.cpp @@ -606,19 +606,8 @@ bool CustomRobot::processSportCmd(const std::string& cmd, const nlohmann::json& return controller_->EconomicGait(); } else if (cmd == "SwitchAvoidMode") { return controller_->SwitchAvoidMode(); - } - else if (cmd == "BodyHeight") { - return controller_->BodyHeight(message["param"]["height"]); - } else if (cmd == "SwitchGait") { - return controller_->SwitchGait(message["param"]["gait"]); } else if (cmd == "TrajectoryFollow") { return controller_->TrajectoryFollow(message["param"]["path"]); - } else if (cmd == "ContinuousGait") { - return controller_->ContinuousGait(message["param"]["flag"]); - } else if (cmd == "MoveToPos") { - return controller_->MoveToPos(message["param"]["x"], message["param"]["y"], message["param"]["yaw"]); - } else if (cmd == "FastWalk") { - return controller_->FastWalk(message["param"]["flag"]); } else if (cmd == "FootRaiseHeight") { return controller_->FootRaiseHeight(message["param"]["height"]); }