|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.geometricModel.AbstractFrame
public abstract class AbstractFrame
Base class for frames.
The Robotics API always assumes the translation part of frames to be given in [mm].
| Field Summary | |
|---|---|
static String |
COMMENT_PARAMETER
Key for the additional frame data "Comment". |
static String |
LAST_MODIFICATION_TIME_PARAMETER
Key for the additional frame data "LastModificationTime". |
static String |
LEGACY_REDUNDANCE_KEY
Legacy redundancy key. |
static String |
MEASUREMENT_INFORMATION_PARAMETER
Key for the additional frame data "MeasurementInformation". |
static String |
NAME_SEPARATOR
Separator for frame path segments. |
static String |
TEACHINFO_PARAMETER
Key for the additional frame data "TeachInformation". |
static String |
USE_AS_BASE
Key for the additional frame data "UseAsBase". |
| Constructor Summary | |
|---|---|
protected |
AbstractFrame(ITransformationProvider provider)
Creates a new AbstractFrame with the given TransformationProvider. |
| Method Summary | ||
|---|---|---|
Frame |
copy()
Creates a snapshot copy of the information in this frame into a new Frame. |
|
Frame |
copy(AbstractFrame newParent)
Creates a snapshot copy of the information in this frame into a new Frame, with the given Frame set as
the parent of the new frame. |
|
Frame |
copyWithRedundancy()
Creates a snapshot copy of the information in this frame (including redundancy information) into a new Frame. |
|
Frame |
copyWithRedundancy(AbstractFrame newParent)
Creates a snapshot copy of the information in this frame (including redundancy information) into a new Frame, with the given Frame set as the parent of the new frame. |
|
double |
distanceTo(AbstractFrame other)
Calculates the euclidean distance of the frame to the specified destination frame. |
|
protected AbstractFrame |
findRoot()
Gets the root of this frame. |
|
Map<String,Object> |
getAdditionalFrameData()
Gets the map containing all additional parameters defined for this frame. |
|
Object |
getAdditionalParameter(String key)
Gets the additional frame parameter for the specified key. |
|
|
getAllParametersOfType(Class<T> paramType)
Gets all parameters of this frame of the specified type. |
|
String |
getName()
Gets the name of this frame. |
|
Point |
getOriginOf(AbstractFrame other)
Gets the position vector of the other frame's origin relative to this frame's coordinate system. |
|
AbstractFrame |
getParent()
Gets the parent frame of this frame. |
|
String |
getPath()
Gets the path from this frame to the worlds root frame. |
|
String |
getPathFrom(AbstractFrame frame)
Gets the path from this frame to the given frame if both frames are part of the scene graph. |
|
Map<String,IRedundancyCollection> |
getRedundancyInformation()
Gets the map containing all redundancy informations for this frame. |
|
IRedundancyCollection |
getRedundancyInformationForDevice(Robot robot)
Gets the redundancy information of a specific Device for this Frame. |
|
Transformation |
getTransformationFromParent()
Gets the transformation from the reference frame (parent) to the frame itself. |
|
ITransformationProvider |
getTransformationProvider()
Gets the transformation provider of this frame. |
|
boolean |
hasAdditionalParameter(String key)
Indicates whether the addition parameter is known or not. |
|
boolean |
hasPathTo(AbstractFrame destination)
Determines if this frame has a path to the destination. |
|
boolean |
hasStaticPathTo(AbstractFrame destination)
Determines if this frame has a static path to the destination. |
|
boolean |
isChildOf(AbstractFrame frame)
Checks whether the given frame is an ancestor of this frame. |
|
boolean |
isCloseTo(AbstractFrame other,
double maxCartDist,
double maxRotDist)
Tests whether this frame lies close to another frame in space. |
|
protected void |
orientateLikeInternal(AbstractFrame other)
Changes the orientation of this frame the frame to match the orientation of the specified frame. |
|
void |
removeAdditionalParameter(String keyValue)
Remove additional information from this frame. |
|
double |
rotationalDistanceTo(AbstractFrame other)
Calculates the rotational distance from this frame to the other frame. |
|
protected void |
setName(String name)
Sets the name of this frame. |
|
protected void |
setParent(AbstractFrame parent)
Sets the reference frame (parent) for this frame. |
|
protected void |
setParentAndTransformation(AbstractFrame parentFrame,
ITransformation offsetFromParent)
Sets parent for the frame and the transformation from this parent. |
|
void |
setRedundancyInformation(Robot robot,
IRedundancyCollection redundancy)
Sets the redundancy information for this frame for a specific transformation provider. |
|
void |
setRedundancyInformation(String providerName,
IRedundancyCollection redundancy)
Sets the redundancy information for this frame for a specific transformation provider. |
|
protected void |
setTransformationFromParent(ITransformation offsetFromParent)
Sets the transformation of the frame. |
|
void |
setTransformationProvider(ITransformationProvider provider)
Sets the transformation provider of this frame. |
|
Transformation |
staticTransformationTo(AbstractFrame destination)
Calculates the static transformation from this frame to the given destination frame. |
|
String |
toString()
|
|
String |
toStringInWorld()
Prints the frame's position in the world coordinate system. |
|
String |
toStringTrafo()
Prints the frame's transformation to its parent. |
|
Transformation |
transformationFromWorld()
Calculates the transformation from the world to the frame. |
|
Transformation |
transformationTo(AbstractFrame destination)
Calculates the transformation from this frame to the given destination frame. |
|
protected void |
transformInternal(AbstractFrame reference,
ITransformation offset)
Transforms this frame relative to the given frame with the specified offset. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String LEGACY_REDUNDANCE_KEY
public static final String NAME_SEPARATOR
public static final String COMMENT_PARAMETER
public static final String TEACHINFO_PARAMETER
public static final String USE_AS_BASE
Note: The this constant was formerly known as USE_AS_BASE_FOR_JOGGING. The name was changed to
clarify that bases are no longer only used for jogging.
TODO: Change value of this constant to UseAsBase. This requires a new version of the data.xml.
public static final String LAST_MODIFICATION_TIME_PARAMETER
public static final String MEASUREMENT_INFORMATION_PARAMETER
| Constructor Detail |
|---|
protected AbstractFrame(ITransformationProvider provider)
provider - the given transformationProvider| Method Detail |
|---|
public Map<String,IRedundancyCollection> getRedundancyInformation()
public Map<String,Object> getAdditionalFrameData()
public Object getAdditionalParameter(String key)
key - parameter key.
null if no parameter for the specified key found.public boolean hasAdditionalParameter(String key)
key - parameter key
public Transformation transformationFromWorld()
public AbstractFrame getParent()
Returns null if this frame is a root of a frame tree.
public Transformation getTransformationFromParent()
IllegalStateException - if the frame does not have a parentpublic ITransformationProvider getTransformationProvider()
protected void setTransformationFromParent(ITransformation offsetFromParent)
Parent of the frame must be at before setting the transformation. Please use setParentAndTransformation(com.kuka.roboticsAPI.geometricModel.AbstractFrame, com.kuka.roboticsAPI.geometricModel.math.ITransformation)
to set both at once.
offsetFromParent - the new transformation from parent to the frame.
IllegalStateException - if the frame does not have a parent.
protected void setParentAndTransformation(AbstractFrame parentFrame,
ITransformation offsetFromParent)
parentFrame - a new parent to set.offsetFromParent - an offset from the new parentpublic void setTransformationProvider(ITransformationProvider provider)
provider - the new transformation provider of this frame.public boolean hasStaticPathTo(AbstractFrame destination)
A static path is a path that does not go over the frames with dynamic transformations between them.
destination - the destination frame.
public boolean hasPathTo(AbstractFrame destination)
destination - the destination frame.
protected void setParent(AbstractFrame parent)
If the frame is already a child of another parent, it will get removed automatically from it's old parent.
parent - The new parent. Can be null to indicate that the frame has not parent and is therefore a
root frame.public String toString()
toString in class Objectpublic String toStringTrafo()
public String toStringInWorld()
transformationFromWorld()protected void setName(String name)
name - The name of this frame.public String getName()
public double distanceTo(AbstractFrame other)
other - the destination frame.
public double rotationalDistanceTo(AbstractFrame other)
Use this function to determine if two frames have a similar orientation.
other - another frame
public boolean isCloseTo(AbstractFrame other,
double maxCartDist,
double maxRotDist)
other - the other frame to testmaxCartDist - maximum distance in [mm] tolerated between the frame origins. May be negative, in which case this
function returns false.maxRotDist - maximum rotational angle in [rad] between the frame orientations. May be negative, in which case this
function returns false.
distanceTo(AbstractFrame),
rotationalDistanceTo(AbstractFrame)public Point getOriginOf(AbstractFrame other)
other frame's origin relative to this frame's coordinate system.
other - Some frame.
other frame's origin relative to this frame's coordinate system in
[mm].public Transformation transformationTo(AbstractFrame destination)
destination - the frame to which the transformation will be calculated.
PathNotFoundException - if path from this frame to destination frame does not exist.public Transformation staticTransformationTo(AbstractFrame destination)
destination - the frame to which the transformation will be calculated.
PathNotFoundException - if static path from this frame to destination frame does not exist.public Frame copy()
Frame. The parent of the new frame
will be the same as the parent of this frame (note: the parent can be null). The new frame's transformation to
the parent will be a snapshot of the current transformation of this frame.
public Frame copy(AbstractFrame newParent)
Frame, with the given Frame set as
the parent of the new frame. The new frame's transformation to its new parent will be a snapshot of the current
transformation of this frame to the new parent.
Copies the information of this Frame into a new Frame, with the given Frame set as the parent of the new
frame.
newParent - the parent for the newly created copy of this frame
PathNotFoundException - if path from this frame to the new parent frame does not exist.public Frame copyWithRedundancy()
Frame. The parent of the new frame will be the same as the parent of this frame (note: the parent can be
null). The new frame's transformation to the parent will be a snapshot of the current transformation of this
frame.
public Frame copyWithRedundancy(AbstractFrame newParent)
Frame, with the given Frame set as the parent of the new frame. The new frame's transformation to its new
parent will be a snapshot of the current transformation of this frame to the new parent.
newParent - the parent for the newly created copy of this frame
PathNotFoundException - if path from this frame to the new parent frame does not exist.protected AbstractFrame findRoot()
Can be the frame itself if no parent is set for the frame.
public <T> Map<String,T> getAllParametersOfType(Class<T> paramType)
T - parameter typeparamType - type of the parameters to get
public void removeAdditionalParameter(String keyValue)
keyValue - key, e.g. type name of specific additional data to removepublic boolean isChildOf(AbstractFrame frame)
frame - frame which should be the ancestor of this frame.
public String getPath()
public String getPathFrom(AbstractFrame frame)
frame - the frame to which the path should be given.
protected void transformInternal(AbstractFrame reference,
ITransformation offset)
This frame and all its children will change their absolute position.
reference - reference frameoffset - new transformation relative to the reference frameprotected void orientateLikeInternal(AbstractFrame other)
This method only works if a path exists between the two frames.
other - the other frame.
public void setRedundancyInformation(Robot robot,
IRedundancyCollection redundancy)
robot - robot for which redundancy information should be setredundancy - redundancy information to set
public void setRedundancyInformation(String providerName,
IRedundancyCollection redundancy)
providerName - provider name. See Device.getUniqueName
which redundancy information should be setredundancy - redundancy information to setpublic IRedundancyCollection getRedundancyInformationForDevice(Robot robot)
robot - Device to get the corresponding redundancy information for. Can not be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||