com.kuka.roboticsAPI.motionModel
Class KROSMotion<T extends KROSMotion<T>>

java.lang.Object
  extended by com.kuka.roboticsAPI.commandModel.Action<T>
      extended by com.kuka.roboticsAPI.motionModel.Motion<T>
          extended by com.kuka.roboticsAPI.motionModel.KROSMotion<T>
Type Parameters:
T - Type of the overriding class
All Implemented Interfaces:
IAction, IKROSMotion, IMotion, IParameterizable
Direct Known Subclasses:
PositionHold, RobotMotion, VelocityControlledMotion

public abstract class KROSMotion<T extends KROSMotion<T>>
extends Motion<T>
implements IKROSMotion

This is the base class for all motion for serial kinematics commands.

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.

Constructor Summary
protected KROSMotion()
          Creates a new instance with a default parameter set type.
 
Method Summary
 void acquireResources(Device device)
          Prepares the action.
 T addMotionOverlay(IMotionOverlay motionOverlay)
          Adds the motion overlay parameter.
 T breakWhen(ICondition condition)
          Adds a condition to this motion.
 Collection<ICondition> getConditions()
          Gets all conditions defined for this motion.
 IMotionControlMode getMode()
          Gets the control mode parameter.
protected  List<IMotionOverlay> getMotionOverlaySupport()
          Gets the motion overlay parameter.
protected  List<ICondition> getSCSupport()
          Gets the condition parameter.
protected  List<com.kuka.common.Pair<ICondition,ITriggerAction>> getTriggerSupport()
          Gets the trigger parameter.
 boolean hasConditions()
          Returns true if there are conditions defined for this motion.
 boolean hasMotionOverlay()
          Returns true if there are motion overlays defined for this motion.
 boolean hasTrigger()
          Returns true if there are trigger defined for this motion.
 boolean isApplicableFor(IMotionControlMode newMotionControlMode)
          Each motion has to determine if it supports the given motion control mode.
 T setMode(IMotionControlMode mode)
          Sets the MODE parameter.
 T triggerWhen(ICondition condition, ITriggerAction action)
          Adds a trigger to this motion.
 
Methods inherited from class com.kuka.roboticsAPI.commandModel.Action
addParameter, addParams, getParams, releaseResources, removeParameter, self
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.kuka.roboticsAPI.commandModel.IAction
releaseResources
 
Methods inherited from interface com.kuka.roboticsAPI.motionModel.IParameterizable
getParams
 

Constructor Detail

KROSMotion

protected KROSMotion()
Creates a new instance with a default parameter set type.

Method Detail

getSCSupport

protected List<ICondition> getSCSupport()
Gets the condition parameter.

Returns:
the condition parameter

getTriggerSupport

protected List<com.kuka.common.Pair<ICondition,ITriggerAction>> getTriggerSupport()
Gets the trigger parameter.

Returns:
the trigger parameter.

getMotionOverlaySupport

protected List<IMotionOverlay> getMotionOverlaySupport()
Gets the motion overlay parameter.

Returns:
the motion overlay parameter.

breakWhen

public T breakWhen(ICondition condition)
Adds a condition to this motion.

The execution of the motion will be finished if the specified condition is evaluated to true. If the next motion is ready to be executed at that moment - it will start immediately.

Parameters:
condition - The condition. null is not allowed.
Returns:
This motion.

triggerWhen

public T triggerWhen(ICondition condition,
                     ITriggerAction action)
Adds a trigger to this motion. For user defined actions, please use ICallbackAction

The specified action will be executed whenever the specified condition is evaluated to true. If the execution of the action is still in progress, when the next trigger occurs, the action is not executed again. The action is only executed when the trigger occurs while no action execution is in progress. Action callback has a method to determine the number of missed triggers.

Parameters:
condition - The condition. null is not allowed.
action - The action to execute when the condition is evaluated to true
Returns:
This motion.
See Also:
ICallbackAction, StartRecordingAction, StopRecordingAction

hasConditions

public boolean hasConditions()
Returns true if there are conditions defined for this motion.

Specified by:
hasConditions in interface IKROSMotion
Returns:
true if there are conditions set for this motion.
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.

hasTrigger

public boolean hasTrigger()
Description copied from interface: IKROSMotion
Returns true if there are trigger defined for this motion.

Specified by:
hasTrigger in interface IKROSMotion
Returns:
true if there are trigger set for this motion.

getConditions

public Collection<ICondition> getConditions()
Gets all conditions defined for this motion.

Specified by:
getConditions in interface IKROSMotion
Returns:
Unmodifiable collection containing all conditions defined on this motion. If there are no condition defined - returns empty collection.
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.

setMode

public T setMode(IMotionControlMode mode)
Sets the MODE parameter.

Overrides:
setMode in class Motion<T extends KROSMotion<T>>
Parameters:
mode - The mode parameter. null is not allowed.
Returns:
A copy of this set (builder pattern).
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.

addMotionOverlay

public T addMotionOverlay(IMotionOverlay motionOverlay)
Adds the motion overlay parameter.

Parameters:
motionOverlay - The motion overlay parameter. null is not allowed.
Returns:
A copy of this set (builder pattern).
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.

hasMotionOverlay

public boolean hasMotionOverlay()
Description copied from interface: IKROSMotion
Returns true if there are motion overlays defined for this motion.

Specified by:
hasMotionOverlay in interface IKROSMotion
Returns:
true if there are motion overlays set for this motion.

getMode

public IMotionControlMode getMode()
Gets the control mode parameter.

Specified by:
getMode in interface IKROSMotion
Returns:
The control mode parameter.
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.

isApplicableFor

public boolean isApplicableFor(IMotionControlMode newMotionControlMode)
Each motion has to determine if it supports the given motion control mode. The method is called before the motion is sent to the controller.

Specified by:
isApplicableFor in interface IKROSMotion
Parameters:
newMotionControlMode - The new motion control mode.
Returns:
True if the new mode is supported, false otherwise.
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.

acquireResources

public void acquireResources(Device device)
Prepares the action.

An action is part of an instruction, and the prepare method passes the device part of the instruction to the action so that it can determine if the device is appropriate for the action.

Specified by:
acquireResources in interface IAction
Overrides:
acquireResources in class Motion<T extends KROSMotion<T>>
Parameters:
device - The device part of the instruction in which the action is contained.
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.