# Coupled-Error-Based Formation Control for Rapid Formation Completion by Omni-Directional Robots
## 2 Target Multi-Robot System  
This paper proposes an algorithm considering robots equipped with a swerve drive mechanism [12; 13], where all four wheels are capable of steering. As depicted in Figure 3, the swerve drive allows each wheel to independently determine its direction, enabling omni-directional movement. The configuration of the swerve drive robot is illustrated in Figure 3.  
In Figure 3, \(L\) represents the distance between the front and rear wheels, \(W\) denotes the distance between the left and right wheels, \(v_{x}\) and \(v_{y}\) are the robot linear velocities in \(x\) and \(y\) directions, respectively, relative to the robot's coordinate system, and \(\omega\) is the angular velocity. \(v_{fl}\), \(v_{fr}\), \(v_{fl}\), and \(v_{rr}\) are linear velocities of wheels and the steering angles \(\xi_{fl}\), \(\xi_{fr}\), \(\xi_{rl}\), and \(\xi_{rr}\) represent the steering angles of the wheels, where the subscripts \(fl,fr\), \(rl\), and \(rr\) denote the front left, front right, rear left, and rear right wheels, respectively. \[a=-v_{y}+\omega L/2,\ b=-v_{y}-\omega L/2,\ c=v_{x}+\omega W/2,\ \text{and}\ d=v_{x}- \omega W/2, \tag{1}\]  
\[v_{fl}=\sqrt{b^{2}+d^{2}},\ v_{fr}=\sqrt{b^{2}+c^{2}},\ v_{rl}=\sqrt{a^{2}+d^ {2}},\ \text{and}\ v_{rr}=\sqrt{a^{2}+c^{2}} \tag{2}\]  
\[\xi_{fl}=atan2(b,d),\ \xi_{fr}=atan2(b,c),\ \xi_{rl}=atan2(a,d),\ \text{and}\ \xi_{ rr}=atan2(a,c), \tag{3}\]  
where \(-\pi\leq atan2(\cdot)<\pi\). By Equations (1)-(3), control input \(v_{x}\), \(v_{y}\), and \(\omega\) can be realized. Also, the omni-directional robot with the swerve drive mechanism can be described using the following kinematic model:  
\[ \begin{bmatrix}\dot{x}\\ \dot{y}\\ \dot{\theta}\end{bmatrix} = \begin{bmatrix}\ cos(\theta)&sin(\theta)&0\\ -sin(\theta)&cos(\theta)&0\\ 0&0&1\end{bmatrix}\begin{bmatrix}v_{x}\\ v_{y}\\ \omega\end{bmatrix}  \tag{4}\]  
In this paper, we assume that the orientation angle is controlled to zero degrees. This assumption can be realized by Equations (1)-(3). If \(\theta\)\(\rightarrow\)0, Equation (4) can be simplified as follows:  
\[\dot{x}=v_{x},\ \dot{y}=v_{y},\ \text{and}\ \dot{\theta}=\omega. \tag{5}\]  
Based on the assumption of Equation (5), a multi-robot system of the omni-directional robot system is configured as shown in Figure 4. In Figure 4, \((x_{i},y_{i})\) represents the position of the \(i\)-th robot, and \(\theta_{i}\) is the orientation angle. In this paper, the 0 th robot is used as the trajectory of the entire system, and the 1 st robot is designated as the leader. Through the assumptions stated, \(\theta_{i}\) is controlled to be \(\theta_{i}=0\). The target positions \((x_{i}^{d},y_{i}^{d})\) for the \(i\)-th robot are generated from the robot \(i-1\) as follows. Figure 3: The configuration of the swerve drive robot. \[x_{i}^{d}=x_{i-1}+L\cos(\psi),\ y_{i}^{d}=y_{i-1}+L\sin(\psi). \tag{6}\]  
Here, in the case of \(i=1\), the leader robot which tracks the trajectory, and the desired position (\(x_{i}^{d},y_{i}^{d}\)) is (\(x_{0}\), \(y_{0}\)). The position errors \(e_{i}^{x}\) and \(e_{i}^{y}\) are defined as follows. \[e_{i}^{x}=x_{i}^{d}-x_{i},\ e_{i}^{y}=y_{i}^{d}-y_{i}. \tag{7}\]  
As can be seen in Figure 4 and Equations (6) and (7), the \(i\)-th robot follows the desired position generated by the (\(i-1\))-th robot and simultaneously becomes the leader for the (\(i+1\))-th robot. The time derivatives of error variables in (7) are described in the following. \[ \begin{array}{ll}\dot{e}_{i}^{x}&=x_{i}^{d}-\dot{x}_{i}\\ &=\frac{d}{dt}\{x_{i-1}+Lcos(\psi)\}-v_{i}^{x}\\ &=v_{i-1}^{x}-v_{i}^{y}\end{array}  \tag{8a}\] \[ \begin{array}{ll}\dot{e}_{i}^{y}&=y_{i}^{d}-\dot{y}_{i}\\ &=\frac{d}{dt_{i}}\{y_{i-1}+Lsin(\psi)\}-v_{i}^{y}\\ &=v_{i-1}^{y}-v_{i}^{y}\end{array}  \tag{8b}\]  
where \(d\{Lcos(\psi)\}/dt=0\) and \(d\{Lsin(\psi)\}/dt=0\).