A non-transitory computer-readable storage medium storing a program for controlling an endoluminal device in an endoluminal device system including the endoluminal device configured to be inserted into a lumen and a contact detection device configured to detect contact of an object, the program causing a computer to at least:
- in response to a first detection by the contact detection device of a first motion of an object in contact with a contact detection device, determine that a user performed a first manipulation;
- in response to determining that the user performed the first manipulation, perform a shape control process of controlling a drive device to change a shape of at least a part of the endoluminal device;
- in response to a second detection by the contact detection device of a second motion of the object while the object is continuously in contact with the contact detection device after the first manipulation starts, determine that the user performed a second manipulation;
- and
- in response to determining that the user performed the second manipulation, perform a first control process of controlling the drive device to maintain the changed shape of the at least a part of the endoluminal device.