Readonly
apiDefines the protocol version number of this adapter, a positive integer.
Increment this version whenever you make changes to the adapter protocol.
The API version of this adapter must match (i.e. equal) the API version of the associated AGV controller. If both versions differ, an error is thrown when the adapter is instantiated.
Readonly
controllerThe AGV controller this adapter is associated with.
Used to invoke state update methods defined by the AGV controller.
Readonly
nameDefines the name of this adapter used for identification and display purposes.
Registers a handler that is invoked once by the associated controller when the adapter should perform initializations and connect to the AGV navigation & control interface.
The handler function should compute initial vehicles states and report
them back to the controller after initialization is complete through the
callback AttachContext.attached
. Until this callback is invoked, the
controller won't invoke any of the other handler functions defined in
this interface.
context information for attachment
Registers a handler that is invoked by the associated controller whenever a not yet finished or failed node or edge action of an active order is to be canceled.
If the action cannot be interrupted it should continue running until
finished or failed. If the action can be interrupted it should be
canceled and action status FAILED should be reported via
context.updateActionStatus
.
This handler function is only invoked for node and edge actions
previously scheduled by the executeAction
handler and not yet finished
or failed, i.e. for actions that are either in status INITIALIZING,
RUNNING, or PAUSED.
context information of a node or edge action to be canceled
Registers a handler that is invoked once by the associated controller when the adapter should perform deinitializations and disconnect from the AGV navigation & control interface.
The handler function may compute final vehicles states and report them
back to the controller after deinitialization is complete through the
callback DetachContext.detached
. After this callback is invoked, the
controller won't invoke any of the other handler functions defined in
this interface.
context information for detachment
Registers a handler that is invoked by the associated controller whenever an instant, node, or edge action is to be executed.
While the action is executed, the callback context.updateActionStatus
must be invoked whenever the action transitions to a new status, passing
in the new action status together with result description and linked
partial state (if applicable).
If the action context of an action specifies true
on the stopDriving
property the AGV must stop driving and eventually invoke
controller.updateDrivingState
before executing the action; otherwise
the current driving state must be kept.
For a node or edge action, the initial action status WAITING is already preset on the controller's current state. For an instant action, no action status is preset on the current state. In both cases, the action handler must initially transition to the action's initial state, either INITIALIZING or RUNNING (or PAUSED if pause mode is activated), FINISHED, or FAILED.
If pause mode is active, the action to be executed should transition to PAUSED state (immediately or after initializing/running, if needed). If pause mode is deactivated, the action should transition to the previous status again.
For instant actions 'startPause' and 'stopPause' this handler must
pause/resume all other actions, and update their action status and linked
state paused
accordingly. Node processing of an active order is
suspended and resumed automatically by the AGV controller. Edge traversal
must be suspended and resumed by the AGV adapter.
Note that the instant actions 'stateRequest' and 'cancelOrder' are never dispatched to this handler as they are handled by the AGV controller itself.
context information of a node, edge, or instant action to be executed
Registers a handler that is invoked by the associated controller whenever an active edge action (i.e. one with status unequal FINISHED or FAILED) must be terminated.
The registered handler is invoked whenever a node is traversed
and any active actions on the edge leading up to that node must be
terminated. The handler should finish or cancel the action and report an
updated action status FINISHED or FAILED via
context.updateActionStatus
.
context information of an edge action to be finished
Registers a handler that is invoked by the associated controller to check synchronously whether a given node, edge, or instant action can be executed principally.
The handler function should return a non-empty array of error references if the action cannot be executed and must be rejected. For example, if an action cannot be completed because of external factors (e.g. no load at expected position), or if an action conflicts with the AGV's currently active order (e.g. instant action says to lower fork while order says to raise fork), or if the order contains actions the vehicle cannot perform (e.g. lifting height higher than maximum lifting height, or lifting actions although no stroke is installed).
If the action can be executed, the handler should return an empty array
or undefined
.
You should not include the actionId
and the actionType
as error
references as these are added automatically by the controller. If the
error was caused by erroneous action parameters, include a list of
parameters in the reference.
If an instant action is not executable in principle it will be rejected with an error by the AGV controller. If a node or edge action is not executable in principle, the order will be rejected by the AGV controller. In the latter case all order node and edge actions are checked for executability before the order is carried out.
an array of error references if action cannot be executed; an
empty array or undefined
if action can be executed
context information of a node, edge, or instant action to be checked for execution
Registers a handler that is invoked by the associated controller whenever it needs to check whether a given node's position is within the allowed deviation range of the current AGV position.
The handler function should return an array of error references if the
node is not within the deviation range by checking the node properties x,
y, theta, mapId, allowedDeviationTheta, and allowedDeviationXy against
the current AGV position. Otherwise, the handler should return an empty
array or undefined
.
You should not include the nodeId
as error reference as it is
added automatically by the controller. Instead, include all node
property-value pairs that fail the check.
an array of error references if node is not within deviation
range; an empty array or undefined
otherwise
a Node object
Registers a handler that is invoked by the associated controller to check synchronously whether AGV can traverse a given route with regard to vehicle-specific constraints on node/edge properties that must be validated by the AGV adapter as the AGV controller is not aware of them.
The nodes and edges passed to this handler are guaranteed to be well-formed and valid with respect to the proper sequence of base/horizon nodes and edges.
Node and edge actions must not be checked by this handler; they are
checked individually by the handler isActionExecutable
.
The handler function should return an array of error references if the
route cannot be traversed. For example, if an edge has fields that the
vehicle cannot use (e.g. trajectory) or misses fields it requires (e.g.
nodePosition with mapId for free navigation) or fields it doesn't support
(e.g. rotationAllowed). Otherwise, the handler should return an empty
array or undefined
.
an array of error references if route cannot be traversed; an
empty array or undefined
otherwise
context information with the route
Registers a handler that is invoked by the associated controller whenever the AGV should stop driving while the active order is being canceled and after all node/edge actions of this order have already been canceled.
If the AGV is on a node or can stop if in between nodes, it should stop
gracefully; otherwise it should continue driving to the next node, and
automatically stop on arrival. In all these cases the traverse
handler's callback context.edgeTraversed
should not be invoked any more
(even if you do invoke it, it is ignored by the AGV controller).
The handler function must invoke the callback context.stopped
once as
soon as the AGV has stopped driving, even if the vehicle is already
stopped for another reason. After reporting this state the AGV should be
able to receive a new order. Until this callback has been called it is
guaranteed that no other invocation of this handler occurs.
If the AGV's capabilities require it to drive to the next node before
stopping, the adapter must invoke both the callback
context.drivingToNextNode
immediately and the callback
context.stopped
after stopping on arrival.
It is guaranteed that whenever this function is called all scheduled node and edge actions of the order to be canceled have ended, i.e. are either in status FINISHED or FAILED.
context information for reporting when AGV has stopped driving.
Optional
trajectoryRegisters a handler that is invoked by the associated controller to synchronously calculate the trajectory for a given edge (optional).
This handler is only required if the AGV should precalculate the
trajectory path of all order edges by itself whenever an order arrives.
The handler is invoked on all order edges (including horizon edges) in
the given edges order in series. Do not specify a handler function if the
AGV should determine the route on the fly when an edge is being traversed
by invoking the traverse
handler.
the calculated trajectory object
context information of a trajectory
Registers a handler that is invoked by the associated controller to traverse a given edge with a given start and end node using an (optional) trajectory.
When the handler function is invoked the AGV should drive along the given
trajectory (if specified) or by free navigation (if not specified),
invoking controller.updateDrivingState
if needed. However, if pause
mode is activated the AGV has to postpone traversal until pause mode is
deactivated by instant action 'stopPause'.
When the given edge has been traversed completely, the callback
context.edgeTraversed
must be invoked. Until this callback has been
called it is guaranteed that no other invocation of this handler occurs.
While traversing an edge the AGV adapter must handle activation and deactivation of pause mode (triggered either by instant actions 'startPause/stopPause' or by a hardware button) that affects driving state and update it accordingly.
This handler must take edge and end node orientation changes into account if supported by the AGV. If an edge orientation is required and rotation is disallowed on the edge, rotate the vehicle before entering the edge, otherwise rotate the vehicle on the edge to the desired ortientation. Upon traversal and if required, the vehicle must be rotated on the end node according to node's theta angle.
context information of an edge traversal
Generated using TypeDoc
Defines a plug-in commanding interface for performing AGV specific operations to be registered with an AGV controller.
The adapter's functions provide an abstract interface that maps generic operations to an AGV specific navigation and control interface. These operations include executing or canceling a node action, an edge action, or an instant action, traversing/navigating an edge, and calculating trajectory paths.
Concrete implementations of AGV adapters are usually provided by an integrator or by the vendor designing the vehicle control interface.
Remarks
An AGV adapter and its logic is realized as a class that implements this interface. This class must provide a constructor that conforms to the interface
AgvAdapterConstructor
. Using dependeny injection, this class type is passed as a configuration option to the AGV controller (seeAgvControllerOptions.agvAdapterType
) which creates an instance of the adapter class with appropriate constructor parameters.