com.kuka.roboticsAPI.deviceModel
Class Robot

java.lang.Object
  extended by com.kuka.common.TaggableObject
      extended by com.kuka.roboticsAPI.geometricModel.SceneGraphObject
          extended by com.kuka.roboticsAPI.geometricModel.SpatialObject
              extended by com.kuka.roboticsAPI.geometricModel.PhysicalObject
                  extended by com.kuka.roboticsAPI.deviceModel.Device
                      extended by com.kuka.roboticsAPI.deviceModel.MovableDevice
                          extended by com.kuka.roboticsAPI.deviceModel.Robot
All Implemented Interfaces:
com.kuka.common.ITaggable, IOperationModeProvider
Direct Known Subclasses:
LBR

public abstract class Robot
extends MovableDevice
implements IOperationModeProvider

A robot is a device which can hold a tool and do some simple motions out of the box. Furthermore, it can be used in complex motions as device.


Field Summary
 
Fields inherited from class com.kuka.roboticsAPI.deviceModel.Device
_hardwareVersion
 
Constructor Summary
protected Robot(Controller controller, String name)
          Creates a new robot.
 
Method Summary
 LoadData calculateLoadOnFlange()
          Calculates the load data of all objects that are attached to the flange of the calling robot.
 boolean checkFrameContainsRedundancy(AbstractFrame frame)
          Checks if the specified frame contains redundancy information for this robot.
protected abstract  ITransformationProvider createBaseFlangeTransformationProvider()
          Creates the robot-base-to-flange transformation provider for this robot.
protected  com.kuka.common.params.IParameterSet createDefaultsParameterSet()
          Creates the defaults parameter set for this device.
 void deactivateDeviceCartesianVelocityLimit()
          Deactivates the Device Cartesian velocity limit.
 void detachAll()
          Detaches all objects attached on (or connected with) the defaultMotionFrame of the robot.
 CartesianVelocityLimitInfo getCartesianVelocityLimitInfo()
          Gets a reference to a CartesianVelocityLimits object which contains all the Cartesian Velocity Limit related information for the current robot.
 Frame getCommandedCartesianPosition(ObjectFrame frameOnFlange)
          Gets the commanded cartesian position of the specified frame in the frame tree below the flange of the robot relative to WORLD base frame SceneGraphObject.getRootFrame().
 Frame getCommandedCartesianPosition(ObjectFrame frameOnFlange, AbstractFrame reference)
          Gets the commanded cartesian position of the specified frame in the frame tree below the flange of the robot relative to the given reference frame.
 JointPosition getCommandedJointPosition()
          Gets the commanded joint positions for this robot.
 Frame getCurrentCartesianPosition(ObjectFrame frameOnFlange)
          Gets the current cartesian position of the specified frame in the frame tree below the flange of the robot relative to WORLD base frame SceneGraphObject.getRootFrame().
 Frame getCurrentCartesianPosition(ObjectFrame frameOnFlange, AbstractFrame reference)
          Gets the current cartesian position of the specified frame in the frame tree below the flange of the robot relative to the given reference frame.
 JointPosition getCurrentJointPosition()
          Gets a copy of the current measured joint positions of the robot.
 ObjectFrame getDefaultMotionFrame()
          Deprecated. use getFlange() instead
 RobotParameterSet getDefaults()
          Gets the map containing the default values of the device.
 ObjectFrame getFlange()
          Gets the flange frame of the robot.
 Frame getForwardKinematic(JointPosition joints)
          Gets the forward kinematic value of the given joints for this robot.
 JointPosition getHomePosition()
          Returns the home position of this robot.
protected abstract  JointPosition getInitialHomePosition()
          Gets the default home position of the concrete robot.
 JointPosition getInverseKinematic(ITransformation trafo, JointPosition correspondingJoints)
          Gets the inverse kinematics value of the given matrix for this robot.
