## 2 Determining Vehicle Position
### Fusion of Wheels and Vision Signals  
This method of determining the position of a robot is exposed to errors, for example from the wheel slip. Additionally, the error of the currently determined position is the sum of all errors that have occurred since the beginning of the journey. To determine the relative position with correction determined according to the method presented above, a comparison of results from the vision system was used. A set of markers were placed into a workspace of the mobile robot, whose values and positions were known. The vision system sent information about numbers of currently detected markers and distance to them, to the robot controller. Then, based on the information received, correction was determined according to the following procedure. There were three cases.  
The first occurs when the vision system correctly recognizes one marker. This is shown schematically in Figure 4, where: **m**--vector determining the position of the marker, **p**--vector of the robot position determined from the odometry system, **p**--vector determining the corrected position of the robot, **v**--correction vector, \(\tau\)--distance from the marker obtained from the vision system. The corrected vehicle position is calculated as a point on a circle with a radius equal to the distance to the marker obtained from the vision system and the center point of the marker that is closest to the current vehicle position determined from the odometry system.  
The second case takes into account the situation when the vision system correctly detects two markers simultaneously (or the subsequent markers appear with a time interval smaller than 0.3 s). This is schematically illustrated in Figure 5, where: **m**\({}_{1}\)--vector defining the position of the marker \(i\), **p**--vector of the robot position determined from the odometry system, **p**\({}_{\mathbf{c}}\)--vector defining corrected robot position, **v**\({}_{\mathbf{c}}\)--correction vector, \(r_{i}\)--distance from the marker \(i\) obtained from the vision system. In this situation, the corrected robot position is in one of two places, which are the intersection of two circles with radii equal to vehicle distance from the markers and the centres lying in the markers point. The robot algorithm chooses the solution, which is closer to the robot's currently determined odometry position.  
The third case takes into account the situation when the vision system correctly detects three or more markers simultaneously (or the subsequent markers appear with a time interval smaller than 0.3 s). This is schematically illustrated in Figure 6, where the designations were adopted as in Figure 5. In this situation, three markers are selected. The corrected robot position is determined as the intersection of all three circles, with radii equal to the distance from the markers and with centres at the marker points.  
In the first case, that is, when only one marker is detected, the vehicle is located on a circle with a radius that is the distance of the vehicle to the marker. In this case, its position can be estimated. The vehicle is located on the arc of the circle closest to the position calculated from the wheels odometry. In the second case, after detecting two markers, the vehicle can be located in two positions, which are the intersections of circles determined by the distances to these markers. The closest intersection to the current vehicle position is selected. In the third case, the vehicle position is determined uniquely and the vehicle is located at the intersection of three circles. Corrected data is immediately sent to the robot control system and the tentative robot position is updated, but with provision, that the position taken from the vision system always has higher priority.  
Figure 4: Determination scheme of position correction vector when one marker is detected.  
Figure 5: Determination scheme of position correction vector when two markers are detected.