Method for setting more precisely a position and/or orientation of a device head, which is connected to a robot arm mounted on a working platform, in a measuring environment by means of a distance measuring device, which comprises a number of M, M ≥ 1 distance measuring sensors and which is connected to the device head, and a control device, which is connected in a communicating manner to the distance measuring device and at least two on-board sensor devices (14, 19), wherein the position and/or orientation of the device head is determined by means of the on-board sensor devices (14, 19) and transmitted to the control device, and a geometry model of the measuring environment is stored in the control device, characterized by a sequence of a first, second, third, fourth and fifth step, which is carried out N times, N ≥ 2, wherein: ▪ in the first step of the sequence, the device head is arranged in a measuring position (MP 1, MP 2, MP 3) in the measuring environment, and pose data are determined for the measuring position (MP 1, MP 2, MP 3), wherein the pose data for the measuring position (MP 1) of the first sequence are determined by means of the first on-board sensor device and the pose data for the measuring positions (MP 2, MP 3) of further sequences are determined by means of the first on-board sensor device and a further on-board sensor device, ▪ in the second step of the sequence, the distance measuring sensors carry out a distance measurement in relation to surfaces of the measuring environment and transmit their measured distance values (d m _j1, d m _j2, d m _j3) to the control device, ▪ in the third step of the sequence, the geometry model and the pose data for the measuring position (MP 1, MP 2, MP 3) are used to determine estimated distance values (d e _j1, d e _j2, d e _j3) corresponding to the measured distance values (d m _j1, d m _j2, d m _j3), ▪ in the fourth step of the sequence, the deviations (Δ j1, Δ j2, Δ j3) between the measured distance values (d m _j1, d m _j2, d m _j3) and the corresponding estimated distance values (d e _j1, d e _j2, d e _j3) are calculated and stored as error values (Δ j1, Δ j2, Δ j3), and ▪ in the fifth step, the number of error values is compared with a minimum number (A min), wherein, in the event that the number of error values is less than the minimum number (A min), the device head is moved from the measuring position (MP 1, MP 2) into a new measuring position (MP 2, MP 3) and the sequence of the first to fifth steps is carried out for the new measuring position (MP 2, MP 3), and in the event that the number of error values is greater than or equal to the minimum number (A min), the error values (Δ j1, Δ j2, A j3) are used to carry out an error minimization for the position and/or orientation of the device head and the position and/or orientation of the device head is set more precisely by the control device. ▪ in the first step of the sequence, the device head is arranged in a measuring position (MP 1, MP 2, MP 3) in the measuring environment, and pose data are determined for the measuring position (MP 1, MP 2, MP 3), wherein the pose data for the measuring position (MP 1) of the first sequence are determined by means of the first on-board sensor device and the pose data for the measuring positions (MP 2, MP 3) of further sequences are determined by means of the first on-board sensor device and a further on-board sensor device, ▪ in the second step of the sequence, the distance measuring sensors carry out a distance measurement in relation to surfaces of the measuring environment and transmit their measured distance values (d m _j1, d m _j2, d m _j3) to the control device, ▪ in the third step of the sequence, the geometry model and the pose data for the measuring position (MP 1, MP 2, MP 3) are used to determine estimated distance values (d e _j1, d e _j2, d e _j3) corresponding to the measured distance values (d m _j1, d m _j2, d m _j3), ▪ in the fourth step of the sequence, the deviations (Δ j1, Δ j2, Δ j3) between the measured distance values (d m _j1, d m _j2, d m _j3) and the corresponding estimated distance values (d e _j1, d e _j2, d e _j3) are calculated and stored as error values (Δ j1, Δ j2, Δ j3), and ▪ in the fifth step, the number of error values is compared with a minimum number (A min),