# Modeling the Dynamics of Two Cooperating Robots
## 2 Description of the Kinematics of Two Robots in the Beam Transport Task  
This study assumed that two mobile robots transporting a beam move on a flat surface. It was assumed that the beam is fixed at points \(H_{1}\) and \(H_{2}\) outside the wheel axis (Figure 1). The robot wheels are non-deformable and will not skid longitudinally (spinning) or transversely (drift). The vector of generalized coordinates was adopted in the form of \(\boldsymbol{q}=\left[ \begin{array}{cccccccc}x_{M}&y_{M}&\varphi&\beta_{1}& \alpha_{11}&\alpha_{21}&\beta_{2}&\alpha_{12}&\alpha_{22}\end{array} \right]^{T}\) and the vector of generalized velocities \(\dot{\boldsymbol{q}}=\left[ \begin{array}{cccccccc}\dot{x}_{M}&\dot{y}_{M}& \dot{\varphi}&\dot{\beta}_{1}&\dot{\alpha}_{11}&\dot{\alpha}_{21}&\dot{\beta}_{ 2}&\dot{\alpha}_{12}&\dot{\alpha}_{22}\end{array} \right]^{T}\). The physical meaning of the individual variables is as follows: \(x_{M}\), \(y_{M}\)--coordinates of the characteristic point of the beam being transported in the \(xy\) system; \(\varphi\)--beam rotation angle in the \(xy\) plane; \(\beta_{1}\) and \(\beta_{2}\)--angles of rotation of the frames of robots 1 and 2, respectively; \(\alpha_{11}\) and \(\alpha_{21}\)--angles of rotation of robot 1 wheels; \(\alpha_{12}\) and \(\alpha_{22}\)--angles of rotation of robot 2's wheels. The equation describing the kinematics is presented as follows:  
\[\boldsymbol{J}(\boldsymbol{q})\dot{\boldsymbol{q}}=\boldsymbol{0}, \tag{1}\]  
The Jacobian has the following form:  
Figure 1: Diagram of the formation of robots transporting the beam. \[ \begin{array}{l}\mathbf{J}(\mathbf{q})=\left[\begin{array}{cccccc}1&0&0&0&-\frac{r}{4l_ {1}}(l_{1}\cos\beta_{1}-l_{3}\sin\beta_{1})&-\frac{r}{4l_{1}}(l_{1}\cos\beta_{1 }+l_{3}\sin\beta_{1})\\ 0&1&0&0&-\frac{r}{4l_{1}}(l_{1}\sin\beta_{1}+l_{3}\cos\beta_{1})&-\frac{r}{4l_ {1}}(l_{1}\sin\beta_{1}-l_{3}\cos\beta_{1})\\ 0&0&1&0&\frac{r}{2l}\left(\sin(\varphi-\beta_{1})-\frac{l_{3}}{l_{1}}\cos( \varphi-\beta_{1})\right)&\frac{r}{2l}\left(\sin(\varphi-\beta_{1})+\frac{l_{ 3}}{l_{1}}\cos(\varphi-\beta_{1})\right)\\ 0&0&0&1&-\frac{r}{2l_{1}}&\frac{r}{2l_{1}}\\ 0&0&0&0&0\\ 0&-\frac{r}{4l_{1}}(l_{1}\cos\beta_{2}-l_{3}\sin\beta_{2})&-\frac{r}{4l_{1}} (l_{1}\cos\beta_{2}+l_{3}\sin\beta_{2})\\ 0&-\frac{r}{4l_{1}}(l_{1}\sin\beta_{2}+l_{3}\cos\beta_{2})&-\frac{r}{4l_{1}} (l_{1}\sin\beta_{2}-l_{3}\cos\beta_{2})\\ 0&\frac{r}{2l}\left(-\sin(\varphi-\beta_{2})+\frac{l_{3}}{l_{1}}\cos(\varphi- \beta_{2})\right)&\frac{r}{2l}\left(-\sin(\varphi-\beta_{2})-\frac{l_{3}}{l_{1 }}\cos(\varphi-\beta_{2})\right)\\ 0&0&0\\ 1&-\frac{r}{2l_{1}}&\frac{r}{2l_{1}}\end{array}\right],\end{array}  \tag{2}\]  
where \(r\) is the radius of robot wheels, \(l_{1}\) is the distance between the robot's center (point \(A\)) and the wheel, and \(l_{3}\) is the distance between the beam attachment point (point \(H\)) and point \(A\). Out of nine generalized coordinates, only four are controllable coordinates. These are the angles of rotation of the wheels that drive the robots, forming the vector of controllable coordinates \(\mathbf{q}_{N}=\left[ \begin{array}{cccc}\alpha_{11}&\alpha_{21}&\alpha_{12}& \alpha_{22}\end{array} \right]^{T}\). The relationship between generalized velocities and controlled velocities \(\dot{\mathbf{q}}_{N}=\left[ \begin{array}{cccc}\dot{\mathbf{x}}_{11}&\dot{\mathbf{x}}_{2 1}&\dot{\mathbf{x}}_{12}&\dot{\mathbf{x}}_{22}\end{array} \right]^{T}\) is written as:  
\[\dot{\mathbf{q}}=\mathbf{D}\dot{\mathbf{q}}_{N}, \tag{3}\]  
where matrix \(\mathbf{D}\) has the following form:  
\[\mathbf{D}=\left[