hello
I try to observe with Collision Observer the motion of my LBR, that moves from Point-A to B. If any collision happends on the way, firstly LBR stops and then gets back its flange 10cm back according to the Flange-CoordinateSystem. And then it moves to Point-B again.
do you think, my App performs that scenario ?
edit: I am not sure to get the position of the flange and move back from that position back with
" lbr.getFlange().move(linRel(0, 0, -100).setJointVelocityRel(0.3)); "
or with
"lbr.getCurrentCartesianPosition().move(linRel(0, 0, -100).setJointVelocityRel(0.3));"
My Program is so:
public void run()
{
// Collision condition
ICondition collisionCondition = ForceCondition.createSpatialForceCondition(lbr.getFlange(), spatialForceLimit);
// Collision observer
ConditionObserver collisionObserver = getObserverManager().createAndEnableConditionObserver(collisionCondition, NotificationType.OnEnable,
new IAnyEdgeListener()) {
@Override
public void onAnyEdge(ConditionObserver conditionObserver, Date time, int missedEvents, boolean conditionValue)
{
if (conditionValue)
{
getApplicationControl().setApplicationOverride(0.0d); // Here a collision is detected and LBR stops
lbr.getCurrentCartesianPosition().move(linRel(0, 0, -100).setJointVelocityRel(0.3)); // collision detection LBR moves back at Z-
// Direction(10cm)
}
else
{
// No collision so LBR can move again , so motion activated
getApplicationControl().setApplicationOverride(1.0d);
}
}
});
lbr.move(lin(getApplicationData().getFrame("/A")).setCartVelocity(150));
lbr.move(lin(getApplicationData().getFrame("/B")).setCartVelocity(150));
}
Thanks