com.kuka.roboticsAPI.motionModel
Class PositionHold

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<PositionHold>
              extended by com.kuka.roboticsAPI.motionModel.PositionHold
All Implemented Interfaces:
IAction, IKROSMotion, IMotion, IParameterizable

public final class PositionHold
extends KROSMotion<PositionHold>

Using the PositionHold command will bring the given robots into the mode where it holds it's position with the specified control mode. It is intended to use the position hold command with an impedance mode.

Please note, if a timeout value for the PositionHold command has been defined, this will be used as a command stop condition, otherwise this command has no implicit stop condition. In this case it has to be cancelled manually using the cancel-method of the ExecutionEngine or you have to specify your own stop condition.


Constructor Summary
PositionHold(IMotionControlMode controlMode, long timeout, TimeUnit timeUnit)
          It is recommended to set the controlMode explicitly.
 
Method Summary
 PositionHold breakWhen(ICondition condition)
          Adds a condition to this motion.
 long getRampTimeMs()
          Get the configured ramp time for the PositionHold-command.
 long getTimeoutMillis()
          Get the timeout for the PositionHold-command.
 boolean getWaitForStop()
          Get if the PositionHold will wait for the robot to stop.
 PositionHold setRampTime(long rampTime, TimeUnit timeUnit)
          Sets the interval that will be used to reach the configured impedance mode.
 PositionHold setWaitForStop(boolean wait)
          Specifies if this PositionHold will wait for the robot to stop before it starts holding the position.
 String toString()
           
 PositionHold triggerWhen(ICondition condition, ITriggerAction action)
          Adds a trigger to this motion.
 
Methods inherited from class com.kuka.roboticsAPI.motionModel.KROSMotion
acquireResources, addMotionOverlay, getConditions, getMode, getMotionOverlaySupport, getSCSupport, getTriggerSupport, hasConditions, hasMotionOverlay, hasTrigger, isApplicableFor, setMode
 
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, 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

PositionHold

public PositionHold(IMotionControlMode controlMode,
                    long timeout,
                    TimeUnit timeUnit)
It is recommended to set the controlMode explicitly. For this you can use this constructor to create a new position hold command with a specified control mode. This means that the stable position should be the current position of the robot and kept it in active control mode.

Parameters:
controlMode - the control mode for the position hold command.
timeout - The maximum time the position hold command is active. For endless timeout use a value < 0.
timeUnit - The unit of the timeout. Null means endless timeout.
Method Detail

getTimeoutMillis

public long getTimeoutMillis()
Get the timeout for the PositionHold-command.

Returns:
the timeout in [ms]

setWaitForStop

public PositionHold setWaitForStop(boolean wait)
Specifies if this PositionHold will wait for the robot to stop before it starts holding the position. In PositionControl mode PositionHold will always wait for the robot to stop. In impedance mode waiting for this stop can be prevented by calling setWaitForStop(false)

Default value is TRUE
For internal use only! Will be removed in future versions.

Parameters:
wait - TRUE will cause the robot to wait for a stop before it starts holding the position
FALSE will cause the robot to try to hold the position instantly (not recommended!)
Returns:
this PositionHold object
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.

getWaitForStop

public boolean getWaitForStop()
Get if the PositionHold will wait for the robot to stop.

For internal use only! Will be removed in future versions.

Returns:
Returns true if the PositionHold waits for the robot to stop, 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.

setRampTime

public PositionHold setRampTime(long rampTime,
                                TimeUnit timeUnit)
Sets the interval that will be used to reach the configured impedance mode.

Default value is 0.2s
For internal use only! Will be removed in future versions.

Parameters:
rampTime - The time interval that will be used. The ramp time is clipped by the timeout parameter of this motion.
timeUnit - The unit of the ramp time.
Returns:
this PositionHold object
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.

getRampTimeMs

public long getRampTimeMs()
Get the configured ramp time for the PositionHold-command.

For internal use only! Will be removed in future versions.

Returns:
the ramp time in milliseconds
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.

breakWhen

public PositionHold breakWhen(ICondition condition)
Description copied from class: KROSMotion
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.

Overrides:
breakWhen in class KROSMotion<PositionHold>
Parameters:
condition - The condition. null is not allowed.
Returns:
This motion.

triggerWhen

public PositionHold triggerWhen(ICondition condition,
                                ITriggerAction action)
Description copied from class: KROSMotion
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.

Overrides:
triggerWhen in class KROSMotion<PositionHold>
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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2019. All rights reserved.