A method for controlling a surgical device is provided. The method includes manipulating the surgical device to perform a procedure on a patient; determining whether a relationship between an anatomy of the patient and a position, an orientation, a velocity, and/or an acceleration of a surgical tool of the surgical device corresponds to a desired relationship between the anatomy and the position, the orientation, the velocity, and/or the acceleration of the surgical tool; and imposing a constraint on the surgical device if the relationship does not correspond to the desired relationship and/or a detection device is unable to detect a position of the anatomy and/or the position of the surgical tool.