abstract  JointPosition getInverseKinematicFromFrameAndRedundancy(AbstractFrame frame)
          Gets the inverse kinematics value of the given frame for this robot.
 int getJointCount()
          Gets the joint count of this robot.
 JointLimits getJointLimits()
          Get the JointLimits for this robot.
 PositionInformation getPositionInformation(ObjectFrame frameOnFlange)
          Gets information about the current and commanded position of the specified frame in the frame tree below the flange of the robot relative to WORLD base frame SceneGraphObject.getRootFrame().
 PositionInformation getPositionInformation(ObjectFrame frameOnFlange, AbstractFrame reference)
          Gets information about the current and commanded position of the specified frame in the frame tree below the flange of the robot relative to the given reference frame.
 boolean hasActiveMotionCommand()
          Returns true if the robot is currently executing a motion command for example by jogging or running an application.
protected  int initializeJointCount()
          Initializes the joint count of this device.
 boolean isInHome()
          Returns true if the robot is in its home position, i.e. its commanded joint position is close to the home position, and false otherwise.
 boolean isMastered()
          Returns true if all axes of this robot are mastered.
 IMotionContainer move(IMotion motion)
          Moves the flange of the robot according to the given motion.
 IMotionContainer move(IMotion motion, IMotionContainerListener listener)
          Moves the flange of the robot according to the given motion.
 IMotionContainer moveAsync(IMotion motion)
          Moves the flange of the robot according to the given motion.
 IMotionContainer moveAsync(IMotion motion, IMotionContainerListener listener)
          Moves the flange of the robot according to the given motion.
protected  void onDispose()
          Called when the device get's disposed.
protected  void onInitialize()
          Called when the device get's initialized.
 void setDefaultMotionFrame(ObjectFrame defaultMotionFrame)
          Sets the defaultMotionFrame of the object.
 void setDeviceCartesianVelocityLimit(int cartesianVelocityLimit)
          Sets the Device Cartesian velocity limit to the specified value.
 void setHomePosition(AbstractFrame home)
          Sets the home position of this robot.
 void setHomePosition(JointPosition homePosition)
          Sets the home position of this robot.
 
Methods inherited from class com.kuka.roboticsAPI.deviceModel.MovableDevice
calculateReadyToMove, getOperationMode, getSafetyState, isMotionEnabled, isReadyToMove
 
Methods inherited from class com.kuka.roboticsAPI.deviceModel.Device
acquireCommandPermit, dispose, getContext, getController, getHardwareVersion, getUniqueName, initialize, isInitialized, refreshHardwareVersion, releaseCommandPermit, setName
 
Methods inherited from class com.kuka.roboticsAPI.geometricModel.PhysicalObject
addDefaultMotionFrame, getLoadData
 
Methods inherited from class com.kuka.roboticsAPI.geometricModel.SpatialObject
attachTo, attachTo, changeParent, detach, switchParent, switchParent
 
Methods inherited from class com.kuka.roboticsAPI.geometricModel.SceneGraphObject
addChildFrame, addChildFrame, addChildFrame, addChildFrame, addChildFrame, addChildFrame, allObjects, changeFrameParent, changeFramePosition, findMembersOfGroup, findRobot, getAllFrames, getAllUserParameters, getChild, getChildFrameLock, getChildren, getFrame, getName, getParent, getRootFrame, getRootOfGroup, getUserParameter, groupToParent, isDescendantOf, isGroupedToParent, isMemberOfGroup, isRootOfGroup, removeFrame, renameFrame, setRootFrame, setUserParameter, toString, ungroupFromParent
 
Methods inherited from class com.kuka.common.TaggableObject
getTag, setTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.kuka.roboticsAPI.deviceModel.IOperationModeProvider
getOperationMode
 

Constructor Detail

Robot

protected Robot(Controller controller,
                String name)
Creates a new robot.

Parameters:
controller - The controller to which this device belongs.
name - The name of the device.
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 Detail

createBaseFlangeTransformationProvider

protected abstract ITransformationProvider createBaseFlangeTransformationProvider()
Creates the robot-base-to-flange transformation provider for this robot.

Returns:
The robot-base-to-flange transformation provider.

setDefaultMotionFrame

public void setDefaultMotionFrame(ObjectFrame defaultMotionFrame)
Sets the defaultMotionFrame of the object. By default, the rootFrame is the defaultMotionFrame.

DefaultMotionFrame can be set only once. If set a second time IllegalStateException is thrown.

If this method is used to set the defaultMotionFrame for a robot, an IllegalArgumentException is thrown. The DefaultMotionFrame of a robot is always the robot flange.

