feat(controller): 添加运动切换命令处理和多种运动控制功能

添加对运动切换命令(CheckMode/SelectMode/ReleaseMode)的处理支持
在Controller类中新增多种运动控制功能接口
更新README文档以包含新增的运动切换命令和功能说明
This commit is contained in:
2025-09-21 14:40:11 +08:00
parent 02908202f5
commit dbbe63c7b1
5 changed files with 439 additions and 6 deletions

View File

@@ -36,9 +36,44 @@ public:
bool RecoveryStand();
bool StopMove();
bool BalanceStand();
bool Euler(float roll, float pitch, float yaw);
bool Move(float vx, float vy, float vyaw);
bool RiseSit();
bool SpeedLevel(int level);
bool Hello();
bool Stretch();
bool SwitchJoystick(bool flag);
bool Content();
bool Heart();
bool Pose(bool flag);
bool Scrape();
bool FrontFlip();
bool FrontJump();
bool FrontPounce();
bool Dance1();
bool Dance2();
bool Hello();
bool LeftFlip();
bool BackFlip();
bool HandStand(bool flag);
bool FreeWalk();
bool FreeBound(bool flag);
bool FreeJump(bool flag);
bool FreeAvoid(bool flag);
bool ClassicWalk(bool flag);
bool WalkUpright(bool flag);
bool CrossStep(bool flag);
bool AutoRecoverSet(bool flag);
bool StaticWalk();
bool TrotRun();
bool EconomicGait();
bool SwitchAvoidMode();
bool BodyHeight(float height);
bool SwitchGait(int gait);
bool TrajectoryFollow(const std::vector<std::array<float, 6>>& path);
bool ContinuousGait(bool flag);
bool MoveToPos(float x, float y, float yaw);
bool FastWalk(bool flag);
bool FootRaiseHeight(float height);
// Obstacle
bool SwitchSet(bool enable);

View File

@@ -39,6 +39,7 @@ public:
bool processSportCmd(const std::string& cmd, const nlohmann::json& message);
bool processRscCmd(const std::string& cmd, const nlohmann::json& message);
bool processNavCmd(const std::string& cmd, const nlohmann::json& message);
bool processMscCmd(const std::string& cmd, const nlohmann::json& message);
void printServiceList(const std::vector<unitree::robot::go2::ServiceState>& serviceList, int filterStatus = -1);
private: