System and method for performing a surgical procedure using a drill guide and a robotic device operable in multiple modes. The drill guide is mechanically coupled to the robotic device. A pre-defined virtual trajectory constrains movement of the drill guide. In a first mode, a user is able to manually manipulate the drill guide while movement of the drill guide is constrained by the pre-defined virtual trajectory. In a second mode, the robotic device operates autonomously, for instance, to perform service on the robotic device.