Overrides:
setDefaultMotionFrame in class PhysicalObject
Parameters:
defaultMotionFrame - the future defaultMotionFrame
Throws:
IllegalArgumentException - The defaultMotionFrame cannot be set for a 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.

getJointCount

public final int getJointCount()
Gets the joint count of this robot.

Returns:
The joint count of this robot.

getDefaults

public RobotParameterSet getDefaults()
Description copied from class: Device
Gets the map containing the default values of the device.

Overrides:
getDefaults in class Device
Returns:
The map containing the default values of the device.

createDefaultsParameterSet

protected com.kuka.common.params.IParameterSet createDefaultsParameterSet()
Description copied from class: Device
Creates the defaults parameter set for this device.

This method is called once during device initialization. This is the place for the device to return a device specific type of a parameter set. The device should then also override the getDefaults() method and change the return type of this method appropriately.

Overrides:
createDefaultsParameterSet in class Device
Returns:
The defaults parameter set for this device.

getHomePosition

public JointPosition getHomePosition()
Returns the home position of this robot. The home position is a user-defined joint position.

Returns:
The home position of this robot.

setHomePosition

public void setHomePosition(JointPosition homePosition)
Sets the home position of this robot.

Parameters:
homePosition - The new home position of this robot. The amount of values must match the joint count of this robot. Otherwise an exception will be thrown.

setHomePosition

public void setHomePosition(AbstractFrame home)
Sets the home position of this robot. The given frame will be converted to a unique joint position. Thus, redundancy information is required for this frame. If no redundancy information is available, an IllegalArgumentException is thrown.

Parameters:
home - A frame with redundancy information (e.g. a teached frame) defining the new home position.

onInitialize

protected void onInitialize()
Description copied from class: Device
Called when the device get's initialized. The RoboticsAPI ensures that this method is called before the device get's returned to a user program.

May be overridden by subclasses. Will only be called once. If this method fails with an exception, the device will not be initialized and may behave strange under some circumstances.

Overrides:
onInitialize in class Device

getInitialHomePosition

protected abstract JointPosition getInitialHomePosition()
Gets the default home position of the concrete robot. The default home position is used initially.

Returns:
The initial home position.

initializeJointCount

protected int initializeJointCount()
Initializes the joint count of this device.

Returns:
The joint count of this device

getInverseKinematicFromFrameAndRedundancy

public abstract JointPosition getInverseKinematicFromFrameAndRedundancy(AbstractFrame frame)
Gets the inverse kinematics value of the given frame for this robot. If the frame contains redundancy information, these are used for computation. If the frame does not contain redundancy information, an IllegalArgumentException is thrown.

Parameters:
frame - The frame for which the inverse kinematics is requested.
Returns:
The result of the calculation from the controller.
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.

getInverseKinematic

public final JointPosition getInverseKinematic(ITransformation trafo,
                                               JointPosition correspondingJoints)
Gets the inverse kinematics value of the given matrix for this robot.

Parameters:
trafo - The matrix for which the inverse kinematics is requested.
correspondingJoints - The optional joint configuration.
Returns:
The result of the calculation from the controller.
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.

getForwardKinematic

public final Frame getForwardKinematic(JointPosition joints)
Gets the forward kinematic value of the given joints for this robot.

Parameters:
joints - The joints for which the forward kinematic is requested.
Returns:
The result of the calculation from the controller.
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.

getJointLimits

public final JointLimits getJointLimits()
Get the JointLimits for this robot.

Returns:
the joint limits in radiant
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.

getCurrentJointPosition

public final JointPosition getCurrentJointPosition()
Gets a copy of the current measured joint positions of the robot.

Returns:
A copy of the current measured joint positions of the robot.

getCurrentCartesianPosition

public final Frame getCurrentCartesianPosition(ObjectFrame frameOnFlange,
                                               AbstractFrame reference)
Gets the current cartesian position of the specified frame in the frame tree below the flange of the robot relative to the given reference frame. The returned frame is a new instance of the Frame class.

Additionally, this method fills the created frame with the redundancy information for the robot in the created frame.

