# Task-Based Motion Planning Using Optimal Redundancy for a Minimally Actuated Robotic Arm
## 3 Workspace Analysis
### Optimal Link-Joint Assembly  
Our aim here was to determine which link-joint combination best executed a given pick-and-place task with minimal redundancy, i.e., with the smallest number of joints possible. In other words, the goal was to find the smallest workspace area that contains the set of targets to reach. To do so, we created an arm with the largest number of possible joints, and computed the workspace boundaries for each subset of joints in ascending order until all the targets were within the boundary. Initially, a preliminary search was performed with the maximal joint-combination (i.e., five active joints in this case) to verify whether the targets were within the arm's reach or not. If they could be reached, an iterative breadth-first search was launched. Initially, all two-joint combinations were examined; then, if no related workspace enclosed the targets, all three-joint combinations were examined and so on until a five-joint-combination was found. To determine whether a target was in the workspace, we used MATLAB's _inpolygon_ function. The maximal number of workspace computations \(C_{\text{max}}\) for an arm with \(N\) possible joints is given by:  
\[C_{\text{max}}=\sum_{k=2}^{N}\binom{N}{k} \tag{6}\]  
For example, take the case in which we were given two targets to reach with the following (\(x\),\(y\)) coordinates: (500,800) and (\(-700,-300\)). We tested the MASR arm with its maximal five-joint assembly configuration. \(C_{\text{max}}\) is 26 computing iterations, but it only took 11 to find the minimum combination (Figure 5f). Since each iteration consists of creating a cloud, calculating the boundary, and determining whether the targets were in it, it is highly important to compute the workspace with the minimal number of points (Table 1) to save on computational efforts. Using the superposition cloud points (Table 1) in this case was 44.3% faster than without the superposition (0.176 s and 0.316 s, respectively). As the maximal number of joints increases (i.e., as the redundancy increases), more iterations are needed for the subset scans, so that the superposition method becomes increasingly effective. Once the minimal subset of joints has been found, the modular arm is rebuilt with the associated links to create the minimally redundant manipulator for the task. In the current example, the fourth and fifth joints were the redundant ones, so that the optimal assembly (or minimal redundancy) was an arm consisting of three links with lengths of [20,20,60] cm. In the case of a non-modular arm, rebuilding would not be possible, and the motion plan would only consider the first three joints as the active ones.  
\begin{table}
\begin{tabular}{c c c c} \hline \multicolumn{4}{c}{**Points to Full Contour Coverage**} & **Reduction** \\ \multicolumn{1}{c}{**Number of Links**} & **Superposition** & **No Superposition** & **(\%)** \\  & **(\(\alpha\),B) = 0.1**(0.9) & **(\(\alpha\),\(\beta\)) = 0.43** & **(\%)** \\ \hline
2 & 1600 & 4950 & 67.7 \\ \hline
3 & 11,100 & 112,350 & 90.1 \\ \hline
4 & 56,950 & 267,200 & 78.7 \\ \hline
5 & 210,000 & 610,000 & 65.6 \\ \hline \end{tabular}
\end{table}
Table 1: Comparison of superposition and no superposition for the minimal number of points needed to achieve 99% coverage.