A controller for controlling a manipulator system that comprises a manipulator having a movable section provided at a distal end, a tube into which the manipulator is insertable, and a slider to which the manipulator is attachable, the manipulator system causing the movable section to protrude from, and to be withdrawn into, the tube by advancing/retreating the slider, wherein the controller is configured to:
- receive a signal indicating whether a predetermined portion of the manipulator protrudes from a distal end of the tube,
- based on the received signal, control the slider to move the manipulator distally to a position where an entirety of the movable section protrudes from the distal end of the insertion section;
- and
- based on the received signal, control the slider to restrict a motion of the manipulator from moving proximally from the position.