# Human-Robot Cooperative Control Based on Virtual Fixture in Robot-Assisted Endoscopic Sinus Surgery
## 2 Robot Motion Constraint Model Based on Virtual Fixture
### Virtual Fixtures for Endoscopic Simus Surgery
#### 2.2.3 Forbidden Virtual Fixture Based on the Anatomical Structure of the Nasal Cavity  
When the robot end enters the inlet of the nasal cavity, due to the complex anatomy of the nasal cavity, the VF based on regular geometry (e.g., cylinder and cone) is used to constrain the movement of the robot, which will lose substantial precious operation space, and is not allowed during endoscopic sinus surgery. Therefore, in this section, a point cloud model is obtained based on the CT image sequence of the patient's nasal tissue, based on which an FRVF suitable for the nasal cavity is constructed. The boundary of the FRVF coincides with the boundary of the nasal tissue, thereby maximally retaining the operation space while protecting the nasal tissue.  
Figure 4 shows the schematic diagram of the FRVF based on the anatomical structure of the nasal cavity.  
The FRVF works as follows:  
1) Assuming that the position of the endoscope tip is \(P(x,y,z)\), the corresponding pixel point, \(Q(i,j,k)\), of the endoscope tip in the binarized point cloud model can be obtained as follows:  
\[i=\text{INT}((x-origin.x)/space.x) \tag{10}\]  
\[j=\text{INT}((y-origin.y)/space.y) \tag{11}\]  
\[k=\text{INT}((z-origin.z)/space.z) \tag{12}\]  
Figure 4: Schematic diagram of the FRVF based on the anatomical structure of the nasal cavity. (**a**) The point cloud model acquisition process, (**b**) the FRVF based on the anatomical structure of the nasal cavity.  
where \(origin.x\), \(origin.y\), and \(origin.z\) represent the origin coordinates of the binarized point cloud model of nasal tissue; \(space.x\), \(space.y\), and \(space.z\) represent the pixel spacing in the x, y, and z coordinate directions of the nasal tissue binarized point cloud model; and INT(0) represents the rounding function.  
2) Assuming that the search radius of the endoscope tip is \(R\), it can be determined that the local search range of the collision detection is:  
\[\tilde{i}=[-\text{INT}(R/space.x)+i,\text{INT}(R/space.x)+i] \tag{13}\]  
\[\tilde{j}=[-\text{INT}(R/space.y)+j,\text{INT}(R/space.y)+j] \tag{14}\]  
\[\tilde{k}=[-\text{INT}(R/space.z)+k,\text{INT}(R/space.z)+k] \tag{15}\]  
3) For the pixels in the local search range, the Euclidean distance from the pixels to the endoscope tip is calculated as follows:  
\[Distance=sqrt(\left((\tilde{i}-i)\text{-}space.x\right)^{2}+\left((\tilde{j}- j)\text{-}space.y\right)^{2}+\left((\tilde{k}-k)\text{-}space.z\right)^{2}) \tag{16}\]  
4) If the pixel value of the local pixel is 0, it indicates the pixel is a free spatial point and is shown with the black color in Figure 4. There is no collision in this case, the endoscope is in a free motion state, and the FRVF does not work. If the pixel value of the local pixel is 255, it indicates the pixel is a nasal tissue point and is shown with the white color in Figure 4. There is a collision in this case. Since the surface of the human nasal sinus is a thin layer of mucous membrane, considering the safety of the operation, the velocity of the endoscope is set to zero, which means the robot immediately stops moving, protecting the nasal tissue of the patient.