refactor(controller): 移除未使用的运动控制方法
清理Controller类中不再使用的BodyHeight、SwitchGait、ContinuousGait和Dance2方法,以简化代码结构
This commit is contained in:
@@ -375,18 +375,6 @@ bool Controller::SwitchAvoidMode() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Controller::BodyHeight(float height) {
|
|
||||||
return ExecuteSportCmd([height](auto* sc) {
|
|
||||||
return sc->BodyHeight(height);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::SwitchGait(int gait) {
|
|
||||||
return ExecuteSportCmd([gait](auto* sc) {
|
|
||||||
return sc->SwitchGait(gait);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
@@ -397,11 +385,6 @@ bool Controller::TrajectoryFollow(const std::vector<std::array<float, 6>>& path)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Controller::ContinuousGait(bool flag) {
|
|
||||||
return ExecuteSportCmd([flag](auto* sc) {
|
|
||||||
return sc->ContinuousGait(flag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Controller::MoveToPos(float x, float y, float yaw) {
|
bool Controller::MoveToPos(float x, float y, float yaw) {
|
||||||
return ExecuteSportCmd([x, y, yaw](auto* sc) {
|
return ExecuteSportCmd([x, y, yaw](auto* sc) {
|
||||||
@@ -424,12 +407,6 @@ bool Controller::FootRaiseHeight(float height) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Controller::Dance2() {
|
|
||||||
return ExecuteSportCmd([](auto* sc) {
|
|
||||||
return sc->Dance2();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user