com.kuka.roboticsAPI
Class RoboticsAPIUtilities

java.lang.Object
  extended by com.kuka.roboticsAPI.RoboticsAPIUtilities

public final class RoboticsAPIUtilities
extends Object

Utility class with some helper methods.

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.

Method Summary
static String determineToolName(Robot robot)
          Determines a tool name for the robot.
static JointPosition getCorrespondingJoints(Device device, AbstractFrame frame)
          Gets the corresponding joint position from a frame (if present).
static JointPosition getJointsForDestination(ObjectFrame defaultMotionFrame, AbstractFrame destination)
          Calculates a joint position for a given destination and a given motion center.
static Robot getRobotIfFrameIsAttachedToFlange(AbstractFrame frame)
           
static
<T extends Device>
T
searchDevice(Class<T> deviceClass, AbstractFrame frame)
          Finds an attached device that can be located from the given frame.
static Robot searchRobot(AbstractFrame frame)
          Finds an attached robot of the given frame.
static
<T extends Device>
T
trySearchDevice(Class<T> deviceClass, AbstractFrame frame)
          Finds an attached device that can be located from the given frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

trySearchDevice

public static <T extends Device> T trySearchDevice(Class<T> deviceClass,
                                                   AbstractFrame frame)
Finds an attached device that can be located from the given frame. The search goes upwards in the frame tree and will stop when a device is found.

Returns null if no device was found.

Type Parameters:
T - The device type.
Parameters:
deviceClass - The type of device for which the method should check.
frame - The frame from which the method starts to search a device.
Returns:
The found device or null if no device was found.
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.

searchDevice

public static <T extends Device> T searchDevice(Class<T> deviceClass,
                                                AbstractFrame frame)
Finds an attached device that can be located from the given frame. The search goes upwards in the frame tree and will stop when a device is found.

If no device is found during the walk, this method will fail.

Type Parameters:
T - The device type.
Parameters:
deviceClass - The type of device for which the method should check.
frame - The frame from which the method starts to search a device.
Returns:
The found device or null if no device was found.
Throws:
IllegalStateException - if no attached device was found.
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.

searchRobot

public static Robot searchRobot(AbstractFrame frame)
Finds an attached robot of the given frame. The search goes upwards in the frame tree and will stop at the root frame.

If no robot is found during the walk, this method will fail.

Parameters:
frame - The frame from which the method starts to search a robot
Returns:
The found robot.
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.

determineToolName

public static String determineToolName(Robot robot)
Determines a tool name for the robot. This is the first attached object at the robot's flange.

Parameters:
robot - The robot.
Returns:
The tool name.
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.

getJointsForDestination

public static JointPosition getJointsForDestination(ObjectFrame defaultMotionFrame,
                                                    AbstractFrame destination)
Calculates a joint position for a given destination and a given motion center. The destination must be connected with the world and the motion center must be connected with a robot.

Parameters:
defaultMotionFrame - The defaultMotionFrame.
destination - The destination.
Returns:
The joint values for the destination with respect to the motion center.
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.

getCorrespondingJoints

public static JointPosition getCorrespondingJoints(Device device,
                                                   AbstractFrame frame)
Gets the corresponding joint position from a frame (if present).

Parameters:
device - The device for which we want the joints.
frame - The frame for which we want the corresponding joints.
Returns:
The corresponding joints or null if not present.
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.

getRobotIfFrameIsAttachedToFlange

public static Robot getRobotIfFrameIsAttachedToFlange(AbstractFrame frame)
Parameters:
frame - Frame to check if it is a child frame of a robot flange
Returns:
If the Frame is a child frame of a robot flange, then the function returns with the corresponding Robot, otherwise it returns null.


Copyright © 2019. All rights reserved.