Dynamic Staging - ResgreenGroup/Botway-Documentation GitHub Wiki
Current Location: Home->Botway Menus->Dashboard->Dynamic Staging
Dynamic Routing: A method of changing routes on-the-fly based on conditions in a BotWay Staging Area.
Staging Area: A grouping of tags that are used to track the status of carts (LHF). The staging area is controlled by the stagingData.xml file in the data folder.
BotWay's Dynamic Staging is a system that BotWay uses to help stage jobs. A job is staged when the robot's workflow depends on human intervention to advance, usually in the form of moving product to its final destination via a fork truck. As the robot completes its route, it may end up dropping off full carts at a designated staging area where the carts wait for a fork truck to move them, a human to inventory them, or any other reason that the robot cannot continue the workflow. As the robot drops off its cart, it can also look for empty carts to take back with it. BotWay uses Dynamic staging to determine what to do at this staging area by instructing the robot to drop off carts, determining where to drop them off, and determining which empty carts to take back with it.
Dynamic staging can be enabled or disabled by switching the "use" line in stagingData.xml between "true" and "false." When enabled, a new section will show up beneath the job queue showing an array of spaces that contain symbols. Each space can display a status for "empty," "contains empty cart," "contains full cart," and "unusable." The user can change the status of these spaces by control-clicking them to cycle through the available status icons. BotWay will highlight the next spot to drop off a full cart and the next spot to take an empty cart in different colors which can be changed in the settings section. When there are no empty spaces displayed, BotWay will display an error and the job queue will be paused until space is freed up in the staging area.
Dynamic staging can be run in open-loop and closed-lop formats. Open-loop requires a human to indicate a change in status of a space in the staging area, while BotWay will automatically change which space it will drop a cart off in or take a cart from. Closed-loop relies on a vision system to determine the status of each cell automatically. Switching between "true" and "false" in the "useClosedLoop" line in stagingData.xml toggles between open-loop and closed-loop.
This file defines the staging areas used by BotWay and specifies the associated properties. It has the following format:
<stagingArea rev="116">
<use>true</use>
<useClosedLoop>false</useClosedLoop>
<fillFromStart>false</fillFromStart>
<inColor>-3342388</inColor>
<outColor>-3355393</outColor>
<msgUnknown>Status Unknown</msgUnknown>
<msgOk>OK</msgOk>
<colorOk/>
<msgEmpty>Item Not Located</msgEmpty>
<colorEmpty>-256</colorEmpty>
<msgFull>All Cells Filled</msgFull>
<colorFull>-65536</colorFull>
<toggleList>NONE,EMPTY,LHF,LHF_FULL</toggleList>
<defaultGetType>EMPTY</defaultGetType>
<pauseOnFull>false</pauseOnFull>
<cells>
<cell col="0" id="C3" row="0">
<tag>S3B</tag>
<putRouteId>S3P</putRouteId>
<getRouteId>S3G</getRouteId>
<completorId/>
<status>EMPTY</status>
</cell>
<cell col="0" id="C2" row="1">
<tag>S2B</tag>
<putRouteId>S2P</putRouteId>
<getRouteId>S2G</getRouteId>
<completorId/>
<status>EMPTY</status>
</cell>
<cell col="0" id="C1" row="2">
<tag>S1B</tag>
<putRouteId>S1P</putRouteId>
<getRouteId>S1G</getRouteId>
<completorId/>
<status>EMPTY</status>
</cell>
</cells>
</stagingArea>
<stagingAreas rev="116"\>
Delineates a staging area. The rev is used to track changes.
<use>true</use>
Enables or disables dynamic staging altogether. When disabled, the dynamic staging status window will be absent from the BotWay dashboard.
<useClosedLoop>false<useClosedLoop/>
Switches between open-loop mode when set to "false" and closed-loop mode when set to "true".
<fillFromStart>false</fillFromStart>
Specifies fill order. When set to true, begins filling the staging area by starting at row 0, column 0 in the top left; then, BotWay fills the cells left to right, top down. When set to "false," the staging area is filled from the bottom right, right to left, bottom up.
<inColor>-3342388</inColor>
Specifies color of the cell that is next in line to place a full LHF. Can be selected from within the "settings" window using a color selector instead.
<outColor>-3355393</outColor>
Specifies color of the cell that is next in line to have its LHF taken. Can be selected from within the "settings" window using a color selector instead.
<msgUnknown>Status Unknown</msgUnknown>
Specifies a message to display in the Dynamic staging window status banner when the status of the staging area is unknown. This example will display "Status Unknown."
<msgOk>OK</msgOk>
Specifies a message to display in the dynamic staging window status banner when there are no errors and the staging area is not full. This example will display "OK"
<colorOk/>
Specifies which color the status banner will appear when there are no errors and the staging area is not full. Can be selected from a color selector within the "settings" window.
<msgEmpty>Item Not Located</msgEmpty>
Specifies a message to display in the status banner when a robot attempts to perform a stageGet command when the staging area has no cells with the requested status. This example will display "Item Not Located."
<colorEmpty>-256</colorEmpty>
Specifies which color the status banner will appear when a robot attempts to perform a stageGet command when the staging area has no cells with the requested status. The color may be selected from within the "settings" window using a color selector instead.
<msgFull>All Cells Filled</msgFull>
Specifies a message to display in the status banner when none of the cells in the staging area are "empty." This example will display "All Cells Filled."
<colorFull>-65536</colorFull>
Specifies which color the status banner will appear when none of the cells in the staging area are "empty." The color may be selected from within the "settings" window with a color selector instead.
<toggleList>NONE,EMPTY,LHF,LHF_FULL</toggleList>
Lists all possible cell conditions. This is what will be displayed in the cells in the Dynamic Staging window in the BotWay Dashboard. These cells can be control clicked to cycle through the conditions in this list. There are only five acceptable entries in this section, four of which are enumerated here. The fifth option is LHF_PALLET. The user can remove any status that does not exist in their working environment, but they cannot add any new conditions past these five.
<pauseOnFull>false</pauseOnFull>
Pauses the job queue once the staging area is full when sat to "true," does not do so when set to "false."
<cell id="1" row="0" col="0"\>
Defines a single cell in a table used to display and control the status of the cart.
<tag>S3B</tag\>
Specifies the tag associated with this cell
<getRouteId>S3G</getRouteId\>
Specifies the route used to “get” a cart from this cell.
<putRouteId>S3P</putRouteId\>
Specifies the route used to “put” a cart into this cell.
<completorId>JobMon01.1</completorId\>
Specifies the button that is used to complete the job associated with the cell.
<status>EMPTY</status\>
Holds the current status of the cell. This is used for persistence between BotWay executions.
Dynamic Routing adds several BotWay commands that can be used in defining routes. They are all variations of the BotWay Action Command
<BotWay>{action:"StageGet", value:"L", data1="LHF"}</BotWay>
<BotWay>{action:"StagePut", value:"L", data1="EMPTY"}</BotWay>
<BotWay>{action:"StageSet", value:"1", data1="LHF_FULL"}</BotWay>
<BotWay>{action:"StageReturn"}</BotWay>
<BotWay>{action:"StageResume"}</BotWay>
NOTE: to use these commands, the robot must be in a "Hold 0" state! This way the robot will remain stopped until rerouted by BotWay.
StageGet: The StageGet command tells BotWay to reroute the current robot to an available cell in a staging area that contains a specific status. In the above command, BotWay will reroute the robot to a cell in Area "L" that has a status of "LHF". If using the stagingData.xml example, BotWay would determine that cell 2 has the correct status and would reroute the robot to route "LBG". To accomplish this, BotWay scans all the cells in the specified staging area and finds the first one with the specified status. If found, BotWay sends a Route Action command to the current robot using the cell's getRouteId. If a suitable cell is not found, no route will be issued and the robot will remain stopped. BotWay will continue to rescan the area and when a cell is available it will then send the route command.
StagePut: BotWay uses the same scanning logic as in the StageGet command, but instead reroutes the current robot using the cell's putRouteId. In the above command, BotWay will reroute the robot to a cell in Area "L" that has a status of "EMPTY". If using the stagingData.xml example, BotWay would determine that cell 1 has the correct status and would reroute the robot to route "LAP". To "Put" to the same cell as the Get command, see StageReturn.
StageSet: The StageSet command tells BotWay to update the status of the cell specified by value to the status specified by data1. Use this command to update the status after removing or storing a cart in the staging area. This is necessary so that BotWay knows the status of the staging area cells.
StageReturn The StageReturn command tells BotWay to reroute the robot to the same cell from which the robot retrieved the cart. Use this in place of StagePut to always return to the same cell that was used in the StageGet command. In the above command, BotWay will reroute the robot back to cell 2 using the cell's putRouteId, "LBP".
StageResume The StageResume command tells botway to reroute the robot to the same route it was on just before the StageGet command. Use this after retrieving the cart from the cell to resume delivering it to the desired station.
BotWay displays a table containing cells as defined in the stagingData.xml file. This table gives the user a view of the current status of all cells in the staging area. User selectable colors can be set to highlight the next Get and Put cells. Additionally, the table can be updated manually by clicking on the cell while holding the Control Key. Each click will update to the next status as defined by the <toggleList>
element of the <asar>
section in the BotWay.properties file. The images associated with each state are kept in the images folder. By default they are:
File | Image | Status |
---|---|---|
asar0.png | ![]() |
NONE |
--no file-- | EMPTY | |
asar1.png | ![]() |
LHF |
asar2.png | ![]() |
LHF_PALLET |
asar3.png | ![]() |
LHF_FULL |
Note: these images may be edited to suit the needs of the user.