A robotic surgical system comprising: robotic arm; an end effector; a force sensor on the robotic arm; a surgical instrument guide (310, 314) attached to the robotic arm, wherein the surgical instrument guide defines a trajectory comprising a location and an orientation for insertion of a medical implant in a vertebra of a patient, and wherein the surgical instrument guide comprises a dilator (310, 314) configured to be inserted through an incision of tissue and configured to provide a working channel for the medical implant; and a processor programmed to: store a planned trajectory based on the trajectory of the surgical instrument guide at a defined time; after the planned trajectory is defined, detect, via the force sensor, movement of the surgical instrument guide towards the vertebra; constrain and/or maintain an orientation of the surgical instrument guide along the planned trajectory as the surgical instrument guide is moved through an incision to a surface of the vertebra; maintain a position of the surgical instrument guide as a surgeon passes a drill through the surgical instrument guide and drills a hole in the vertebra; and constrain and/or maintain an orientation of the surgical instrument guide along the planned trajectory as the surgical instrument guide is moved away from the vertebra. robotic arm; an end effector; a force sensor on the robotic arm; a surgical instrument guide (310, 314) attached to the robotic arm, wherein the surgical instrument guide defines a trajectory comprising a location and an orientation for insertion of a medical implant in a vertebra of a patient, and wherein the surgical instrument guide comprises a dilator (310, 314) configured to be inserted through an incision of tissue and configured to provide a working channel for the medical implant; and a processor programmed to: store a planned trajectory based on the trajectory of the surgical instrument guide at a defined time; after the planned trajectory is defined, detect, via the force sensor, movement of the surgical instrument guide towards the vertebra; constrain and/or maintain an orientation of the surgical instrument guide along the planned trajectory as the surgical instrument guide is moved through an incision to a surface of the vertebra; maintain a position of the surgical instrument guide as a surgeon passes a drill through the surgical instrument guide and drills a hole in the vertebra; and constrain and/or maintain an orientation of the surgical instrument guide along the planned trajectory as the surgical instrument guide is moved away from the vertebra. store a planned trajectory based on the trajectory of the surgical instrument guide at a defined time; after the planned trajectory is defined, detect, via the force sensor, movement of the surgical instrument guide towards the vertebra; constrain and/or maintain an orientation of the surgical instrument guide along the planned trajectory as the surgical instrument guide is moved through an incision to a surface of the vertebra; maintain a position of the surgical instrument guide as a surgeon passes a drill through the surgical instrument guide and drills a hole in the vertebra; and constrain and/or maintain an orientation of the surgical instrument guide along the planned trajectory as the surgical instrument guide is moved away from the vertebra.