com.kuka.roboticsAPI.controllerModel.sunrise
Class SPRUtilities

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.sunrise.SPRUtilities

public final class SPRUtilities
extends Object

Utility class with some helper methods for mapping.

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 Assignment findAssignment(SPR spr, InPort inport)
          Looks for assignment that connects the specified InPort in the given SPR.
static
<T extends ISprComponent>
T
findCompound(SPR spr, Class<T> cl)
          Finds the first instance of the specified compound in the given SPR.
static FreezeModule getFreezer(SunriseMappingToken info)
          Gets the freezer module from the first SPR in the mapping information.
static Transformation getToolOffset(Robot robot, AbstractFrame defaultMotionFrame)
          Gets the transformation between the flange of the specified robot and its defaultMotionFrame point.
static MatrixTransformation getTransformationFromSunriseMatrix(double[] values)
          Gets a matrix transformation based on the given values.
static long sprIdFromString(String messageId)
          Converts a message ID from string to long.
static String sprIdToString(long sprId)
          Converts SPR id to hexadecimal string representation with separator ".".
static String sprIdToString(long sprId, String separator)
          Converts SPR id to hexadecimal string representation.
static String sprIdToString(SPR spr)
          Converts SPR id to hexadecimal string representation.
static void twoInOneAssignment(SPR spr, InPort destinationPort, OutPort translationSourcePort, OutPort rotationSourcePort)
          Assigns translation and orientation parts of a matrix inports from two different outports.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

twoInOneAssignment

public static void twoInOneAssignment(SPR spr,
                                      InPort destinationPort,
                                      OutPort translationSourcePort,
                                      OutPort rotationSourcePort)
Assigns translation and orientation parts of a matrix inports from two different outports.

Parameters:
spr - SPR for which the assignements will be created
destinationPort - destination inport
translationSourcePort - source outport for the translation part of the matrix
rotationSourcePort - source outport for the rotation part of the matrix
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.

findAssignment

public static Assignment findAssignment(SPR spr,
                                        InPort inport)
Looks for assignment that connects the specified InPort in the given SPR.

Parameters:
spr - SPR to look for an assignment.
inport - inport used in the assignment
Returns:
the assignment that connects the specified InPort in the given SPR.
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.

getFreezer

public static FreezeModule getFreezer(SunriseMappingToken info)
Gets the freezer module from the first SPR in the mapping information. If no module is inside the SPR, a new one is added.

Parameters:
info - The mapping information.
Returns:
The freezer module.
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.

getToolOffset

public static Transformation getToolOffset(Robot robot,
                                           AbstractFrame defaultMotionFrame)
Gets the transformation between the flange of the specified robot and its defaultMotionFrame point.

Parameters:
robot - robot for which the tool transformation should be calculated.
defaultMotionFrame - The defaultMotionFrame which is moved.
Returns:
The transformation between the flange of the specified robot and its
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.

findCompound

public static <T extends ISprComponent> T findCompound(SPR spr,
                                                       Class<T> cl)
Finds the first instance of the specified compound in the given SPR.

Also checks for the pipe. Observers are not checked.

Type Parameters:
T - Type of the compound.
Parameters:
cl - Class of the compound.
spr - The spr in which the compound is searched.
Returns:
The found compound or null if nothing 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.

sprIdToString

public static String sprIdToString(long sprId,
                                   String separator)
Converts SPR id to hexadecimal string representation.

String looks like "0007.0001.00000002". (ApiID.TypeId.CommandNumber)

Parameters:
sprId - id of the spr to correct
separator - separator string to separate the parts of the id string
Returns:
hexadecimal string representation of the specified SPR id.
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.

sprIdToString

public static String sprIdToString(long sprId)
Converts SPR id to hexadecimal string representation with separator ".".

String looks like "0007.0001.00000002". (ApiID.TypeId.CommandNumber)

Parameters:
sprId - id of the spr to correct
Returns:
hexadecimal string representation of the specified SPR id.
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.

sprIdToString

public static String sprIdToString(SPR spr)
Converts SPR id to hexadecimal string representation. The separator string is ".", otherwise this method is equal to sprIdToString(long sprId, String separator)

String looks like "0007.0001.00000002". (ApiID.TypeId.CommandNumber)

Parameters:
spr - The spr where the spr id should be computed.
Returns:
hexadecimal string representation of the specified SPR id.
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.

sprIdFromString

public static long sprIdFromString(String messageId)
Converts a message ID from string to long.

Parameters:
messageId - Message ID as string.
Returns:
Message ID as long.

getTransformationFromSunriseMatrix

public static MatrixTransformation getTransformationFromSunriseMatrix(double[] values)
Gets a matrix transformation based on the given values.

Parameters:
values - The values in sunrise order. Expected order of the double values: [r1c1, r1c2, r1c3, x, r2c1, r2c2, r2c3, y, r3c1, r3c2, r3c3, z]
Returns:
A matrix transformation based on the given values.
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.


Copyright © 2019. All rights reserved.