com.kuka.nav.fleet.actions
Interface CustomEdgeAction


public interface CustomEdgeAction

Interface for user-definable actions that can be performed on graph edge traversal. Edges with a configured user-definable action will be considered during planning along with all other actions and allow for plans including movements and actions between nodes that exceed the standard motions.

A user-definable action must strictly abide by a number of constraints documented for the affected methods because the planning- and execution-phases of the FleetManager rely on these constraints. For example, it must be ensured by the implementation of a user-definable action that the vehicle executing the motion never leaves the edge during execution. Should any of these constraints be violated no guarantees can be given regarding the execution of the GraphMotion in which the user-definable action takes place and the resulting state of the fleet.

It is not recommended to inject any other classes like the MobileRobotManager or ITaskLogger in the implementing class. The preferred way is to give this as arguments in constructor or setters. Bear in mind to copy such fields in the copy()-method.


Method Summary
 void cancel()
          Cancels this CustomEdgeAction.
 CustomEdgeAction copy()
          Returns a deep copy of this CustomEdgeAction.
 double getEstimatedExecutionTime()
          Gets the estimated execution time of the action.
 double getEstimatedPathLength()
          Gets the estimated path length of the action.
 void run(CustomEdgeActionContext ctx, double goalOrientation)
          Executes the user defined action for traversing a topology graph edge.
 

Method Detail

run

void run(CustomEdgeActionContext ctx,
         double goalOrientation)
Executes the user defined action for traversing a topology graph edge.

The following constraints must strictly be respected by this action's implementation:

Parameters:
ctx - the execution context
goalOrientation - goal orientation [radians] relative to the map coordinate system that must be reached by the vehicle executing the action upon successful completion

getEstimatedExecutionTime

double getEstimatedExecutionTime()
Gets the estimated execution time of the action. This estimate will be used for computing the runtime estimate of the remaining execution time of a GraphMotion that involves this CustomEdgeAction.

Returns:
the estimated execution time in seconds

getEstimatedPathLength

double getEstimatedPathLength()
Gets the estimated path length of the action. This estimate will be used for computing the runtime estimate of the remaining path length of a GraphMotion that involves this CustomEdgeAction.

Returns:
the estimated path length in meters

cancel

void cancel()
Cancels this CustomEdgeAction. The method's implementation must ensure that the specific actions of this action are terminated and cleaned up accordingly. After the call the corresponding container's state will change to GraphMotionState.FINISHED.

For recover-purposes after canceling and runtime errors the implementation of this action's run(CustomEdgeActionContext, double)-method must ensure that the action can be resumed or restarted at any point on the edge.


copy

CustomEdgeAction copy()
Returns a deep copy of this CustomEdgeAction. Method must ensure that all relevant fields of this action are passed to the new instance. This is in particular true for all fields that were injected if this action was obtained using the injection-mechanism.

The easiest implementation is to call the default constructor. It is possible to copy some values that are set by a non-default constructor or setters.

Returns:
new CustomEdgeAction-instance with relevant values representing a deep copy of this action.


Copyright © 2019. All rights reserved.