1. A method for calibrating a robot, wherein the robot includes a movable part with a calibration marker, the method comprising: positioning the calibration marker in a plurality of positions along an optical line of a camera unit; imaging the calibration marker at the plurality of positions along the optical line to establish line positions P 1. .. P N of the calibration marker along the optical line within a tolerance k, while monitoring joint values j 1. .. j M of the robot; establishing an error function based on resulting calculated robot positions P′ 1. .. P′ N for the calibration marker for joint values j 1. .. j M at each line position P 1. .. P N for the calibration marker; identifying a set of robot kinematic parameters by solving an optimization problem based on the error function; and updating a kinematic model of the robot by means of the identified set of robot kinematic parameters.