本文整理汇总了C++中ArGripper::liftCarry方法的典型用法代码示例。如果您正苦于以下问题:C++ ArGripper::liftCarry方法的具体用法?C++ ArGripper::liftCarry怎么用?C++ ArGripper::liftCarry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArGripper
的用法示例。
在下文中一共展示了ArGripper::liftCarry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
printf("DropOff: Lowering gripper\n");
mySentGripper.setToNow();
}
}
if (myWaitingOnLower)
{
/// TODO
if (mySentGripper.mSecSince() < 600 ||
(!myGripper->isLiftMaxed() && mySentGripper.mSecSince() < 20000))
{
myGripper->liftDown();
myDesired.setVel(0);
myDesired.setDeltaHeading(0);
myLastMoved.setToNow();
myLastPose = myRobot->getPose();
return &myDesired;
}
else
{
printf("DropOff: Lowered!\n");
myWaitingOnLower = false;
myWaitingOnRaised = true;
myStartRaised = true;
}
myLastMoved.setToNow();
myLastPose = myRobot->getPose();
}
if (myWaitingOnRaised)
{
if (myStartRaised)
{
printf("DropOff: Raising gripper a little bit\n");
myGripper->liftCarry(15);
mySentGripper.setToNow();
myStartRaised = false;
}
if (mySentGripper.mSecSince() > 1000)
{
printf("DropOff: Raised the gripper a little bit\n");
myWaitingOnRaised = false;
myLowered = true;
}
myDesired.setVel(0);
myDesired.setDeltaHeading(0);
myLastMoved.setToNow();
myLastPose = myRobot->getPose();
return &myDesired;
}
if (myLowered)
{
if (!myTried)
{
printf("DropOff: Trying to let go of the block.\n");
myTriedStart.setToNow();
myTried = true;
}
myGripper->gripOpen();
if (myGripper->getGripState() == 1 || myTriedStart.mSecSince() > 3000)
{
printf("DropOff: Succeeded, dropped off the block.\n");
myGripper->liftUp();
myState = STATE_SUCCEEDED;
}
myDesired.setVel(0);