Surgical robot for tracking and compensating bone movement, the robot comprising: a robot arm (3) and a tool guide (5) at the arm's end-effector, a tracker (1) attached to the robot arm at the same plane as the tool guide, the tracker comprising an assembly of articulated segments (1a-1d) and encoders (2) associated to the segments such that 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, that is, are on the same plane, so that the system is able to determine directly the exact positioning of the tool guide with respect to the tracked bone without any intermediate device. This way, an optical tracker and the associated cameras can be dispensed with.