-
Notifications
You must be signed in to change notification settings - Fork 4
Home
This folder contains development scripts testing out an automated warehouse project.
A 250 robot automated warehouse was deployed to two locations for 1-3 months. One was Google Cloud Kubernetes for 1 month, and another as Docker containers on a GCE instance for 3 months (Then stopped after the test was confirmed to save on billing costs).
What all goes into logistics? I explore this by building a simulated automated warehouse and the systems needed to consolidate orders with multiple agents.
We first assume a spherical cow / 2D grid world layout for the warehouse, we will have N robots that can move items from load zones to stations, and then a system for tracking incoming Orders and fulfilling them with those Robots.
This breaks up into two parts, the algorithm side (Multi-Agent Path Finding - MAPF) and the logistics/database side (inventory management system / automated warehouse).
Closeup of a small example warehouse
media_automated_warehouse_example5.mp4
The automated warehouse project utilizes a system of Orders
, Tasks
, and Jobs
managed by a Robot Allocator
, which assigns Robots
to transport Items
from Item Zones
to Stations
for assembly and order fulfillment.
The Inventory Management System manages Orders, Stations and Tasks. (Kubernetes specific architecture here)
sequenceDiagram
autonumber
participant IMS as Inventory Database
participant OP as Order Processor
Note over OP,IMS : Process orders and assign Tasks
IMS-->>OP: Get open Orders and their Tasks
loop for each order
alt New order
OP->>IMS: Create Tasks for Order
else Station available
OP->>OP: Assign available station
OP->>IMS: Set Order in progress
else Order complete
OP->>OP: Set Station available
end
end
Then the World Simulator manages the simulated world, robot positions and paths, and updates regularly
sequenceDiagram
autonumber
participant WS as World Sim
participant WD as World Database
loop Update every time step
activate WS
WD-->>WS: Get robots
loop For each robot
WS->>WS: simulate moving robot if it has a path
end
WS->>WD: Set new robot positions
deactivate WS
end
The Robot Allocator creates and manages jobs to complete tasks from the inventory management system, assigning robots and sending paths to the world database.
sequenceDiagram
autonumber
participant RA as Robot Allocator
participant WD as World Database
participant IMS as Inventory Database
Note left of RA: World Sim Notifies world updated
Note over RA,IMS: Get available robots, tasks
WD-->>RA: Get robots
IMS-->>RA: Get Open Tasks
Note over RA,IMS: Assign available Robot to open Task if they exist
opt Robot available and open Task exist
RA->>RA: Create Job : Assign Task to Robot
RA->>IMS: Set Task in progress
RA->>WD: Set Robot in progress
end
Note over RA,IMS: Process active jobs
loop For each job
alt Job start
RA->>WD: Generate Robot path to item pickup zone
else Item picked
RA->>WD: Generate Robot path to station drop-off zone
else Item delivered
RA->>WD: Generate Robot path to home
else Robot returned home
RA->>RA: Finish Job
RA->>IMS: Set Task complete
RA->>WD: Set Robot available
end
end
1,000 robots running live on dev machine
aw_1k.mp4
200 robots running live on a Google Cloud instance.
Desktop.2023.06.26.-.12.58.24.05.2.mp4
- Orders are comprised of various combinations of Items that need to be picked up and assembled.
- Items are located in designated Item Zones within the Warehouse.
- Stations are responsible for processing Orders. An Order is considered complete once all its associated Items have been delivered to the Station through a series of Tasks.
- The Warehouse contains multiple Stations for gathering and assembling Items to fulfill Orders.
- Robots are responsible for transporting Items from the Item Zones to the Stations within the Warehouse.
- Tasks represent the delivery of a specified quantity of an Item to a Station.
- Each Robot is assigned a single Job, which involves moving one Item to a Station.
- The Robot Allocator generates Jobs based on outstanding Tasks and assigns them to available Robots.
- As Robots complete their Jobs, the corresponding Tasks are fulfilled, eventually leading to the completion of Orders. Once an Order is completed, the Station becomes available for a new Order.
- This process continues indefinitely as new Orders are received and processed.
A python module for tracking creating and tracking Orders, Items, Stations, and Tasks.
MAPF Multiagent Planner
A python module for finding paths in a 2D grid world for singular and multiple agents without collisions.
A node module for seeing a live view of the tables of Orders/Stations and their status as they get completed.
media_automated_warehouse_example5.mp4
media_automated_warehouse_example4.mp4
Simulates the environment and robots.
Manages Robot states and assigns Tasks to them, updating the warehouse as needed
Manages open orders, assigns to stations, creates tasks, etc.
- Either on kubernetes/minkube with
kubectl apply -f <kubernetes folder>
, more info here -
docker compose up
on local or GCE instance docker with thedocker_compose.yaml
file. - Locally and individually for dev testing, shown below
Run commands from this dev
folder.
Either use the all-in-one start_warehouse.bat
or individually start it with the following commands.
Start order processor and reset the inventory management database:
python -m inventory_management_system.order_processor reset
Start the world simulator
python -m world_sim
Run the order/station live visualizer (Need flask installed)
flask --app inventory_management_system.order_tracking_web_server --debug run
Run the world (the robots, zones,etc. on a 2D grid) live visualizer
node env_visualizer
Create fake orders with:
python -m inventory_management_system.fake_order_sender
Using the python unit testing framework.
python -m unittest
sequenceDiagram
participant OrderProcessor as Order Processor
participant Database as Database
participant RobotAllocator as Robot Allocator
participant Robot as Robot
participant ItemZone as Item Zone
participant Station as Station
OrderProcessor->>Database: Check for available Orders
Database->>OrderProcessor: Return available Orders
loop Process Orders
OrderProcessor->>Database: Create Task entries for Order
RobotAllocator->>Database: Query Task entries
Database->>RobotAllocator: Return available Tasks
RobotAllocator->>Robot: Assign Jobs based on Tasks
loop Pick and Deliver Items
Robot->>ItemZone: Pick Items
Robot->>Station: Deliver Items
end
Station->>Database: Update Task completion
Database->>OrderProcessor: Update Order Progress
end
OrderProcessor->>Station: Order Completed, Free Station