# Sampling-Based Path Planning Algorithm for a Plug & Produce Environment
## 3 Results  
All the tested algorithms were implemented in a Robotstudio simulation environment to generate a collision-free path. The generated paths were tested in real time with ABB IRB6700, which is configured with the industrial test bed applying the Plug & Produce concept shown in Figure 3. The created paths were tested for the feasibility of online implementation of path planning in MAS within a Plug & Produce environment. During the runtime when the path planner agent is generating a path, the other agents (e.g., resource agent) must wait online for the path planner agent to respond with the generated path, so the computational time of the algorithm is important to evaluate while running online applications in this environment. For the calculation of computational time, all the algorithms are simulated in DELL Intel(R) Core(TM) i7-8650U, CPU @ 1.90 GHz-2.11 GHz, Installed RAM 16.0 GB (15.9 GB usable), System type: 64-bit operating system, x64-based processor computer. Computational time varies depending on the number of obstacles present in the environment. Initially, all the algorithms were tested without any obstacles; then they were tested with two obstacles to make sure that the algorithms generated a successful path. Thereafter, the simulated algorithms were tested with the real Plug & Produce environment shown in Figure 3, and the energy consumed by each path was measured. As seen in Table 2, even though the environment is the same, the computational time differed largely between RRT to adaptive RRT, and from RRT\({}^{*}\) to adaptive RRT\({}^{*}\). The reason is that the adaptive RRT and adaptive RRT* algorithms are generating a greater number of nodes due to the additional collision module. If the environment has more constraints when the predefined sampling values in the algorithms may be higher than the configuration-free space (gap) between the obstacles, RRT and RRT* fail to generate the path, but in these circumstances, an adaptive RRT and adaptive RRT* are generating the path successfully. One kind of such scenario is simulated and tested, which is shown in Figure 4.  
The move-along time of each path is measured, the test repeated number of times, and the average values are centralized in Table 3. The time taken to move from the starting point to the goal point is also higher compared to the RRT algorithm due to the higher generation of the number of nodes. However, in the cases of RRT\({}^{*}\) and adaptive RRT*, one additional optimal step is incorporated to find the optimal path. Hence, the time taken to compute differs, but the time taken to move along the path is almost the same for all speeds for the optimal algorithms. The RRT and adaptive RRT algorithms are random path generators; even though they take less time to generate the path, they take longer time to complete the path. Computational time can be compensated in an online path planner by saving the generated paths for reuse. Thus, more focus is needed toward the move-along time of the path, which was generated by optimal algorithms, meaning that \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & **Environment** & **RRT** & **RRT\({}^{*}\)** & **Adaptive RRT** & **Adaptive RRT\({}^{*}\)** & **PRM** \\ \hline Average computational time (Secs) & Fewer constraints & 4.4 & 4.9 & 5.2 & 7.2 & 11.3 \\ \hline Average computational time (Secs) & More constraints & - & - & 11.6 & 11.7 & 25.6 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Average values of computational time are centralized. Figure 3: Plug & Produce concept-based industrial testbed at PTC, University West, Sweden (number 4 and 6 shows the corresponding process modules). with different speeds, the move-along time will vary. The purpose is to find the trade between the speed and the move-along time for online applications. Optimal algorithms are tested with the various zone values, such as FINE, Z100, Z150, and Z200. These zone values determine the position accuracy of the robot's TCP with a generated node in the path.