# Development of Autonomous Driving Patrol Robot for Improving Underground Mine Safety
## 2 Materials and Methods
### Autonomous Driving Algorithm and Software Configuration  
This study used the robot operating system (ROS) to develop an autonomous robot. The ROS is an open-source platform that can perform data transmission, data processing, and hardware connections. It can easily perform tasks such as visualization and simulation and can efficiently apply algorithms and libraries to autonomous driving systems [41]. Figure 4 shows the overall data flow of the autonomous driving algorithm used in this study [40]. The autonomous driving system acquires data from the sensors and processes it, plans the motion of the robot, and controls the motor used to move the robot. The position of the robot is estimated using odometry, AMCL algorithms, and measured data from the encoder sensors. The routes are planned based on previously prepared maps. At this time, the area in which the robot can be driven is selected through the local and global cost maps, and functions such as real-time obstacle avoidance, local path planning, and global path planning in a wide area are simultaneously implemented. In addition, the recovery vehicles return when the robot can no longer drive because of its proximity to an obstacle or failure in localization. Table 2 lists the representative topics used to implement the autonomous driving function in this study. The robot's location is estimated through the adaptive Monte Carlo localization (AMCL) algorithm, which compares and matches the previously prepared 2D map with the shape of the tunnel acquired in real time from the LiDAR sensor. AMCL estimates the robot's pose and location using a particle filter that utilizes particles with weights to stochastically represent uncertainty. Therefore, it is a method of estimating the optimal position of a robot by calculating the values of sensor data probabilistically. The position prediction particle of the robot may be expressed as Equations (1) and (2). \(X_{t}\) represents the pose of the robot predicted at time \(t\), and \(x_{t}[^{lm}]\) represents the probability of each of the M particle sets. Among the AMCL parameters, the minimum particle was set to 100, and the maximum particles were set to 5000. The resample interval was set to 1, and the transform  
Figure 4: System architecture of the ROS-based autonomous navigation system used in this study. tolerance was set to 0.3 [42]. Additionally, the number of particles used in the filter was set to 80, the resampling threshold was set to 0.5, and the linear and angular updates were set to 0.5. \[X_{t}=x_{t}{}^{[1]},\ x_{t}{}^{[2]},\ \ldots,\ x_{t}{}^{[m]} \tag{1}\]  
\[x_{t}{}^{[m]}\ \sim\ p(x_{t}{}\big{|}z_{1:t},\ u_{1:t}) \tag{2}\]  
In this study, the position of the robot was estimated by the encoder, and the IMU data were fused through EKF to improve position accuracy by correcting the rotation angle of the robot. When estimating the position of the robot using EKF, the values shown in Equation (3) are used. Here, X, Y, and Z represent the position of the robot; roll, pitch, and yaw represent the orientation in the x-, y-, and z-axis directions, respectively; and \(\dot{X},\dot{Y},\dot{Z}\) represent the linear velocity in the x-, y-, and z-axis directions, respectively. The symbols roll, pitch, and yaw represent angular velocity in the x, y, z direction, respectively, and \(\ddot{X}\), \(\ddot{Y}\), and \(\ddot{Z}\) represent a linear acceleration in the x, y, z direction, respectively. In this study, values for x and y were used to estimate the position of the robot in 2D, and values in the yaw direction were used from the IMU sensor. Since the rotation angle of the IMU data is reflected by applying the EKF-based position correction, the rotation angle error due to wheel slip can be corrected [42]. \[ \begin{pmatrix}\text{X}&\text{Y}&\text{Z}\\ \text{\emph{roll}}&\text{\emph{pitch}}&\text{\emph{yaw}}\\ \dot{X}&\dot{Y}&\dot{Z}\\ \text{\emph{roll}}&\text{\emph{pitch}}&\text{\emph{yaw}}\\ \ddot{X}&\ddot{Y}&\ddot{Z}\end{pmatrix}