Surgical robot for tracking and compensating bone movement, said robot comprising: a robot arm (3) and a tool guide (5) at the arm's end-effector, as well as a tracker (1) attached to the robot arm in the same plane as the tool guide, said tracker comprising an assembly of articulated segments (1a-1d) and encoders (2) associated with the segments such that the movement of the tracker is allowed and monitored in at least six degrees of freedom. The tracker base and the tool guide share the same frame, i.e. the tracker base and tool guide are in the same plane, so that the system can directly determine the exact position of the tool guide with respect to the tracked bone without any intermediate device. In this way, an optical tracker and the associated cameras are not necessary.