The position of a robot 10 relative to other robots, such as mobile surgical robots 10, 11, and relative to an operating table 12 is calibrated by teaching the robot to learn its relative position by touching a visible reference mark or datum 70 on its arm 20 onto a pair of datums 71,72 on table 12 and datums 73,74 on the arm 40 of another robot 1, to avoid collisions in use. A distance between a reference location defined in a frame of reference local to the robot and the first object datum is calculated by means of drivers and position sensors of a flexible arm extending from a base of the robot, and the arm is reconfigured in dependence on the calculated distance. The object datum may alternatively be moved to a known point offset from the object datum point, for example to a point of intersecting optical beams, or the arm datum 70 may be configured to mate with its corresponding object datum to positionally orientate itself.