Parameters:
frameOnFlange - The frame below or equal to the flange of the robot. null is not allowed
reference - The reference frame. null is not allowed.
Returns:
The new frame with redundancy information. The parent for the new frame is the reference frame.

getCurrentCartesianPosition

public final Frame getCurrentCartesianPosition(ObjectFrame frameOnFlange)
Gets the current cartesian position of the specified frame in the frame tree below the flange of the robot relative to WORLD base frame SceneGraphObject.getRootFrame(). The returned frame is a new instance of the Frame class.

Additionally, this method fills the frame with frame information describing the redundancy values for the robot in the given frame.

Parameters:
frameOnFlange - The frame below or equal to the flange of the robot. null is not allowed
Returns:
The new frame with frame redundancy information. The parent for the new frame is the WORLD base frame.

getCommandedCartesianPosition

public final Frame getCommandedCartesianPosition(ObjectFrame frameOnFlange,
                                                 AbstractFrame reference)
Gets the commanded cartesian position of the specified frame in the frame tree below the flange of the robot relative to the given reference frame.

The returned frame is a new instance of the Frame class including the redundancy information of the robot.

Parameters:
frameOnFlange - The frame below or equal to the flange of the robot. null is not allowed
reference - The reference frame. null is not allowed.
Returns:
The new frame with redundancy information. The parent for the new frame is the reference frame.

getCommandedCartesianPosition

public final Frame getCommandedCartesianPosition(ObjectFrame frameOnFlange)
Gets the commanded cartesian position of the specified frame in the frame tree below the flange of the robot relative to WORLD base frame SceneGraphObject.getRootFrame().

The returned frame is a new instance of the Frame class including the redundancy information of the robot.

Parameters:
frameOnFlange - The frame below or equal to the flange of the robot. null is not allowed
Returns:
The new frame with redundancy information. The parent for the new frame is the WORLD base frame.

getPositionInformation

public final PositionInformation getPositionInformation(ObjectFrame frameOnFlange,
                                                        AbstractFrame reference)
Gets information about the current and commanded position of the specified frame in the frame tree below the flange of the robot relative to the given reference frame.

Parameters:
frameOnFlange - The frame below or equal to the flange of the robot. null is not allowed
reference - The reference frame. null is not allowed.
Returns:
The position information. The frames contained in the returned PositionInformation are new instances of the Frame class containing the redundancy information of the robot in the created frame.

getPositionInformation

public final PositionInformation getPositionInformation(ObjectFrame frameOnFlange)
Gets information about the current and commanded position of the specified frame in the frame tree below the flange of the robot relative to WORLD base frame SceneGraphObject.getRootFrame().

Parameters:
frameOnFlange - The frame below or equal to the flange of the robot. null is not allowed
Returns:
The position information. The frames contained in the returned PositionInformation are new instances of the Frame class containing the redundancy information of the robot in the created frame.

getCommandedJointPosition

public final JointPosition getCommandedJointPosition()
Gets the commanded joint positions for this robot.

Returns:
The commanded joint positions.

getDefaultMotionFrame

@Deprecated
public ObjectFrame getDefaultMotionFrame()
Deprecated. use getFlange() instead

The defaultMotionFrame of the robot. This is always the flange in case of a robot. The values will be measured values.

Overrides:
getDefaultMotionFrame in class PhysicalObject
Returns:
The defaultMotionFrame of the object.

getFlange

public ObjectFrame getFlange()
Gets the flange frame of the robot.

This is always the same frame as the defaultMotionFrame of the robot.

Returns:
the flange frame of the robot.

isMastered

public boolean isMastered()
Returns true if all axes of this robot are mastered. This means that all axes are adjusted.

Returns:
True if all axes of this robot are mastered

hasActiveMotionCommand

public boolean hasActiveMotionCommand()
Returns true if the robot is currently executing a motion command for example by jogging or running an application. This includes PositionHold.

Returns:
True if this robot is currently executing a motion command

moveAsync

public IMotionContainer moveAsync(IMotion motion)
Moves the flange of the robot according to the given motion.

If the specified motion is a cartesian motion - it is the flange of the robot that should reach the destination and/or follow the path defined by the motion. If the motion is joint specific - the motion affects the joints of the robot directly.

This is an asynchronous call and will return immediately.

