|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.geometry.Frame
com.kuka.geometry.ObjectFrame
public class ObjectFrame
Represents a frame that belongs to a SpatialObject.
Object frames describe the geometric structure of a spatial object. Every object frame has references to its
parent as well as to its children.
An object frame differs from a temporary frame in the following ways:
SpatialObject.
SpatialObject, it will not be garbage collected.
getPath()) to
SpatialObject.getFrame(String) on its owner object.
createFrame methods of SpatialObject.
| Field Summary | |
|---|---|
static String |
PATH_SEPARATOR
Separator for frame path segments. |
| Method Summary | |
|---|---|
Map<String,Object> |
getAdditionalFrameData()
Gets the map containing all additional parameters defined for this frame. |
Object |
getAdditionalParameter(String key)
Gets an additional frame parameter for the specified key. |
List<ObjectFrame> |
getAllChildren()
Returns a list of all children of this frame, plus all of these children's children and so on. |
ObjectFrame |
getChild(String fullPath)
Returns the child frame with the specified name. |
List<ObjectFrame> |
getChildren()
Returns a new list containing child frames of this frame. |
IFrameConnection |
getConnectionFromParent()
Returns the connection from the parent frame to this frame. |
String |
getId()
Gets the attribute Id. |
String |
getName()
Returns the name of this frame. |
SpatialObject |
getOwner()
Returns the spatial object that owns this frame. |
ObjectFrame |
getParent()
Returns the parent frame. |
String |
getPath()
Returns the path to this frame relative to the root frame of the owner object. |
IMotionContainer |
move(IMotion motion)
Moves this object according to the given motion. |
IMotionContainer |
move(IMotion motion,
IMotionContainerListener listener)
Moves this object according to the given motion. |
IMotionContainer |
moveAsync(IMotion motion)
Moves this object according to the given motion. |
IMotionContainer |
moveAsync(IMotion motion,
IMotionContainerListener listener)
Moves this frame according to the given motion. |
void |
removeAdditionalParameter(String key)
Removes an additional frame parameter for the specified key. |
void |
setAdditionalParameter(String key,
Object value)
Sets an additional frame parameter with specified key and value. |
void |
setConnectionFromParent(IFrameConnection connection)
Changes the connection to the parent of this frame. |
protected void |
setId(String id)
Sets the attribute Id. |
void |
setName(String name)
Sets the name of this frame. |
void |
transform(Frame reference,
ITransformation delta)
Changes this frame's position by applying the given translation and rotation to this frame in the coordinate system of the given reference frame. |
void |
transformTo(Frame target)
Changes this frame's position and orientation in space by bringing it to the same position and orientation in space as the given target frame. |
void |
translateTo(Frame target)
Changes this frame's position by bringing its origin to the same location in space as the origin of the given target frame. |
| Methods inherited from class com.kuka.geometry.Frame |
|---|
calculateTransformationTo, distanceTo, getRedundancyDataMap, getRedundancyInformation, getTransformationFromParent, hasAncestor, hasPathTo, hasStaticPathTo, isNearTo, representationOf, representationOf, rotate, rotate, rotateTo, rotationalDistanceTo, setRedundancyInformation, toString, transform, translate, translate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PATH_SEPARATOR
| Method Detail |
|---|
public Map<String,Object> getAdditionalFrameData()
public Object getAdditionalParameter(String key)
key - parameter key.
null if no parameter for the specified key found.
public void setAdditionalParameter(String key,
Object value)
key - parameter keyvalue - parameter valuepublic void removeAdditionalParameter(String key)
key - key of the parameter to remove.public SpatialObject getOwner()
public List<ObjectFrame> getChildren()
public List<ObjectFrame> getAllChildren()
public ObjectFrame getChild(String fullPath)
fullPath - relative path to the child frame to be obtained
IllegalArgumentException - if childName is null or empty string, or if the child frame with the specified name
does not exist.public String getPath()
IllegalStateException - if the frame has no owner objectpublic ObjectFrame getParent()
Frame
getParent in class Framenull if the frame has no parent.public void setConnectionFromParent(IFrameConnection connection)
FrameCaution: Use this method only if you understand the impact, it is designed for advanced use cases - This frame's position in space may be changed. The positions of frames connected to this frame will also be affected by this method.
setConnectionFromParent in class Frameconnection - the new type of connection to the parent frame
IllegalStateException - if this frame has no parentIFrameConnectionpublic String getName()
FramegetChild(String)), or it might simply be used to
print the name in Frame.toString().
getName in class Framenull if the frame has no name.public IFrameConnection getConnectionFromParent()
getConnectionFromParent in class Framenull if this frame has no parent.getParent(),
IFrameConnectionpublic void translateTo(Frame target)
FrameThis implies that the static connection to the parent frame is replaced. This frame and all the frames connected to it will change their position in the model.
translateTo in class Frametarget - the frame that specifies the target position for the origin of this frame
IllegalArgumentException - if there is no connection or an unknown connection type between this frame and the target frame,
or if the parameter is null
IllegalStateException - if this frame's parent connection type is anything other than StaticConnection or if the
relation between the involved frames could not be determined
ThreadInterruptedException - if the thread was interrupted during execution. The thread interrupt flag will
be set if the thread was interrupted (that is, Thread.isInterrupted() will return
true)
public void transform(Frame reference,
ITransformation delta)
Framereference frame.
This implies that the static connection to the parent frame is changed. This frame and all the frames connected to it will change their position in the model.
For example, the following instruction will change the position of frame by shifting it 10 mm along the
positive X axis and rotating it 45° around the Z axis of base:
frame.transform(base, Transformation.of(10, 0, 0, 45, 0, 0));
transform in class Framereference - the reference frame for the transformationdelta - the amount by which this frame's position and/or orientation should be changed
IllegalArgumentException - if there is no connection or an unknown connection type between this frame and the reference frame,
or if any parameter is null
IllegalStateException - if this frame's parent connection type is anything other than StaticConnection,
or if the relation between the involved frames could not be determined
ThreadInterruptedException - if the thread was interrupted during execution. The thread interrupt flag will
be set if the thread was interrupted (that is, Thread.isInterrupted() will return
true)Transformation,
transform(Frame, ITransformation),
Frame.translate(com.kuka.math.geometry.Vector3D),
Frame.rotate(com.kuka.math.geometry.IRotation)public void transformTo(Frame target)
FrameThis implies that the static connection to the parent frame is replaced. This frame and all the frames connected to it will change their position in the model.
transformTo in class Frametarget - the frame that specifies the target position and orientation in space
IllegalArgumentException - if there is no connection or an unknown connection type between this frame and the target frame,
or if the parameter is null
IllegalStateException - if this frame's parent connection type is anything other than StaticConnection or if the
relation between the involved frames could not be determined
ThreadInterruptedException - if the thread was interrupted during execution. The thread interrupt flag will
be set if the thread was interrupted (that is, Thread.isInterrupted() will return
true)translateTo(Frame),
Frame.rotateTo(Frame)public void setName(String name)
setName in class Framename - any string, including null or "".
IllegalArgumentException - if this frame has a sibling with the name that is supposed to be set or if the given name is nullpublic IMotionContainer move(IMotion motion)
IMovable
The motion will be performed by a robot (or some other device) that should be found in the kinematic chain
between this frame and the world origin (or the destination of the specified motion). If such a robot is not
found - IllegalStateException will be thrown.
If the specified motion is a cartesian motion - it is this frame that will reach the destination and/or follow
the path defined by the motion. If the motion is joint specific - the motion directly affects the joints of the
robot connected with this frame.
move in interface IMovablemotion - the motion that should be executed
public IMotionContainer moveAsync(IMotion motion)
IMovable
The motion will be performed by a robot (or some other device) that should be found in the kinematic chain
between this frame and the world origin (or the destination of the specified motion). If such a robot is not
found - IllegalStateException will be thrown.
If the specified motion is a cartesian motion - it is this frame that will reach the destination and/or follow
the path defined by the motion. If the motion is joint specific - the motion directly affects the joints of the
robot connected with this frame.
This is an asynchronous call and will return immediately.
moveAsync in interface IMovablemotion - the motion that should be executed
public IMotionContainer move(IMotion motion,
IMotionContainerListener listener)
IMovable
The motion will be performed by a robot (or some other device) that should be found in the kinematic chain
between this frame and the world origin (or the destination of the specified motion). If such a robot is not
found - IllegalStateException will be thrown.
If the specified motion is a cartesian motion - it is this frame that will reach the destination and/or follow
the path defined by the motion. If the motion is joint specific - the motion directly affects the joints of the
robot connected with this frame.
move in interface IMovablemotion - the motion that should be executedlistener - listener for the motion container
public IMotionContainer moveAsync(IMotion motion,
IMotionContainerListener listener)
IMovable
The motion will be performed by a robot (or some other device) that should be found in the kinematic chain
between this frame and the world origin (or the destination of the specified motion). If such a robot is not
found - IllegalStateException will be thrown.
If the specified motion is a cartesian motion - it is this frame that will reach the destination and/or follow
the path defined by the motion. If the motion is joint specific - the motion directly affects the joints of the
robot connected with this frame.
This is an asynchronous call and will return immediately.
moveAsync in interface IMovablemotion - the motion that should be executedlistener - listener for the motion container
public String getId()
protected void setId(String id)
id - the value of attribute Id: unique identifier fulfilling XML naming requirements
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||