refactor(controller): Replace ClassicWalk with StaticWalk method

- Renamed the ClassicWalk method to StaticWalk in the controller interface, removing the flag parameter for a simplified usage.
- Updated the implementation to reflect the new method signature, ensuring consistency across the controller functionality.
This commit is contained in:
2025-09-23 19:22:08 +08:00
parent 44becb76e6
commit 175b37ad49
2 changed files with 6 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ public:
bool FreeBound(bool flag); bool FreeBound(bool flag);
bool FreeJump(bool flag); bool FreeJump(bool flag);
bool FreeAvoid(bool flag); bool FreeAvoid(bool flag);
bool ClassicWalk(bool flag); bool StaticWalk();
bool WalkUpright(bool flag); bool WalkUpright(bool flag);
bool CrossStep(bool flag); bool CrossStep(bool flag);
bool TrajectoryFollow(std::vector<unitree::robot::go2::PathPoint>& path); bool TrajectoryFollow(std::vector<unitree::robot::go2::PathPoint>& path);

View File

@@ -287,13 +287,13 @@ bool Controller::Dance2() {
bool Controller::LeftFlip() { bool Controller::LeftFlip() {
return ExecuteSportCmd([](auto* sc) { return ExecuteSportCmd([](auto* sc) {
// return sc->LeftFlip(); return sc->LeftFlip();
}); });
} }
bool Controller::BackFlip() { bool Controller::BackFlip() {
return ExecuteSportCmd([](auto* sc) { return ExecuteSportCmd([](auto* sc) {
// return sc->BackFlip(); return sc->BackFlip();
}); });
} }
@@ -321,9 +321,9 @@ bool Controller::FreeAvoid(bool flag) {
}); });
} }
bool Controller::ClassicWalk(bool flag) { bool Controller::StaticWalk() {
return ExecuteSportCmd([flag](auto* sc) { return ExecuteSportCmd([](auto* sc) {
return sc->ClassicWalk(flag); return sc->StaticWalk();
}); });
} }