## Materials and Methods
### Cooperative Human-Robot Interface  
We identified the following four repetitive activities during a common endonasal surgical operation: (1) positioning, (2) insertion, (3) manipulation, and (4) extraction. The surgeon first  
Figure 3: Definition of the coordinate frames on the proposed robotic surgical system.  
Figure 2: (**a**) The proposed robotic surgical system based on the SmartArm concept for endoscopic endonasal surgery (EES). (**b**) 4-DOF articulated forceps [27]. (**c**) 2-DOF articulated forceps.  
positioned the tip of the surgical instrument close to the nostril orifice and inserted the surgical instrument through the nasal cavity constrained by the nostril. Subsequently, once the target was reached, the surgeon performed a manipulation task. Finally, the instrument was extracted to replace the tool or finish the surgical procedure. In robot-assisted surgery, each activity would require a different level of assistance. From this observation, we define the following requirements for our human-robot interface as:  
1. Workspace constraints
2. Multiple levels of assistance
3. Intuitive and ergonomic operation
4. Safe and stable operation  
In this paper, we propose a hybrid human-robot cooperative interface designed to satisfy all these requirements. The proposed cooperative system was composed of a force based interface and a remote-controlled serial-link interface attached in a single device to control the position and the orientation of the articulated forceps. Different levels of assistance were provided by a state machine implemented with five states \(S_{n}\) (\(n\in\{1,...,5\}\)) depending on the current surgical task, as shown in Figure 4, where \(S_{1}\) is positioning, \(S_{2}\) is insertion, \(S_{3}\) is manipulation, \(S_{4}\) is extraction, and \(S_{5}\) is halt. First, the surgeon positioned the forceps from a neutral position to the nostril entrance (\(S_{1}\)) using the force based interface. Then, a virtual remote-center-of-motion (VRCM) was set at this location, which constrained the motion of the forceps during the subsequent insertion sequence (\(S_{2}\)). Once having reached the target zone, in the manipulation phase, the serial-link interface was used to control the articulated forceps tip motion and the robotic arm pose, simultaneously preserving the VRCM constraints (\(S_{3}\)). Finally, the forceps were extracted again using the force based interface (\(S_{4}\)). Once outside the nose, the VRCM was deactivated, and the robot could be freely positioned to a neutral position by the force based interface. As described above, the use of the interface was switched according to the state, where the force based interface was used during \(S_{1}\) (positioning), \(S_{2}\) (insertion), and \(S_{4}\) (extraction) and the remote-controlled interface was used during \(S_{3}\) (manipulation).  
Figure 4: State machine for surgical task characterization. The states defined are \(S_{1}\): positioning, \(S_{2}\): insertion, \(S_{3}\): manipulation, \(S_{4}\): extracting, and \(S_{5}\): halt. Transition states are represented with arrows: \(T_{1}\) and \(T_{2}\) are activated by the handle push-button; \(T_{3}\) is activated by the gripper push-button; and \(T_{4}\) is automatically activated when the tool is outside of the nostril. The virtual remote-center-of-motion (VRCM) position is set at the beginning of \(T_{1}\).