The disclosure relates to a robotic system for removing bony material from an anatomical structure of a patient, comprising:- a base (4),- an end effector (2) configured to hold a surgical tool (1),- an actuation unit (3) configured to translate the end effector relative to the base at least along one feed axis (A),- a control unit coupled to the actuation unit (3) and configured to turn off the tool (1) and command the actuation unit (3) to translate the end effector (2) along the feed axis (A) while the tool is turned off,the control unit comprising a feedback unit configured to measure a force exerted by the surgical tool (1) onto the anatomical structure during said translation of the end effector (2) and, based on the measured force, detect a contact of the tool with bony material of the anatomical structure.