Browse Source

1.优化mpc unknown时,下发反馈速度

gf 1 year ago
parent
commit
46c5b4fb75
2 changed files with 2 additions and 2 deletions
  1. 1 1
      MPC/navigation.cpp
  2. 1 1
      MPC/navigation.h

+ 1 - 1
MPC/navigation.cpp

@@ -1285,7 +1285,7 @@ bool Navigation::Rotation_mpc_once(Pose2d current_to_target, Navigation::stLimit
     return ret == success || ret == no_solution;
 }
 
-bool Navigation::mpc_once(Trajectory traj, stLimit limit_v, std::vector<double> &out, int mpc_result, bool directY) {
+bool Navigation::mpc_once(Trajectory traj, stLimit limit_v, std::vector<double> &out, int& mpc_result, bool directY) {
     if (PoseTimeout() == true) {
         printf(" MPC once Error:Pose is timeout \n");
         return false;

+ 1 - 1
MPC/navigation.h

@@ -220,7 +220,7 @@ protected:
 
     virtual int GetSpaceId(NavMessage::PathNode spaceNode);
 
-    bool mpc_once(Trajectory traj, stLimit limit_v, std::vector<double> &out, int mpc_result, bool directY = false);
+    bool mpc_once(Trajectory traj, stLimit limit_v, std::vector<double> &out, int& mpc_result, bool directY = false);
 
     /* 原地旋转mpc
      *