Hi,
I would like to use the breakWhen(stopCondition) command in conjunction with a MotionBatch.
When the break condition fires, I would like to poll the current position of the robot and resume the MotionBatch from that position.
Lets assume I execute a MotionBatch with a breakWhen command like in this example:
Code
MotionBatch batchMotion = new MotionBatch(
Motion1,
Motion2,
…
Motion3,
Motion4
).breakWhen(stopCondition);
IMotionContainer batchMove = robot.move(batchMotion);
Now I would poll the terminated motion like in this example (provided the stop condition was fired):
Code
IFiredConditionInfo firedInfo = batchMove.getFiredBreakConditionInfo();
IMotion stoppedMotion = firedInfo.getStoppedMotion();
If I execute the MotionBatch again, the robot would start the movement again from the very beginning.
How can I make sure that the robot continues its movement at the point where the break condition was fired (e.g. start the MotionBatch from Motion2)?
Thank you
robotneuling