# Guessing Human Intentions to Avoid Dangerous Situations in Caregiving Robots
## 4 Experimental Results
### Validation of the Approach
#### 4.2.1 Situation Analysis and Decision-Making Test  
The first experiment consisted of 180 initializations of the nominal scenario, letting the robot analyze the situation and decide which action to take. The sampled variables were the positions of the robot, the ball, and the person. The range of positions used in all cases was a 1.5 m radius. The human always followed a direct trajectory towards the couch at a constant speed of 0.5 m/s. Figure 4 shows the different elements involved in the experiment. The graph in the upper-left shows the current state of \(\mathcal{W}\) with the robot node labeled Shadow at the center. The perceived objects and the person were connected to the robot with \(RT\) edges that stored an \(SE(2)\) geometric transformation. The rest of the edges were 2-place logic predicates representing perceived relationships between nodes. In this example, a has_intention edge connects the person to their intended destination, and a collision node signals that they may implement their intention via an unsafe path. At the top right, the contents of \(\mathcal{W}\) are graphically displayed. The person is represented by a yellow circle connected to a green cone, which limits their field of view. Two paths connect the person to the couch. One of the paths crosses the obstacle, represented as a red box, indicating a possible collision. The couch is drawn as a green box. The robot is depicted twice, in red occupying its starting position and in light green occupying the imagined position that will make the person change their path. The lower left image is a zenithal view of the scene, and the right image shows the PyBullet scene used to simulate the robot and the person traversing the paths. Table 1 shows the results of 180 runs with the Webots simulator. Of the total number of experiments, 13 were discarded due to the absence of detected intentions. Considering the remaining experiments (167), the proposed intention-guessing algorithm provided an accuracy rate of 79.64%. The primary source of loss of accuracy was the detection of false positives. This means that the robot wrongly detected some risk  
Figure 4: Combined view showing the contents of \(\mathcal{W}\) (**up-left**); a 2D graphical representation of \(\mathcal{W}\) with two paths going from the person to the couch (**up-right**), the yellow path represents the route that would take the person directly to the couch without seeing the obstacle, while the red path shows the alternative route when the robot is moved; a zenithal view of the scene as rendered by [PERSON] (**down-left**); and a 3D view of the internal simulator, PyBullet, with simple geometric forms representing the elements in the scene (**down-right**). in reality, not pose a danger to the person. The primary causes of these false positives were the inaccurate sizes of the shapes representing the person and the obstacles in the internal simulator, as well as the errors in the estimations of real distances due to noise in the LiDAR measurements. Nevertheless, the algorithm did not produce false negatives, i.e., all the unsafe intentions were correctly identified by the robot and no risky situation was left unattended. Both facts can also be derived from the resulting precision and recall values. Given the consequences of failing to detect jeopardized intentions, recall can be considered more vital than precision. Taking this into consideration, we measured F1 and F2 scores [32]. While the obtained F1 score was moderately high, reaching a value of approximately 0.76, the F2 score indicated a high level of effectiveness. Regarding the time metrics, the mean reaction time, which is the period from detecting a possible collision to the appearance of an action that can avoid it, was less than 0.75 s. The experiment suggested that an under one second response time is sufficient for real-time operation in this scenario. Additionally, the robot could generate an action that prevented the person from colliding in most situations detected as risky.