|
@@ -416,7 +416,7 @@ Navigation::MpcResult Navigation::RotateReferToTarget(NavMessage::PathNode node,
|
|
|
printf(" exec MPC_rotate autoDirect:%d\n", directions);
|
|
|
|
|
|
while (cancel_ == false) {
|
|
|
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
|
|
+ std::this_thread::sleep_for(std::chrono::milliseconds(30));
|
|
|
if (pause_ == true) {
|
|
|
//发送暂停消息
|
|
|
continue;
|
|
@@ -836,7 +836,7 @@ bool Navigation::mpc_once(Trajectory traj, stLimit limit_v, std::vector<double>
|
|
|
relative = Pose2d::relativePose(brother.rotate(brother.x(), brother.y(), M_PI / 2),
|
|
|
pose.rotate(pose.x(), pose.y(), M_PI / 2));//计算另一节在当前小车坐标系下的坐标
|
|
|
//std::cout<<"pose:"<<pose<<", brother:"<<brother<<", relative:"<<relative<<std::endl;
|
|
|
- if (move_mode_ == ActionMode::eDouble)
|
|
|
+ if (move_mode_ == eDouble)
|
|
|
relative = Pose2d(-1e8, -1e8, 0);
|
|
|
|
|
|
MpcError ret = failed;
|
|
@@ -1090,12 +1090,12 @@ bool Navigation::PossibleToTarget(NavMessage::PathNode targetNode, bool directY)
|
|
|
minR,ax,ay);*/
|
|
|
return true;
|
|
|
} else if (nagY && posiY) {
|
|
|
- std::cout << "nagY && posiY" << std::endl;
|
|
|
+// std::cout << "nagY && posiY" << std::endl;
|
|
|
return true;
|
|
|
}
|
|
|
- printf("directY:%d targetInPose:%f %f l:%f,w:%f theta:%f minR:%f ax:%f,ay:%f\n", directY,
|
|
|
- relative.x(), relative.y(), targetNode.l(), targetNode.w(), targetNode.theta(),
|
|
|
- minR, ax, ay);
|
|
|
+// printf("directY:%d targetInPose:%f %f l:%f,w:%f theta:%f minR:%f ax:%f,ay:%f\n", directY,
|
|
|
+// relative.x(), relative.y(), targetNode.l(), targetNode.w(), targetNode.theta(),
|
|
|
+// minR, ax, ay);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1165,7 +1165,7 @@ void Navigation::Start(const NavMessage::NavCmd &cmd, NavMessage::NavResponse &r
|
|
|
break;
|
|
|
}
|
|
|
} else if (act.type() == 8) { //切换模式
|
|
|
- SwitchMode(ActionMode(act.changedmode()), act.wheelbase());
|
|
|
+ SwitchMode(act.changedmode(), act.wheelbase());
|
|
|
} else {
|
|
|
printf(" action type invalid not handled !!\n");
|
|
|
break;
|