Thank you for fast reply Kiiwa, I have post my code. And it seems need to provide an external force that can trigger the force condition. But the pin can`t give a force. So once the arm end touches some part of the pin. The force condition can`t be triggered and the arm runs until stick pin and doesn`t move. But even it stick, no error shows.
Posts by Alanmin
-
-
private void moveSeparation(){
getLogger().info("moveSeparation");
ForceComponentCondition conditionnegativeZ=new ForceComponentCondition(iiwa14_1.getFlange(),CoordinateAxis.Z,-10,3000);
ForceComponentCondition conditionpositiveZ=new ForceComponentCondition(iiwa14_1.getFlange(),CoordinateAxis.Z,-3000,10);
ForceComponentCondition conditionnegativeX=new ForceComponentCondition(iiwa14_1.getFlange(),CoordinateAxis.X,-10,3000);
ForceComponentCondition conditionpositiveX=new ForceComponentCondition(iiwa14_1.getFlange(),CoordinateAxis.X,-3000,10);
ForceComponentCondition conditionnegativeY=new ForceComponentCondition(iiwa14_1.getFlange(),CoordinateAxis.Y,-10,3000);
ForceComponentCondition conditionpositiveY=new ForceComponentCondition(iiwa14_1.getFlange(),CoordinateAxis.Y,-3000,10);
moveStart();
int A=0,B=0;
for (int C=150;C<600;C=C+25){
MotionBatch Separation= new MotionBatch(lin(getFrame("/start")).setCartVelocity(100),linRel(A,0,0).setCartVelocity(100),
linRel(0,B,0).setCartVelocity(100),
linRel(0, 0, C).setCartVelocity(100)).breakWhen(conditionnegativeZ).
breakWhen(conditionpositiveZ).breakWhen(conditionnegativeX).
breakWhen(conditionpositiveX).breakWhen(conditionnegativeY).
breakWhen(conditionpositiveY);
IMotionContainer motion;
motion = nase.move(Separation);
if (motion.hasFired(conditionnegativeZ)) {
//Reaction to force Condition
if(C>300){
//move to the finished position while it clips the shaft.
movePart();
break;
}
else {
B=B-25;
C=150;
//detect the collision and change the position along y axis}
}
}
if (motion.hasFired(conditionpositiveZ)) {
//Reaction to force Condition
if(C>300){
//move to the finished position while it clips the shaft.
movePart();
break;
}
else {
B=B+25;
C=150;
}
}
if (motion.hasFired(conditionnegativeX)){
if(C>300){
//move to the finished position while it clips the shaft.
movePart();
break;
}
else {
A=A-25;
C=150;
}
}
if (motion.hasFired(conditionpositiveX)){
if(C>300){
//move to the finished position while it clips the shaft.
movePart();
break;
}
else {
A=A+25;
C=150;
}
}
if (motion.hasFired(conditionnegativeY)){
if(C>300){
//move to the finished position while it clips the shaft.
movePart();
break;
}
else {
B=B-25;
C=150;
}
}
if (motion.hasFired(conditionpositiveY)){
if(C>300){
//move to the finished position while it clips the shaft.
movePart();
break;
}
else {
B=B+25;
C=150;
}
}
}
} -
I just use the force condition code provide by the manual. But it seems to provide an external force that can meet the force condition. We want the peg to search a pin. Let the peg move in Axis -Z in a loop but the displacement is bigger and bigger. Once it touches the pin, the arm should be reverse the moving direction. But when we use the code you provide, the arm just stuck the pin strictly and doesn`t move or react, even doesn`t show any error. But when we use our hands to provides an external force, it works correctly. I think we need to use another code. Could someone please help us? Thanks first!
-
-
-
My school has a KUKA LBR IIWA R820. We want to use Sunrise workbench to write some simple program. But there is a trouble that really confused us. We want to use the force condition command to write a conditional loop. But the normal force condition of X, Y, Z has to be >=0. But we want to make the arm reacts when the normal force of X is negative or in the direction of -X. So what should I do? Can someone help me? Thanks first!
This is the code:
ForceCondition normalForce_x = ForceCondition.
createNormalForceCondition(
nase.getFrame("/TCP"),
CoordinateAxis.X,
40.0,
8.0); -
-
-
I am an Undergraduate studenIt and my final year report is based on the KUKA iiwa robot. There is a 400-page around manual. But is so basic. I have looked lots of topic in this Forum. I wonder that where you guys get such complex program? I feel so hard to learn to use the sunrise workbench. Could someone tell me how to learn to use sunrise workbench professionally. I just can use some basic command to write the program because of the basic manual I only have. Thanks a lot!