# Evaluating the Robot Inclusivity of Buildings Based on Surface Unevenness
## 2 Evaluating Robot Inclusivity
### Measuring Surface Unevenness Using IMU  
Surface unevenness can be the result of various factors in a building environment. There are three main distinguishing factors: surface inclinations, steps, and surface roughness. The unevenness of the surface causes vibrations that moves the robot along the three-dimensional axes. An IMU can be used to continuously measure these data. Figure 1: (**a**) Localization drift caused by an uneven surface and the robot following an incorrect path; (**b**) Map boundary distortion caused by an uneven surface. While the robot navigates through the environment, the IMU sensors collect the orientation as quaternion (\(q\)) data, linear accelerations (\(a\)), and angular velocities (\(\omega\)) along the three axes. Algorithm 1 details the use of IMU data to measure the surface unevenness as a single parameter. ```
Input: IMUData Output: UI \(n\leftarrow\) buffer_size \(\alpha\leftarrow\) filter_factor while Robot navigates do  Call IMU_data endwhile function IMU_data(q,a,\(\omega\)) \(q_{f},q_{f},\omega_{f}\leftarrow\) FilteringNoise(\(q,a,\omega\)) \((\psi,\theta,\phi)\leftarrow\)EulerAngleConverter(\(q_{f}\)) \(|a|\leftarrow\sqrt{(l_{1}a_{x})^{2}+(l_{2}q_{y})^{2}+(l_{3}a_{z})^{2}}\) \(|\omega|\leftarrow\sqrt{(l_{4}l_{x})^{2}+(l_{5}l_{y})^{2}+(l_{6}l_{z})^{2}}\)  Call BufferLoader  Call UnevenessCalculator endfunctionfunctionBufferLoader(\(\psi,\theta,\phi,|a|,|\omega|\)) forno. of data points \(<\) buffersize do  buffer_array \(\leftarrow\) load data  return buffer_array endfor endfunctionfunctionUnverennessIndexCalculator  Calculate standard deviation buffer_array \(U\leftarrow\sigma_{\psi}+\sigma_{\theta}+\sigma_{\phi}+\sigma_{|a|}+\sigma_{| \omega|}+f\) endfunction
```  
**Algorithm 1** Algorithm for path unevenness index calculation  
Kalman filter and a low-pass filter are applied to eliminate the unwanted noise added to the IMU data. The Kalman filter generates the estimates of unknown variables that are often more accurate than those based on a single measurement alone by using a sequence of measurements taken over time, which may contain statistical noise and other errors. To achieve optimal filtering performance, the measurement noise covariance matrix for the factors is set to \(\text{diag}(10^{-8},10^{-8},10^{-8})\), and the process noise covariance matrix is also set to \(\text{diag}(10^{-8},10^{-8},10^{-8})\). These parameters are tuned by observing the performance for nullifying the uncertainty and filtering out the noise. The low-pass filter attenuates the high-frequency noise in IMU raw data especially during the robot's motion. The analysis of the gathered IMU data is used to determine the cut-off frequency, ensuring that the specified frequency range optimizes the relevant signal properties while minimizing noise and undesirable frequencies. It eliminates the unwanted interference caused between similar patterns in the IMU to smoothen the data. The corresponding filtered data are denoted as \(q_{f}\), \(q_{f}\), and \(\omega_{f}\). The quaternion (\(q\)) data representing the robot orientation are transformed to Euler angles, which are more flexible for illustrations in three-dimensional space, making the data more logical for analysis. Pitch (\(\theta\)), roll (\(\psi\)), and yaw (\(\phi\)) are the orientation components after converting to Euler angles. The linear acceleration and angular velocity vectors along the \(X\), \(Y\), and \(Z\) axes are computed into two single values representing the overall intensity of the robot's movement (denoted by \(|a|\) and \(|\omega|\)), considering weighted root mean square. This type of abstraction is essential for spotting movement variances that might point to uneven surfaces. \(l_{1}\), \(l_{2}\), \(l_{3}\), \(l_{4}\), \(l_{5}\), and \(l_{6}\) are the weighting factors associated with each data component.