<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dual Robot Parcel Sorting System]]></title><description><![CDATA[Dual Robot Parcel Sorting System]]></description><link>https://dualbot.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 11:57:35 GMT</lastBuildDate><atom:link href="https://dualbot.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[A* for my Project]]></title><description><![CDATA[Introduction:I saw the growing requirement for warehouse robotics for work to be done more efficiently in factories and in manufacturing. One place it can be used in is moving items from one location to another without human interaction. I had an ide...]]></description><link>https://dualbot.hashnode.dev/a-for-my-project</link><guid isPermaLink="true">https://dualbot.hashnode.dev/a-for-my-project</guid><dc:creator><![CDATA[Sreeram Padmesh]]></dc:creator><pubDate>Fri, 16 May 2025 16:27:28 GMT</pubDate><content:encoded><![CDATA[<p><strong>Introduction:</strong><br />I saw the growing requirement for warehouse robotics for work to be done more efficiently in factories and in manufacturing. One place it can be used in is moving items from one location to another without human interaction. I had an idea to work on helping the process of delivery become more efficient by creating a virtual 2D environment to visualize the work flow of this simple job.<br />I created a simulation of two robots working alongside each other simultaneously to deliver parcels at three specified locations to load them into trucks for shipping. I used a 2D 20×20 units grid world to visualize the environment and added obstacles to check for collision avoidance with walls or other robots.</p>
<p><strong>Under the hood:</strong><br />A parcel with an ID AXXXX, where “A” in “AXXXX” could be “A”, “B” or “C” and “XXXX” could be numbers 0001 to 9999, is randomly generated at the pickup point every 4 seconds. The ID determines which delivery point the robot should drop the parcel at according to the first letter. The pickup point can hold a maximum of 5 parcels; if this limit is reached, new parcels are not generated until space becomes available, effectively creating a task queue for pending parcels.<br />The nearest idle robot is determined by finding the distance between the robot and the pick up point - using Manhattan Distance. Then, the selected robot moves towards the pick up point to receive the parcel and gets assigned a task to drop the parcel off at the specified location. The robot moves towards the drop off location via the shortest distance while avoiding obstacles and the other robot on its way. Each delivery point can store up to 20 parcels, which are loaded into trucks for shipping making parcel count at delivery point 0 again. After it has dropped the parcel, it moves towards a waiting point near the pick up point for efficient parcel movement.</p>
<p><strong>Path Planning using A* Algorithm:</strong><br />Robot navigation is handled using the A* (A-star) algorithm, chosen because it balances between:<br />- Greedy search, which is fast but not always optimal, and<br />- Dijkstra’s algorithm, which is optimal but slow.<br />A* combines the benefits of both by evaluating nodes with the formula:<br /><strong>f(n) = g(n) + h(n)</strong><br />where:<br />- <strong>g(n)</strong> is the actual cost from the start node to node <em>n</em>,<br />- <strong>h(n)</strong> is the heuristic estimated cost from <em>n</em> to the goal.<br />In this grid world, the heuristic <em>h(n)</em> is the <strong>Manhattan Distance</strong>:<br /><strong>h(n) = |x₁ - x₂| + |y₁ - y₂|</strong><br />since diagonal movement is not allowed (robots can only move up, down, left, and right).<br />The path is recalculated each time a robot receives a new task, with awareness of all static obstacles and the predicted path of the other robot to avoid future collisions.</p>
<p><strong>State Management:</strong><br />Each robot uses a state machine to transition between:<br />- idle<br />- moving<br />- picking_up<br />- delivering<br />- returning<br />Parcels also maintain state transitions from <em>waiting → picked → delivered</em>. This architecture simplifies task management and makes the simulation visually easy to interpret.</p>
<p><strong>Avoiding Collisions and Oscillations:</strong><br />To prevent oscillation, where two robots might continuously switch places or block each other, I implemented a system where:<br />- A robot cannot enter a cell that is part of another robot’s current path.<br />- If a conflict is detected, the robot waits briefly and replans.</p>
<p><strong>Future Work:</strong><br />I will be increasing the number of robots and the number of pickup and delivery points with dynamic obstacles to reflect a more realistic situation. The use of RL can make this project work in a 2D continuous environment where all robots are allowed to move in any 2D direction possible which gives a chance to find an even shorter path towards a target position.</p>
<p><strong>Conclusion:</strong><br />Overall, this simulation serves as a prototype for warehouse automation systems involving autonomous robots performing intelligent task allocation and efficient navigation.</p>
]]></content:encoded></item></channel></rss>