com.kuka.roboticsAPI.geometricModel
Class ToolUtilities

java.lang.Object
  extended by com.kuka.roboticsAPI.geometricModel.ToolUtilities

public final class ToolUtilities
extends Object

Helper class which implements some additional methods that are needed on Tools and PhysicalObjects.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Field Summary
static String ATTACHED_TOOL_OBJECT_NAME
          The name of the application tool.
 
Method Summary
static void addChildFramesRec(PhysicalObject obj, ObjectFrame parent, List<ObjectFrame> children)
          Adds all child frames to the specified physical object.
static boolean compare(Tool tool1, Tool tool2)
          Compares two tools with each other.
static Tool createApplicationTool(IControllerCommand controllerCommand)
          Creates the application tool for the specified controller command.
static Tool createDefaultApplicationTool()
          Creates a default application tool (without child frames and load).
static String getAttachedToolObjectMotionTcp(Tool tool)
          Calculates a string that represents tool's default motion frame (smartHMI protocol compatibility).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTACHED_TOOL_OBJECT_NAME

public static final String ATTACHED_TOOL_OBJECT_NAME
The name of the application tool.

See Also:
Constant Field Values
Method Detail

compare

public static boolean compare(Tool tool1,
                              Tool tool2)
Compares two tools with each other. This method only compares the following properties:
- name
- load data
- all frames

Parameters:
tool1 - name of the first tool to compare
tool2 - name of the second tool to compare
Returns:
true, if no difference between the compared properties can be found, false otherwise.

addChildFramesRec

public static void addChildFramesRec(PhysicalObject obj,
                                     ObjectFrame parent,
                                     List<ObjectFrame> children)
Adds all child frames to the specified physical object. The add process is recursive, which means that child frames are added too.

Parameters:
obj - the physical object where the frames should be added to.
parent - the parent frame for the child frames.
children - the children to add.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

createDefaultApplicationTool

public static Tool createDefaultApplicationTool()
Creates a default application tool (without child frames and load).

Returns:
a default application tool
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

createApplicationTool

public static Tool createApplicationTool(IControllerCommand controllerCommand)
Creates the application tool for the specified controller command. The default motion frame will be set to a frame beneath the newly created tool that corresponds to the motion frame of the given MotionInstruction, if applicable.

Parameters:
controllerCommand - the controller command (can be null).
Returns:
the application tool for the specified controller command.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getAttachedToolObjectMotionTcp

public static String getAttachedToolObjectMotionTcp(Tool tool)
Calculates a string that represents tool's default motion frame (smartHMI protocol compatibility).

Parameters:
tool - the application tool
Returns:
the TCP path starting with the tool's name, or "ApplicationTool" if the motion frame is the tool's root. Empty string if the motion frame could not be determined.


Copyright © 2019. All rights reserved.