# Development of a Play-Tag Robot with Human-Robot Contact
## 2 Conventional Robotic System for Tag Play
### Robot's Basic Behavior  
The basic behavior of the robot is also the same as in ([PERSON] et al., 2018). When the robot is at the origin and the player is in the field, the robot's motion sequence is as follows:  
1. _Start tracking:_ From the origin, the robot monitors the area in front of the robot (detection area) using a Laser Range Finder (LRF) and starts tracking when the player is detected in the detection area.
2. _Player detection and tracking:_ The player's position is tracked using LRF, and the robot follows a virtual target on a virtual circle centered on the player. We reduce the possibility of collision by setting the virtual target on the opposite side of the the player's moving direction.
3. When the player enters the robot's touch range, the robot is regarded to touch the player.
4. After touching, the robot leaves in the direction opposite to the player's direction of movement.  
Control of the robot's trajectory is based on the person-following control ([PERSON] et al., 2018). The basic person-following method detects a person's position using an LRF. After detection, we control the angular velocities of the robot's wheels so that the robot approaches the target point ([PERSON] et al., 2018). We applied this control method to move the robot to an arbitrary point by setting a virtual target instead of the person's position.  
Of the steps shown above, 3 and 4 are outlined below. First, a region is set up around the robot, and the behavior of the robot is determined by which region the player to be tracked is in. This area is shown in Figure 1. When the target to be tracked is in \(A,B_{L},B_{R}\), or \(C\), the robot moves toward the contact point of the circle around the target. When the target enters \(D\), the robot considers that it has touched the target and enters a disengaging motion. When the subject enters area \(E\), the robot judges that it is too close and makes an emergency stop.  
When the robot approaches the player, the target point varies depending on the relative positions of the robot and the target player, as shown in Figure 2. If the player is in area \(B_{L}\), the right contact point of the circle around the subject is the tracking target (Figure 2a). Similarly, if the player is in area \(B_{R}\), the contact point on the left side is the target point (Figure 2c). If the player is in area A, the contact point in the direction opposite to the relative angular velocity of the target becomes the target (Figure 2b). This setup allows the robot to approach the target while reducing the possibility of collision between the robot and the target as much as possible.  
After the robot becomes close enough to the player and is considered to have touched it, it enters a disengagement motion from the target. There were two methods of disengagement: the onward mode and the parallel mode [26]. The onward mode is the simplest method, where the robot simply moves forward for two seconds. In the parallel mode, the robot moves to avoid the collision with the player, as shown in Figure 3. Let \(P\) be the position of the target at the moment of touching the target, and let \(\theta_{L}\) and \(\theta_{R}\) be the angles from two points at the edge of the circle of radius \(r\) around the robot to \(P\). The departure angle \(\theta_{W}\) is then determined as follows.  
\[\theta_{W}=\left\{\begin{array}{ll}\theta_{L}-90^{\circ}&\theta_{L}>\theta_ {R}\\ 90^{\circ}-\theta_{R}&otherwise\end{array}\right. \tag{1}\]  
After that, the robot disengages in the direction \(\theta_{W}\).  
Figure 1: The area around the robot. The radius of area \(E\) is 0.85 m, area \(D\) is 1.2 m, and area \(C\) is 1.7 m. \(A\) and \(B\) correspond to greater distances. In addition, \(A\), \(C\), and \(E\) are \(\pm 15\) degrees from the front.  
Figure 3: The robot disengaging the player (the parallel mode). The robot’s moving direction \(\theta_{w}\) is parallel to line \(YP\).  
Figure 2: Relative positions and target points of the robot and target.