com.kuka.roboticsAPI.conditionModel
Class FrameDistanceCondition

java.lang.Object
  extended by com.kuka.roboticsAPI.conditionModel.AbstractCondition
      extended by com.kuka.roboticsAPI.conditionModel.FrameDistanceCondition
All Implemented Interfaces:
ICondition
Direct Known Subclasses:
FrameDistanceComponentCondition

public class FrameDistanceCondition
extends AbstractCondition

A Frame Distance Condition is a Condition which allows the monitoring of the cartesian distance between two given. The distance is compared to a given threshold value. The Condition is true when the cartesian distance is below the threshold.


Constructor Summary
FrameDistanceCondition(AbstractFrame frameA, AbstractFrame frameB, double distanceThreshold)
          Creates a new instance of the Frame Distance Condition.
 
Method Summary
 Controller getController()
          Return the controller referred to by this condition.
 double getDistanceTreshold()
          Gets the distance threshold value.
 AbstractFrame getFixedFrame()
          Gets the frame for the fixed point.
 AbstractFrame getFrameA()
          Gets frameA which is used in the condition to measure the distance to.
 AbstractFrame getFrameB()
          Gets frameB which is used in the condition to measure the distance to.
 AbstractFrame getMovingFrame()
          Gets the frame for the moving point.
 Robot getRobotAttachedToMovingFrame()
          Gets the robot attached to the Moving frame.
 String toString()
           
 
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

FrameDistanceCondition

public FrameDistanceCondition(AbstractFrame frameA,
                              AbstractFrame frameB,
                              double distanceThreshold)
Creates a new instance of the Frame Distance Condition. One of the frameA and frameB has to be attached to the robot flange at the time using the condition for a move command or when activating it in the ConditionObserver. During class initialization, it is accepted that neither of the frames are attached to a flange.

Operation: This condition measures the cartesian distance between the two given frames. The Condition is true, when the distance is below the given threshold.

Parameters:
frameA - One of the AbstractFrames between which the distance is evaluated. Must not be null.
frameB - One of the AbstractFrames between which the distance is evaluated. Must not be null.
distanceThreshold - The distance threshold value in [mm]. If the measured distance between frameA and frameB is below this threshold value then the condition is evaluated as true. Must be greater than zero.
Throws:
IllegalArgumentException - If an invalid argument is given
com.kuka.common.exceptions.NotSupportedException - If a dynamic frame other than a flange descendant is given
Method Detail

getFrameA

public AbstractFrame getFrameA()
Gets frameA which is used in the condition to measure the distance to.

Returns:
frameA of the Condition

getFrameB

public AbstractFrame getFrameB()
Gets frameB which is used in the condition to measure the distance to.

Returns:
frameA of the Condition

getMovingFrame

public AbstractFrame getMovingFrame()
Gets the frame for the moving point.

Returns:
The frame which is attached to the robot flange.
Throws:
IllegalStateException - If there is no frame attached to a robot flange or both frames are attached to a robot flange (both are moving frames).

getFixedFrame

public AbstractFrame getFixedFrame()
Gets the frame for the fixed point.

Returns:
The frame which is not attached to the robot flange.
Throws:
IllegalStateException - If there is no frame attached to a robot flange or both frames are attached to a robot flange (both are moving frames).

getRobotAttachedToMovingFrame

public Robot getRobotAttachedToMovingFrame()
Gets the robot attached to the Moving frame.

Returns:
The robot attached to the Moving frame (which is attached to the Flange)
Throws:
IllegalStateException - If there is no frame attached to a robot flange or both frames are attached to a robot flange (both are moving frames).

getDistanceTreshold

public double getDistanceTreshold()
Gets the distance threshold value.

Returns:
The distance threshold value in [mm].

toString

public String toString()
Overrides:
toString in class Object

getController

public Controller getController()
Description copied from class: AbstractCondition
Return the controller referred to by this condition.

Specified by:
getController in class AbstractCondition
Returns:
The controller referred to by this condition. Can be null.


Copyright © 2019. All rights reserved.