BotWay Getting Started Level 2: Virtual AGVs, Job Queues and Buttons. - ResgreenGroup/Botway-Documentation GitHub Wiki
Current Location Home -> Getting Started 2
This section details some of the more advanced configuration options the user can modify in BotWay like job queues, job definitions, button definitions, and peripheral devices
Tags can be turned into traffic stops. Making a tag into a traffic stop will allow BotWay to direct multiple mobile robots and reduce gridlock. When a robot arrives at a traffic stop, its command must contain the "stop" value; for Freds, this is "maneuver":"1" and for BigBuddies, this is "act":"H". If the robot command does not contain the segment that directs it to stop, the robot will not obey traffic. Traffic stops are created with a list of tags called a locklist. This list contains every tag that has priority over the traffic stop. When a mobile robot is stopped at a traffic stop, it reports its position to BotWay and BotWay checks the occupancy status of every tag in the locklist. Botway only sends a go if none of the locklist tags are occupied. Traffic stops are normally used when a mobile robot enters an assembly station or is on a tributary to the main track.
Sign in as admin, click the edit button in the map display toolbar, then click the "Show All" checkbox in the traffic status section of the dashboard. This enables traffic editing and shows all traffic stops and their dependent tags. This should be empty for a new instance of BotWay.
Click anywhere in the traffic status table, then click the "Add" button to open the traffic stop creation dialogue window. Fill in the "Tag" field with the name of the traffic stop and fill in the "Locklist" field with the IDs of the tags that will have priority over this traffic stop; these tags are referred to as dependent tags. The dialogue window will only recognize tags that are currently in the tag map. If a tag is not present on the map and its ID is entered to the dialogue window, then BotWay will disable saving and display the message "This tag does not exist."
Click "Update," then click "Save" in the toolbar to finalize changes. Click on a row in the traffic status table to highlight the traffic stop and all of its dependent tags in the map display. When a row in the traffic status table is selected, the "Edit" and "Remove" buttons become clickable. The "Edit" button opens the same dialogue window, but it is prefilled with whatever existing traffic stop was selected. The "Remove" button can be used to revert a traffic stop to a normal tag. NOTE: change the command associated with a reverted traffic stop to no longer hold the robot, as now it will never receive a "Go" if the robot stops there.
BotWay checks traffic several times a second. The traffic status table will show highlights over a traffic stop and its dependent tags based on occupancy status. If a mobile robot is at a traffic stop and no dependent tags are occupied, then the traffic stop cell will be highlighted in green. If a dependent tag is occupied, the dependent tag cell will be highlighted in green, and the traffic stop cell will be highlighted in red.
Image: Entering Traffic mode by initializing a traffic stop.
Image: Add Traffic stop dialogue window
Image: Existing traffic stop selected.
Image: Editing existing traffic stop.
Job queues are important methods of distributing tasks to robots automatically.
To set up a job queue, sign in as admin and click the "Edit" button, then the "Options" button, then the "Queues" button from the dropdown menu. This opens the "Queues Configuration" dialogue window. Add a queue by clicking the "Add" button in the top half of the window, then filling in the queue name and the queue list type. The list type determines how jobs are handed out for that queue: List-type hands out jobs in sequential order based on a list of created stations, Random-type hands out jobs to random stations, and RR-type orders each station by priority, with each station moving to the bottom of the priority list when the robot at it takes a job. Once the fields in the top half of the window are filled in, click "Save." The queue will appear in the top of the right sidebar in BotWay.
Once the queue is created, it will appear in the list in the top half of the queue creation window. Click on the queue, then click "Add" in the bottom half of the window to add a station to the selected queue. Fill in the tag name and return route for the station. The return route is the route that robots must be on in order to complete a job from this queue. Click "Save" in the bottom half of the window to save the station to the selected queue. To change the order of the stations for a queue, click on a station and then click the "Priority" button. This will switch the position of the selected station and the station above it; this is important for the list type queue. When list queues need to hand out a job, BotWay will check this list and go from top to bottom, handing out the job to the first available robot. Finally, close the dialogue window and click the "Save" button in the toolbar.
Job Queues have several buttons in their toolbars. The "add" button allows direct addition of defined jobs to the queue. The job must be defined in the "Job Defs" section in order to do this. Job Defs are defined in the next section. The remove button allows removal of one or more jobs from the queue; click and drag to select multiple jobs, then click the "remove" button. The status button allows manual assignmnet of job status. Select a job, then click the status button. The status can be changed to "Queues," "Staged," "Active," "Completed." The number for completed jobs kept in the queue can be changed in BotWay's settings menu. By default, this value is 0. The "Set Priority" button is used to move a job to the top of the queue manually. Click a job, then click the "set Priority" button to move the job to the front of the queue: it will be taken next.
BotWay will place jobs into job queues and distribute them to mobile robots that have a "stop" or "charge" action at one of the queue's stations. Jobs can be customized in the "job defs" dialogue window which will be described in the next section.
Image: Queues creation dialogue window.
In BotWay versions 2.7.0 or later, Job definitions were given their own configuration window. Log in as admin, click the "options" button, then the "Job Defs" item in the dropdown menu. The job creation dialogue window will appear. To create a job, fill out all of the information and click "save" in the tool bar of the dialogue window.
- Queue: specifies the queue that this job will appear in when an instance of it is created.
- Priority: optional property. This allows jobs with higher priorities to be distributed first if jobs with different relative priorities are present in a queue at the same time
- Type: determines how many instances of this job definition can be running or queued at the same time. Consecutive jobs can have unlimited queued jobs, but only one set to active at a time. Concurrent jobs can have unlimited jobs queued and unlimited jobs active at the same time. Exclusive jobs can only have one job queued and one job active at a time.
- Start route and tag: Start tag is an obsolete term that has been replaced by stations. Start route is the route that robots will switch to when they receive an instance of this job
- End route and tag: When a robot that has taken an instance of this job reports the combination of end route and end tag, the job switches from active to its "status at end" which is described later
- Start status: Can be either staged or active. Staged jobs are jobs that have been assigned to a robot, but that are not yet active and require a release command from a BotWay button. If this is set to "active," the robot that received the job instance will depart immediately on the start route.
- Status at end: Can be either staged or completed. When a robot reaches the end tag for this job while on the end route for this job, the job status will change to whatever this property is set to. If this property is set to "Staged," the job will require a button press to complete them. If this is set to "Completed," it will not. Completed jobs do not count towards the number of queued or active jobs for purposes of type restrictions.
- Completor ID and number: The device ID and button number that will complete a staged job. Must be defined in the BotWay Buttons interface which is described in the next section.
- Staged time limit: Number of seconds that a job can be staged before being considered late. Staged jobs appear yellow and late jobs appear red on the RGRobotix jobMonitor tablet application
When making a job definition. BotWay will highlight the next required Job instances can be added to queues directly by using the add button in the queue toolbar. up to 98 jobs can be added at a time in this way. Alternatively, a job creation button can be defined in BotWay's buttons dialogue window. When this button is pressed, a job will be added to the queue in BotWay.
Image: New job definition.
Image: Fully filled out job definition.
BotWay Button definitions are used to direct BotWay to do things when a signal from a device is received. Devices can be physical or virtual. Log in as Admin and click the "Edit" button in the map display toolbar, then click the "Buttons" option. This opens the button dialogue window. Click the "Add" button to create a new button definition. Each button requires a type, device ID, and a button number. The button types and what they do are listed below:
- Job Add: Associates a job definition with a button press. When the device ID's button number is pressed, an instance of the associated job definition will be added to that job's queue in the "queued" status.
- Job Complete: This does not need any configuration. The ID and Button number need to match those of a job definition Completor ID. These button types change the job status of a job from "staged" to "completed" if the job definition status at end is set to "staged."
- Release: These buttons are used to give route changes and go commands to mobile robots at one or more tags. When this button is pressed, any mobile robot at one of the specified tags will have its route changed to the release route and then be given go commands.
- Pause Jobs: Stops job handling for a single queue, specified in the queue name dropdown menu, on button press
- Resume Jobs: Continues job handling for a single queue, specified in the queue name dropdown menu, on button press
- Trigger: These buttons definitions an interact with BotWay's Trigger functionality. Triggers are discussed in a later section. To learn more about triggers, visit the triggers page. There is no configuration for this button.
- Stop All: There is no configuration for this button definition. This type of button stops job handling in all created job queues when pressed.
- Job Status: This type of button definition changes job status at a single tag, usually a station. These buttons are usually for changing jobs that start as "staged" to "active," But it can change jobs to any job status. This button targets a station, BotWay checks the job of the Robot at that station, changes its job status, and gives it a go command if the "give go" toggle is checked.
- Action: These Buttons tell a target robot to do something if that mobile robot is at one of a specified set of tags. The action is only carried out if the mobile robot is located at one of the specified tags; otherwise, nothing happens. The action field must be filled by a command segment that has proper JSON syntax and is enclosed in curly braces. The target field prefills with connected mobile robots, and the Tags field should be filled with a selection of tags or a tag range (two tag numbers separated with a hyphen. Tag range logic is the same as that for creating tags in the tags dialogue window).
When creating A button definition, BotWay will highlight the next required field in yellow. BotWay will not allow the button definition to be saved until all required information is filled in. RGRobotix sells physical Buttons that can be configured to communicate via MQTT broker to BotWay. They are available here. RGRobotix is also able to create custom tablet applications to serve as buttons upon request.
Reference the Accessories Wireless connection instructions page for instructions on connecting buttons to BotWay.
BotWay also has a virtual button that can be connected and run just like a virtual robot. Open the VirtualDevice.properties file in a text editor like Notepad++. Input the IP address of the machine running BotWay. The port should be 1883. If the user has changed the MQTT port, then the port should be whatever it was changed to. Save the file and open virtualDevice.jar. Set the name of the device in the "Serial #" box, the click the "connect" button.
Image: Incomplete buttons dialogue window.