com.kuka.roboticsAPI.conditionModel
Class MotionPathCondition

java.lang.Object
  extended by com.kuka.roboticsAPI.conditionModel.AbstractCondition
      extended by com.kuka.roboticsAPI.conditionModel.MotionCondition
          extended by com.kuka.roboticsAPI.conditionModel.MotionPathCondition
All Implemented Interfaces:
ICondition

public class MotionPathCondition
extends MotionCondition

A Motion Path Condition is true if a given absolute distance has been passed by the motion or is remaining until the motion is completed. Thus, the distance is either seen from the start pose of the motion (START) or negative from the end pose of the motion (DEST). By specifying a delay, the condition can be configured to fire before the specified distance is reached.


Constructor Summary
MotionPathCondition(ReferenceType reference, double distance, long delay)
          Creates a new instance of the motion path condition.
 
Method Summary
static MotionPathCondition createFromDelay(ReferenceType reference, long delay)
          Creates a new instance of the motion path condition which has a distance of zero millimeters.
static MotionPathCondition createFromDistance(ReferenceType reference, double distance)
          Creates a new instance of the motion path condition which has a delay of zero milliseconds.
 long getDelay()
          Gets the delay which causes the motion condition to fire before the specified distance is reached.
 double getDistance()
          Gets the distance that has to be passed by the motion or that has to be remaining until the condition is fired.
 ReferenceType getReference()
          Gets the reference pose that is used for measurement, i.e. the START or the DESTINATION pose of the current motion.
 String toString()
           
 
Methods inherited from class com.kuka.roboticsAPI.conditionModel.MotionCondition
getController, getMotionInstruction, setMotionInstruction
 
Methods inherited from class com.kuka.roboticsAPI.conditionModel.AbstractCondition
and, invert, or, xor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MotionPathCondition

public MotionPathCondition(ReferenceType reference,
                           double distance,
                           long delay)
Creates a new instance of the motion path condition.

For creation of motion path conditions with distances or delays of zero, helper methods createFromDistance(com.kuka.roboticsAPI.conditionModel.ReferenceType, double) and createFromDelay(com.kuka.roboticsAPI.conditionModel.ReferenceType, long) may be used. This condition can only be used when commanding a motion, for example in combination with triggerWhen() and breakWhen(). Usage within a condition observer will lead to an exception.

Parameters:
reference - The reference pose that is used for measurement. Must not be null.
distance - The distance in [mm] from the given reference. Must be zero or positive if START is given, zero or negative if DEST is given as reference.
delay - The delay in [ms]. Must be zero or positive if START is given, zero or negative if DEST is given as reference.
Throws:
IllegalArgumentException - if an invalid argument is given
Method Detail

createFromDistance

public static MotionPathCondition createFromDistance(ReferenceType reference,
                                                     double distance)
Creates a new instance of the motion path condition which has a delay of zero milliseconds.

Parameters:
reference - The reference pose that is used for measurement. Must not be null.
distance - The distance in [mm] from the given reference. Must be zero or positive if START is given, zero or negative if DEST is given as reference.
Returns:
new motion path condition
Throws:
IllegalArgumentException - if an invalid argument is given

createFromDelay

public static MotionPathCondition createFromDelay(ReferenceType reference,
                                                  long delay)
Creates a new instance of the motion path condition which has a distance of zero millimeters.

Parameters:
reference - The reference pose that is used for measurement. Must not be null.
delay - The delay in [ms]. Must be zero or positive if START is given, zero or negative if DEST is given as reference.
Returns:
new motion path condition
Throws:
IllegalArgumentException - if an invalid argument is given

getReference

public ReferenceType getReference()
Gets the reference pose that is used for measurement, i.e. the START or the DESTINATION pose of the current motion.

Returns:
the reference pose

getDistance

public double getDistance()
Gets the distance that has to be passed by the motion or that has to be remaining until the condition is fired.

Returns:
The distance in [mm] of the reference. Zero or positive if reference is START, zero or negative if reference is DEST.

getDelay

public long getDelay()
Gets the delay which causes the motion condition to fire before the specified distance is reached.

Returns:
The delay in [ms] from the reference. Zero or positive if reference is START, zero or negative if reference is DEST.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2019. All rights reserved.