refactor(controller): Remove unused motion control methods
- Eliminated several unused motion control methods from the controller interface and implementation, including Content, LeftFlip, BackFlip, HandStand, FreeWalk, FreeBound, FreeJump, FreeAvoid, ClassicWalk, WalkUpright, CrossStep, AutoRecoverSet, StaticWalk, TrotRun, and EconomicGait. This cleanup simplifies the code structure and improves maintainability.
This commit is contained in:
@@ -43,7 +43,6 @@ public:
|
|||||||
bool Hello();
|
bool Hello();
|
||||||
bool Stretch();
|
bool Stretch();
|
||||||
bool SwitchJoystick(bool flag);
|
bool SwitchJoystick(bool flag);
|
||||||
bool Content();
|
|
||||||
bool Heart();
|
bool Heart();
|
||||||
bool Pose(bool flag);
|
bool Pose(bool flag);
|
||||||
bool Scrape();
|
bool Scrape();
|
||||||
@@ -52,21 +51,6 @@ public:
|
|||||||
bool FrontPounce();
|
bool FrontPounce();
|
||||||
bool Dance1();
|
bool Dance1();
|
||||||
bool Dance2();
|
bool Dance2();
|
||||||
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 TrajectoryFollow(const std::vector<std::array<float, 6>>& path);
|
bool TrajectoryFollow(const std::vector<std::array<float, 6>>& path);
|
||||||
bool FootRaiseHeight(float height);
|
bool FootRaiseHeight(float height);
|
||||||
|
|
||||||
|
|||||||
@@ -231,12 +231,6 @@ bool Controller::SwitchJoystick(bool flag) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Controller::Content() {
|
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
|
||||||
return sc->Content();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::Heart() {
|
bool Controller::Heart() {
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
return ExecuteSportCmd([](auto* sc) {
|
||||||
return sc->Heart();
|
return sc->Heart();
|
||||||
@@ -285,96 +279,6 @@ bool Controller::Dance2() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Controller::LeftFlip() {
|
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
|
||||||
return sc->LeftFlip();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::BackFlip() {
|
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
|
||||||
return sc->BackFlip();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::HandStand(bool flag) {
|
|
||||||
return ExecuteSportCmd([flag](auto* sc) {
|
|
||||||
return sc->HandStand(flag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::FreeWalk() {
|
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
|
||||||
return sc->FreeWalk();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::FreeBound(bool flag) {
|
|
||||||
return ExecuteSportCmd([flag](auto* sc) {
|
|
||||||
return sc->FreeBound(flag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::FreeJump(bool flag) {
|
|
||||||
return ExecuteSportCmd([flag](auto* sc) {
|
|
||||||
return sc->FreeJump(flag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::FreeAvoid(bool flag) {
|
|
||||||
return ExecuteSportCmd([flag](auto* sc) {
|
|
||||||
return sc->FreeAvoid(flag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::ClassicWalk(bool flag) {
|
|
||||||
return ExecuteSportCmd([flag](auto* sc) {
|
|
||||||
return sc->ClassicWalk(flag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::WalkUpright(bool flag) {
|
|
||||||
return ExecuteSportCmd([flag](auto* sc) {
|
|
||||||
return sc->WalkUpright(flag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::CrossStep(bool flag) {
|
|
||||||
return ExecuteSportCmd([flag](auto* sc) {
|
|
||||||
return sc->CrossStep(flag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::AutoRecoverSet(bool flag) {
|
|
||||||
return ExecuteSportCmd([flag](auto* sc) {
|
|
||||||
return sc->AutoRecoverSet(flag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::StaticWalk() {
|
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
|
||||||
return sc->StaticWalk();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::TrotRun() {
|
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
|
||||||
return sc->TrotRun();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::EconomicGait() {
|
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
|
||||||
return sc->EconomicGait();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::SwitchAvoidMode() {
|
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
|
||||||
return sc->SwitchAvoidMode();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::TrajectoryFollow(const std::vector<std::array<float, 6>>& path) {
|
bool Controller::TrajectoryFollow(const std::vector<std::array<float, 6>>& path) {
|
||||||
// This function requires special handling as it needs to convert the path format
|
// This function requires special handling as it needs to convert the path format
|
||||||
// For now, we'll provide a basic implementation
|
// For now, we'll provide a basic implementation
|
||||||
|
|||||||
Reference in New Issue
Block a user