Hello everyone,
I have another question.
I'm trying to use the "positionhold" command to move the iiwa, and use the user button of the media flange when I want to leave this mod.
So I chose to run the operation for 50 ms and then scan to see if the button was pressed, then start again if the button is not pressed.
PHD.getFrame("Place").move(positionHold(hold1, 50,TimeUnit.MILLISECONDS));
The problem is that whenever the robot executes this instruction, it deviates slightly, and this deviation multiplied by the frequency creates a significant deviation and the robot is no longer able to remain motionless.
So I'm trying to remove the timeout:
PHD.getFrame("Place").move(positionHold(hold1, -1,TimeUnit.MILLISECONDS));
But now I can no longer check if the button is pressed because the program executes this line without stopping condition.
I would like to know if there is a possibility to run this line continuously, but with a stop condition if the button is pressed, with a java statement in general, or a robot-specific instruction.
I tried to use the "breakwhen(mediaflunge.getUserButton())" parameter but I can't simply use a Boolean as argument...
Can someone help me?
Thank you