Releases: abel-gr/warehouse-robot
v1.2.1
Unity Simulation
The Unity simulation consists of multiple robots that work collaboratively to collect boxes from a warehouse and transport them to the unloading area. To efficiently collect the boxes, scripts have been implemented that allow the robots to be controlled as a swarm to assign to each task the optimal robot depending on some metrics and a training system that modifies the weights of the formula of assignment to get the optimal results. In addition, each robot is completely autonomous and has functions for calculating and following optimal routes, detection, and prevention of collisions, and many more functionalities that can be read in the section of the wiki dedicated exclusively to Unity.
Coppelia Simulation
In CoppeliaSim we made a realistic robotics simulation combining Computer Vision and Robotics techniques to create a robot that is able to carry two packages at the same time and identify them. Ideal for warehouses or factories.
Website & Google APIs
A website has been created for this project in order to manage the stock of the warehouse where the swarm operates. You can also create orders for the robots with your own voice or with a web interface that we have designed.
To make possible some of the functionalities of this website, several Google Cloud APIs have been used. To publish the web we have used the Firebase Hosting service.
🌍 The WarehouseWorker Control Web
You can read all the documentation of this release on the repository wiki.
Unity simulation v1.1
The Unity simulation consists of multiple robots that work collaboratively to collect boxes from a warehouse and transport them to the unloading area. To efficiently collect the boxes, scripts have been implemented that allow the robots to be controlled as a swarm to assign to each task the optimal robot depending on some metrics and a training system that modifies the weights of the formula of assignment to get the optimal results. In addition, each robot is completely autonomous and has functions for calculating and following optimal routes, detection and prevention of collisions and many more functionalities that can be read below.
Below the summary of the functionalities you will find more detailed information about each of the implemented scripts.
Table of contents
- Simulation features
- Coordinated robot swarm
- Nodes with a single direction of circulation
- Autonomous robots
- Scalable robot arm script
- Scripts information
- Robot.cs
- Warehouse.cs
- Warehouse_orders.cs
- Warehouse_shelf.cs
- Warehouse_node.cs
- OptimalRoute.cs
- Robot_rightSensor.cs
- NodesRow.cs
- Robot_arm.cs
- Warehouse_training.cs
- CameraControl.cs
- Robot_actuator.cs
- Warehouse_box.cs
- Robot_wheels.cs
Simulation features
Coordinated robot swarm
The robots are assigned in a coordinated way to collect the different boxes from the warehouse with strategies that minimize the distances that each robot must collect. A formula numerically determines which robot is the most suitable among those available to be assigned to pick up a box.
In addition, a script has been implemented that can be activated to carry out automatic training to search the weights that minimize the total time of the collection of boxes from the warehouse between all the robots. When the training mode is enabled, after a certain number of orders processed by the robots, the weights of the formula used to determine which robot is the most suitable for picking an order are modified in each iteration. It repeats the process numerous times and saves the optimal values that minimize the total order processing time in PlayerPrefs so that they persist after execution and can be used again.
If you want to add more robots to the swarm, all you have to do is to add the prefab of the robot that we have designed to the Unity scene all the times you want. All the scripts automatically detect in their start all the robots that are in the warehouse so there is no need to modify any line of code when adding new robots thanks to the scalable design we have made of our scripts.
Nodes with a single direction of circulation
The warehouse is mapped as a directed graph. To make the warehouse instantly scalable without the need to make changes to existing systems, the information of the nodes is summarized in 4 simple variables: 2 integers and 2 booleans. The two integers symbolize the set of nodes to which each node belong and is connected, and the two booleans indicate whether the X and Z direction to be followed at that node is positive or negative. In this way, the edges are not really saved anywhere, but our algorithm knows quickly and efficiently which nodes are connected, and which directions those connections are allowed. There is more information about these four variables in the Warehouse_node.cs script section below this page.
As a result of implementing this system, the generation of edges of the nodes is completely automated and scalable, and it also incorporates into the warehouse that the nodes have a single direction of circulation, avoiding possible head-on collisions between robots.
In addition, these 4 variables can be changed quickly from the Unity Inspector of the Node's GameObject in case you want to modify the mapping of the warehouse. You can also add new nodes without having to specify the edges one by one. You just have to modify the four variables that we indicated. In this way, the warehouse and its node mapping are scalable almost instantly and very comfortably, and the robots will be able to circulate through the new nodes without a problem. The script that calculates the optimal routes between nodes will take into account the new nodes, their edge connections, and their driving directions. And all this without the need to modify a single line of code by the user, thanks to the scalable design that we have made of all our scripts.
Autonomous robots
All robots have scripts for calculating optimal routes between the different nodes and they can follow the optimal route made up of different nodes to go from any point of the warehouse to any other. In case the robot is not in any node because it was outside the warehouse (for example if the robot is charging its battery and it is outside), the robot detects that it is not in any node and automatically finds the location of the closest node and goes towards it.
Each robot is implemented to be able to work independently and alone in case the swarm did not exist. What the swarm script really does is, once it has determined which robot should be assigned to a task and a location, it calls the robot script's own functions. When it assigns a robot to pick up an order, it changes the robot status to OnWayToPick to ensure that it does not accept any other tasks until it is finished (more information about this process in the Warehouse_orders.cs section and the Robot.cs section below this page).
Proximity sensors have been simulated through triggers and box colliders that allow robots to stop when they detect that they have a robot in front of them. In addition, they also stop giving priority to the robots that they detect on their right. Head-on collisions cannot occur because all nodes have a single direction of driving.
The robot also obtains the angle between its direction and the vector of the location it wants to go and automatically rotates the necessary degrees to always head straight to the target location.
For more realism, servomotors and wheels have also been simulated to rotate depending on the same speed variable at which the robot moves, so that the faster the robot moves, the faster its wheels also rotate. You can find extra information about the operation of the wheels and their safety lock conditions in the section of the Robot_wheels.cs script of this page.
Each robot has a state that allows the other scripts to know what they can and cannot do with them, as well as the robot itself blocks or allows certain actions in each state. For example, the robotic arm is locked in all states except in the PickingUp state. The robot can only receive new tasks in the Available state. Also, in the PickingUp, RampGoingDown, Unloading, and RampGoingUp states, the rotation of the robot and wheels is automatically locked. For more information about the robot states, its safety restrictions, and its transitions, you can refer to the Robot.cs section below.
The robot is highly customizable and most of its variables can be modified directly from the Unity inspector, including its speed of movement, its speed of rotation, and its maximum load capacity among others.
Scalable robot arm script
A fully scalable robotic arm control script has been designed so all the desired joints and axes can be easily added by quickly editing the game object settings from the Unity inspector. Allows you to configure each axis by adjusting its axes of rotation, its minimum and maximum angles, its rotation speed, and its associated Transform Object.
A simulation of a pneumatic actuator has been incorporated that is capable of picking up boxes and storing them into the robot basket.
More information about the robotic arm and the actuator can be found on the Robot_arm.cs section and the Robot_actuator.cs section below this page.
Unloading ramp
When the robots detect that they have reached their maximum box load capacity, if they are in the Available state, they automatically change their state to OnWayToDrop and go to the unloading zone. There, the robots unload the boxes smoothly with its rotatable ramp on a conveyor belt that takes them to a large container. You can read much more detailed information about this process and robot state changes in the Robot.cs script section further down this page.
Scripts information
Robot.cs
Contains all the procedures that control the basic behavior of the robot. With only this script the robot is able to work by itself. It contains the functions that allow the robot to move to the location of a certain node, as well as to follow a certain node path.
Before going to each node, the robot obtains the angle between its direction and the vector of the location it wants to go and automatically rotates the necessary degrees to always head straight to the target location and to go always forward to the target. We allow the robots to know their own position in the Unity simulati...