A surgical system includes a bed extending along a main direction, a robotic arm disposed adjacent to the bed, and a surgical guide attached to the robotic arm. The bed has a table top to support a patient, the robotic arm is controllable to move in relation to the body of the patient; and the surgical guide is capable of holding a surgical instrument and measuring a translation of the surgical instrument as it moves through the surgical guide. The robotic arm is configured to position the surgical guide to a desired position in relation to a target area of the patient.