refactor(controller): Update TrajectoryFollow method signature to accept non-const reference

- Modified the TrajectoryFollow method in both the header and implementation files to accept a non-const reference to a vector of unitree::robot::go2::PathPoint, allowing for in-place modifications of the path.
This commit is contained in:
2025-09-23 19:19:18 +08:00
parent d66fbae01f
commit 44becb76e6
2 changed files with 2 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ public:
bool ClassicWalk(bool flag);
bool WalkUpright(bool flag);
bool CrossStep(bool flag);
bool TrajectoryFollow(const std::vector<unitree::robot::go2::PathPoint>& path);
bool TrajectoryFollow(std::vector<unitree::robot::go2::PathPoint>& path);
// Obstacle
bool SwitchSet(bool enable);

View File

@@ -339,7 +339,7 @@ bool Controller::CrossStep(bool flag) {
});
}
bool Controller::TrajectoryFollow(const std::vector<unitree::robot::go2::PathPoint>& path) {
bool Controller::TrajectoryFollow(std::vector<unitree::robot::go2::PathPoint>& path) {
return ExecuteSportCmd([&path](auto* sc) {
return sc->TrajectoryFollow(path);
});