Overrides:
moveAsync in class PhysicalObject
Parameters:
motion - the motion that should be executed
Returns:
the execution container containing runtime information for the execution of the motion
Throws:
IllegalArgumentException - if motion is null

moveAsync

public IMotionContainer moveAsync(IMotion motion,
                                  IMotionContainerListener listener)
Moves the flange of the robot according to the given motion.

If the specified motion is a cartesian motion - it is the flange of the robot that should reach the destination and/or follow the path defined by the motion. If the motion is joint specific - the motion affects the joints of the robot directly.

This is an asynchronous call and will return immediately.

Overrides:
moveAsync in class PhysicalObject
Parameters:
motion - the motion that should be executed
listener - listener for the motion container
Returns:
the execution container containing runtime information for the execution of the motion
Throws:
IllegalArgumentException - if motion is null

move

public IMotionContainer move(IMotion motion)
Moves the flange of the robot according to the given motion.

If the specified motion is a cartesian motion - it is the flange of the robot that should reach the destination and/or follow the path defined by the motion. If the motion is joint specific - the motion affects the joints of the robot directly.

Overrides:
move in class PhysicalObject
Parameters:
motion - the motion that should be executed
Returns:
the execution container containing runtime information for the execution of the motion
Throws:
IllegalArgumentException - if motion is null

move

public IMotionContainer move(IMotion motion,
                             IMotionContainerListener listener)
Moves the flange of the robot according to the given motion.

If the specified motion is a cartesian motion - it is the flange of the robot that should reach the destination and/or follow the path defined by the motion. If the motion is joint specific - the motion affects the joints of the robot directly.

Overrides:
move in class PhysicalObject
Parameters:
motion - the motion that should be executed
listener - listener for the motion container
Returns:
the execution container containing runtime information for the execution of the motion
Throws:
IllegalArgumentException - if motion is null

detachAll

public void detachAll()
Detaches all objects attached on (or connected with) the defaultMotionFrame of the robot.


onDispose

protected void onDispose()
Description copied from class: Device
Called when the device get's disposed.

May be overridden by subclasses. Will only be called once.

Overrides:
onDispose in class Device

calculateLoadOnFlange

public LoadData calculateLoadOnFlange()
Calculates the load data of all objects that are attached to the flange of the calling robot. The robot is not included in the calculations.

Returns:
the calculated LoadData of all Objects, that are attached to the robot flange.

checkFrameContainsRedundancy

public boolean checkFrameContainsRedundancy(AbstractFrame frame)
Checks if the specified frame contains redundancy information for this robot.

Parameters:
frame - frame to check
Returns:
true if if the specified frame contains redundancy information for this robot.
This element is not in its final state and might change in future versions.

isInHome

public boolean isInHome()
Returns true if the robot is in its home position, i.e. its commanded joint position is close to the home position, and false otherwise. The tolerance of the axes is set to 0.05.

Returns:
True if the robot is in its home position, and false otherwise.

setDeviceCartesianVelocityLimit

public void setDeviceCartesianVelocityLimit(int cartesianVelocityLimit)
Sets the Device Cartesian velocity limit to the specified value.

Parameters:
cartesianVelocityLimit - The new Device Cartesian velocity to set in [mm/s].
Throws:
com.kuka.common.exceptions.NotSupportedException - If this function is not implemented for the actual robot type.

deactivateDeviceCartesianVelocityLimit

public void deactivateDeviceCartesianVelocityLimit()
Deactivates the Device Cartesian velocity limit. It means that after calling this function, the Device Cartesian velocity limit value will be considered as it were infinite, (in other words this function disables the Device Cartesian velocity limit).

Throws:
com.kuka.common.exceptions.NotSupportedException - If this function is not implemented for the actual robot type.

getCartesianVelocityLimitInfo

public CartesianVelocityLimitInfo getCartesianVelocityLimitInfo()
Gets a reference to a CartesianVelocityLimits object which contains all the Cartesian Velocity Limit related information for the current robot.

Returns:
The filled CartesianVelocityLimits object, or null if there was an error during the request.
Throws:
com.kuka.common.exceptions.NotSupportedException - If this function is not implemented for the actual robot type.


Copyright © 2019. All rights reserved.