## 2 Modeling of the Snake-Like Robot Switching Side-Slipping Passively
### Constraint Forces to Prevent Side-Slipping  
In this section, the constraint forces to prevent side-slipping of the passive wheels of the snake-like robot are derived. [PERSON] utilized the Linear Complementarity Problem (LCP) [44] to formulate these. However, they also noted that there was an issue of high computation times preventing efficient real-time control [46]. To overcome this issue in this paper, the constraint forces to prevent passive wheel side-slipping are formulated by extending the constraint matrix derived using the Projection Method. First, the constraint matrix is extended. Second, using the extended constraint matrix, the constraint forces to prevent side-slipping are formulated. Finally, by utilizing the formulated constraint forces, Equation (7) is extended.  
First, the constraint matrix of the system is extended. As shown in Figure 1, let the constraint force in the axial direction and maximum static frictional force of \(i\)-th link be denoted by \(f_{ni}\) and \(f_{max}\), respectively. In the axial direction of the passive wheel of a snake-like robot, the constraint forces preventing side-slipping from occurring satisfy the following condition,  
\[v_{yi}=0\ \ \cap\ \ f_{ni}\leq f_{max},\ \ (i=1,\ \cdots,\ 5).\]  
In the above equation, as \(v_{yi}=0,\ (i=1,\ \cdots,\ 5)\) can be described as non-holonomic constraints, we define the following new constraint matrix,  
\[\mathbf{C_{n}} =\begin{bmatrix}\mathbf{C_{n1}^{T}}&\mathbf{C_{n2}^{T}}&\mathbf{C_{n3}^{T}}& \mathbf{C_{n4}^{T}}&\mathbf{C_{n5}^{T}}\end{bmatrix}^{T},\] \[\mathbf{C_{ni}} =\begin{cases}\frac{\alpha v_{yi}}{4\beta t},&(v_{yi}=0\ \ \cap\ f_{ni}\leq f_{max}),\\ \mathcal{O},&(\text{others}),\end{cases}\qquad(i=1,\ \cdots,\ 5).\]  
Moreover, both the constraint matrix of the system and the Lagrange multipliers, as the constraint forces of the system are extended as \(\mathbf{C}^{\prime}=\begin{bmatrix}\mathbf{C}^{T}&\mathbf{C_{n}^{T}}\end{bmatrix}^{T}\) and \(\mathbf{\lambda}^{\prime}=\begin{bmatrix}\mathbf{\lambda}^{T}&\mathbf{\lambda}^{T}_{n} \end{bmatrix}^{T}\), respectively; note that \(\mathbf{\lambda_{n}}\) represents the constraint force to prevent side-slipping. By utilizing the extended constraint matrix and the Projection method, the extended constraint force \(\mathbf{\lambda}^{\prime}\), including the constraint forces to prevent side-slipping \(\mathbf{\lambda_{n}}\), is formulated as follows,  
\[\mathbf{\lambda}^{\prime}=(\mathbf{C}^{\prime}\mathbf{M}^{-1}\mathbf{C}^{\prime T})^{-1}\mathbf{C }^{\prime}(\dot{D}\dot{\mathbf{q}}-\mathbf{M}^{-1}\mathbf{h}).\]  
Finally, by utilizing the formulated constraint force in the axial direction, Equation (7) is extended. The motion (6) in the quasi-velocity coordinate is extended, as follows:  
\[\mathbf{M}\dot{\mathbf{v}}=\mathbf{h}+\mathbf{C}^{\prime}\mathbf{\lambda}^{\prime}. \tag{8}\]  
Note that (8) is equivalent to the dynamics model of the snake-like robot without side-slipping, unless any link is side-slipping. By projecting (8) into the tangent speed space, by utilizing the complementary orthogonal matrix \(\mathbf{D}\), we obtain the extended dynamics model shown in (9):  
\[\mathbf{D}^{T}\mathbf{MD}\ddot{\mathbf{q}}+\mathbf{D}^{T}\mathbf{MD}\dot{\mathbf{q}}=\mathbf{D}^{T}\mathbf{h}+ \mathbf{D}^{T}\mathbf{C}_{n}^{T}\mathbf{\lambda_{n}}. \tag{9}\]