# Sampling-Based Path Planning Algorithm for a Plug & Produce Environment
## 1 Introduction
In MASs, the agent can communicate and negotiate with each other to complete a complex task. Figure 1 shows an overview of agent system communications with the robot (Figure 1 left) with the path planner service (Figure 1 right). Here, the parts and resources are agents which can have goals to achieve and skills to perform goals based on the software [13]. For example, if an industrial robot wants to transport a product from one place to another, the robot can be configured as a resource agent and the part to be moved can be configured as a part agent. In order to transport, path planning algorithms are  
Figure 1: Overview of agent system communications with the robot (**left**) and the path planner service (**right**) [11]. implemented, modelled as a path planner agent, which takes place online [11]. Each time a robot (configured as a resource agent) wants to transport, it requests the path planner for a path between the start and the goal point. Based on the request from the resource agent, the path planner agent checks for already-generated paths. If the path exists for the same point and the environment, the path planner agent will communicate that path to the resource agent, otherwise it generates a new path and communicates it. Since the resource agent must wait for the path planner agent to generate a path each time it wants to move, the computational time of the path-planning algorithm is crucial. For repeated path enquiries the resource agent gives a request to generate a path for the same starting and goal point with the same environment, and the path planner agent retrieves the path from the local memory of the agent system. This is one of the main advantages of implementing an agent-based path planner in production. Since the agent response time is critical in many applications, the move-along path time, speed of the robot, and energy consumed by each path are investigated in this article. Generally, in production, the algorithm that offers the lowest computational time is preferred, and the reason is that during the online application, if a path agent needs a long time to create a path, the other agents in the process must wait. On the other hand, if the process module has more obstacles or constraints, sometimes, the traditional Rapidly-Exploring Random Tree (RRT) algorithm fails to generate the path. It means that in certain cases, predefined sampling values in the algorithms may be higher than the configuration-free space (gap) between the obstacles. In these circumstances, the path planner must generate a path if it exists subjected to when the tool can travel between the gap of the obstacles. To address this issue, the research presented in this paper has focused on implementing different types of sampling-based path planning algorithms that are implemented and evaluated in real time with agent-based scenarios together with a standard industrial IRB 6700 robot, from the Zurich, Swedish manufacturer ABB The robot is configured as one of the agents (as a resource agent) in a multi-agent system to achieve higher flexibilities in Configurable Multiagent Systems (C-MAS). Here, the sampling-based algorithms are chosen because they provide probabilistic completeness, can be implemented in complex environments, are best suited for high-dimensional spaces, can handle kinematic constraints, and explore the search space until they find a solution to give the optimal result. Although it provides only probabilistic completeness, the efficiency and ease of implementation make these algorithms more common in applications like automobile and manufacturing industries, etc. [14]. The five algorithms evaluated in a P and P environment are RRT, adaptive RRT, PRM in combination with Dijkstra, RRT*, and adaptive RRT* algorithms. The adaptive RRT and adaptive RRT* algorithms are developed by the authors; these are novel versions of RRT and RRT* algorithms that automatically adapt their sampling value depending on the constraints present in the environment.