## 4 Results
### Threshold-Based--Experimental Results
#### 4.1.2 Orientation Results  
Another task that seemed interesting to test with the setup is the orientation of packages. As examples of the system's application, slightly different tests were carried out \begin{table}
\begin{tabular}{c c c c c c c c c} \hline  & **tm1 [s]** & \multicolumn{3}{c}{**tm2 [s]**} & \multicolumn{3}{c}{**tm3 [s]**} & \multicolumn{3}{c}{**tm4 [s]**} \\ \hline  & \(\mu\) & \(\sigma\) & \(\mu\) & \(\sigma\) & \(\mu\) & \(\sigma\) & \(\mu\) & \(\sigma\) \\ \hline Box A & \(4.70\times 10^{-4}\) & \(6.96\times 10^{-5}\) & \(1.94\times 10^{-2}\) & \(1.64\times 10^{-3}\) & \(1.44\times 10^{-2}\) & \(5.49\times 10^{-3}\) & \(4.05\times 10^{-2}\) & \(7.75\times 10^{-3}\) \\ \hline Box B & \(4.31\times 10^{-4}\) & \(1.96\times 10^{-5}\) & \(1.83\times 10^{-2}\) & \(5.96\times 10^{-4}\) & \(1.26\times 10^{-2}\) & \(5.42\times 10^{-3}\) & \(3.57\times 10^{-2}\) & \(6.10\times 10^{-3}\) \\ \hline \end{tabular}
\end{table} 
Table 2: Times during the actuation after optimization resulting from 30 sorting operations, 15 for CS1 and 15 for CS2 [22]. Figure 8: Sorting trajectories during CS2, for the two types of boxes: Box A (white) in (**a**), and Box B (red) in (**b**) [22]. Figure 7: Sorting trajectories during CS1, for the two types of boxes: Box A (white) in (**a**), and Box B (red) in (**b**) [22]. based on the type of Box, while the mass and the inclination inputs remained the same (\(\gamma=8^{\circ}\), m = 7.5 kg). The package was supposed to be reoriented by \(\theta=90^{\circ}\)for Box A and by \(\theta=45^{\circ}\)for Box B. The way the modules are arranged differs from the assignments that have been shown so far. In the earlier testing, the changes were always made by columns, meaning that one column or a group of columns was different from the rest, assuming that the layout consists of two rows and six columns of modules. On the other hand, in this case, the modules' orientation differs by row. In actual use, the modules of the lower row (Figure 9) had their axis parallel to the line (\(0^{\circ}\)) activated for the packages to rotate (clockwise in the tests recorded), while the top ones remained free. This makes sure that the package on the inclined surface comes into contact with areas of increased friction, which serve as pivots and allow for easier rotation around them. As soon as the package enters the designated ROI, tag monitoring begins, and therefore sorting. Here, the orientation variation is tracked by looking at the line that connects the tag's two corners and how its orientation varies with respect to the \(x\) axis once the tag's ID has been distinguished. When the angle reaches, frame by frame, the desired value, the system simultaneously blocks two axes of the free row modules plus the \(90^{\circ}\)axis of the already actuated row ones, so that all the spheres are blocked and the orientation stops. The speed (\(\dot{\theta}\)), angular acceleration (\(\ddot{\theta}\)) and the time elapsed per frame (\(t_{f}\simeq\)**tm4**, without the message back _Arduino-Matlab_) are also included in the angle estimation, which, considering the initial orientation value as 0, is \(\theta=\theta_{0}+\dot{\theta}\cdot t_{f}+0.5\cdot\dot{\theta}\cdot\dot{t}_{f}^ {2}\) (to anticipate the next iteration). Figures 9a and 10a illustrate the poses of the tags and the trajectories taken with the same markers and colors as the previous operations outcomes. For this case, an extra red circular marker was added to one corner of the tag to graphically clarify the magnitude and direction of the rotation. For the quantitative depiction, Figures 9b and 10b describe the desired angle \(\theta_{d}\) and the trend of the angle \(\theta\) over time, respectively, for Box A and Box B. As seen from both pairs of images, the re-orientations are accomplished with minimal margins of error, i.e., \(\theta=94^{\circ}\)instead of \(\theta_{d}=90^{\circ}\)and \(\theta=43^{\circ}\)instead of \(\theta_{d}=45^{\circ}\)(both relative percentage errors: 4.4%).