|
@@ -662,8 +662,6 @@ bool Navigation::execute_nodes(NavMessage::NewAction action) {
|
|
|
int clampLifterAction = 0;
|
|
|
if (move_mode_ == eSingle) {
|
|
|
clampLifterAction |= eByteClampHalfOpen;
|
|
|
- } else {
|
|
|
- clampLifterAction |= eByteLifterDown;
|
|
|
}
|
|
|
////////////////////////////////////////////////////////////
|
|
|
for (int i = 0; i < action.pathnodes_size(); ++i) {
|
|
@@ -712,6 +710,18 @@ bool Navigation::execute_nodes(NavMessage::NewAction action) {
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
+ //提升机构提前动作
|
|
|
+ if (GetRemainActionsCount() > 1){
|
|
|
+ NavMessage::NewAction last_action = GetLastAction();
|
|
|
+ if (IsUperSpace(last_action.spacenode())){
|
|
|
+ if ((i+1) == action.pathnodes_size()){
|
|
|
+ clampLifterAction |= eByteLifterUp;
|
|
|
+ }
|
|
|
+ } else{
|
|
|
+ clampLifterAction |= eByteLifterDown;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (MoveToTarget(node, mpc_velocity, wmg_limit, anyDirect, true, clampLifterAction) == false)
|
|
|
return false;
|
|
|
else
|
|
@@ -2449,6 +2459,7 @@ int Navigation::GetPortIDBySpace(NavMessage::PathNode node) {
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
int Navigation::GetRemainActionsCount() {
|
|
|
return newUnfinished_cations_.size();
|
|
|
}
|
|
@@ -2457,5 +2468,8 @@ NavMessage::NewAction Navigation::GetCurrentAction() {
|
|
|
return newUnfinished_cations_.front();
|
|
|
}
|
|
|
|
|
|
+NavMessage::NewAction Navigation::GetLastAction() {
|
|
|
+ return newUnfinished_cations_.back();
|
|
|
+}
|
|
|
|
|
|
|