# Automatic Optimal Robotic Base Placement for Collaborative Industrial Robotic Car Painting
## 3 Pre-Processing: Point Cloud Rendering and Ellipsoidal Fitting  
In this section, we devise a numerical algorithm for the point cloud rendering of the reachable workspace of the forearms of the robotic arms and fit 3D ellipsoids to these point clouds. The 3D computations in this section can be considered as the pre-processing stage and need to be run only once. Figure 3: The CAD model of an example vehicle (Ford Motor Company F-150 truck). We consider a team of \(M\) painting robots, each equipped with an articulated RRR arm (see the assumptions in Section 2). We describe the base positions of the robots relative to a common coordinate frame rigidly attached to the factory floor/ceiling. Note that some robotic arm manufacturers, such as FANUC with their R-2000 iC/220U model (see [35]), offer flip-over capability. This allows for ceiling installation in work cells unsuitable for floor or wall mounting, accommodating narrower cell designs. Without loss of generality, we consider the robots to be floor-mounted and assume that the floor coincides with the plane \(z=0\). Accordingly, we can express the base positions as  
\[\mathbf{p}^{i}=\left[p_{x,i},\;p_{y,i},\;0\right]^{\top}\in\mathbb{R}^{3},\;1 \leq i\leq M, \tag{1}\]  
where \(i\) is the enumeration index for the robotic arms. In the base placement problem, the coordinates \(p_{x,i}\) and \(p_{y,i},\;1\leq i\leq M\), are unknown and are determined through the optimal base placement algorithm. Let \(\theta_{k}^{i}\) represent the angular position of the \(k\)th joint angle of the \(i\)th robot, where \(1\leq i\leq M\) and \(1\leq k\leq 3\). The joint angle vector for the \(i\)th robot is then expressed as  
\[\boldsymbol{\theta}^{i}:=\left[\theta_{1}^{i},\;\theta_{2}^{i},\;\theta_{3}^{ i}\right]^{\top}, \tag{2}\]  
where \(\theta_{k,\min}^{i}\leq\theta_{k}^{i}\leq\theta_{k,\max}^{i}\). Specifically, the constant angles \(\theta_{k,\min}^{i}\) and \(\theta_{k,\max}^{i}\) represent the minimum and maximum joint angle limits, respectively, for the \(k\)th joint of the \(i\)th robot (e.g., see [31] for limit values of the ABB IRB 4600). **Point Cloud Generation:** To determine the reachable volume of each robot's forearm, we employ the Denavit-Hartenberg parameters for the first three joints and forward kinematics mapping of the robot. Specifically, the forearm tip position \(\mathbf{t}^{i}\in\mathbb{R}^{3}\) of the \(i\)th robot with its base at \(\mathbf{p}^{i}\in\mathbb{R}^{3}\) on the factory floor/ceiling, \(1\leq i\leq M\), can be computed from the forward kinematics mapping \(T^{i}\left(\boldsymbol{\theta}^{i}\right)\in\mathbb{R}^{4\times 4}\). This mapping relates the first three joint angles to the forearm tip's orientation and position. The forearm positions can be expressed as  
\[ \begin{bmatrix}\mathbf{t}^{i}(\boldsymbol{\theta}^{i},\mathbf{p}^{i})\\ 1\end{bmatrix} =T^{i}(\boldsymbol{\theta}^{i}) \begin{bmatrix}0\\ 0\\ 0\\ 1\end{bmatrix} + \begin{bmatrix}\mathbf{p}^{i}\\ 0\end{bmatrix} ,\;1\leq i\leq M. \tag{3}\]  
To maintain generality for any RRR industrial manipulator (see the assumptions in Section 2), we approximate reachable forearm spaces using a sampling-based numerical approach. Unlike analytical or geometric methods (e.g., [36]), sampling techniques (see, e.g., [37; 38; 39]) generate 3D point clouds amenable to efficient [PERSON]'s algorithm [40; 41]. It is remarked that while \(\beta\)-distribution or Gaussian growth-based sampling algorithms ([37; 42]) are also viable options for workspace point cloud generation, uniform joint position sampling proved sufficient for our car-painting base placement application. The reachable volume of the \(i\)th, where \(1\leq i\leq M\), robot forearm tip is represented by a 3D point cloud.