Where am I? SLAM for Mobile Machines on A Smart Working Site

The current optimization approaches of construction machinery are mainly based on internal sensors. However, the decision of a reasonable strategy is not only determined by its intrinsic signals, but also very strongly by environmental information, especially the terrain. Due to the dynamically changing of the construction site and the consequent absence of a high definition map, the Simultaneous Localization and Mapping (SLAM) offering the terrain information for construction machines is still challenging. Current SLAM technologies proposed for mobile machines are strongly dependent on costly or computationally expensive sensors, such as RTK GPS and cameras, so that commercial use is rare. In this study, we proposed an affordable SLAM method to create a multi-layer gird map for the construction site so that the machine can have the environmental information and be optimized accordingly. Concretely, after the machine passes by, we can get the local information and record it. Combining with positioning technology, we then create a map of the interesting places of the construction site. As a result of our research gathered from Gazebo, we showed that a suitable layout is the combination of 1 IMU and 2 differential GPS antennas using the unscented Kalman filter, which keeps the average distance error lower than 2m and the mapping error lower than 1.3% in the harsh environment. As an outlook, our SLAM technology provides the cornerstone to activate many efficiency improvement approaches.


I. INTRODUCTION
Over the past several decades, the operation strategies aiming to increase mobile machines' holistic efficiency receive much attention.As Osinenko pointed out, the engine power of farm tractors is growing at 1.8 kW per year and has reached about 500KW for the most powerful traction class [1], indicating the great potential to increase the holistic efficiency of the machines.Current solutions to optimize the system can be concluded as two kinds.To overcome the extreme conditions, the basic idea of the first method is equipping the mobile machines with an energy-saving system [2]- [4], such as accumulators.The other one is based on a dramatic Fig. 1.Mobile machines perform tasks more efficiently or safer according to their location and surroundings information.The short-term goal of SLAM is to prevent construction machinery from always working in low-efficiency areas for safety reasons, whereas the long-term goal is to increase the productivity of the working site with the help of path planning.The study focuses on affordable SLAM technology for construction machines.controller to increase the dispensable power in a short period [5]- [10].However, due to safety reasons, most of the operation strategies of mobile machines are designed conservatively.For instance, the energy-saving equipment should always at a relatively high level, and the controller must be designed to have rapid responses.As a result of that, the machines are still very likely to work in suboptimal areas.In the previous studies, most of them utilize the intrinsic signals to optimize the system [11] since the environmental information is hardware or computationally expensive to be gathered.However, the environment also has an essential influence on the system, i.e., to perform tasks both efficiently and safely, the construction machines shall be optimized by knowing their location and surroundings; thus, we proposed a method that can generate the map information surrounding the mobile machines only with affordable sensors so that provides the possibility to improve the system further.The basic idea of our approach is to generate the map information of the working site based on arXiv:2011.01830v2[cs.RO] 5 Nov 2020 the vehicle position, rolling resistance, as well as road grade.Concretely, a special recursive least square with forgetting algorithm is used to record the road grade and the rolling resistance in realtime [12], [13].These information will be saved together with the localization information.Consequently, after the machine passes by, it will record the information about that place.Since the mobile machines are driving repeatably for a special task, the method can be expected to work well even when the map information does not cover most of the working site.Fig. 1 illustrates the motivation of our approach.

II. PROBLEM STATEMENT
Although the map information can also be obtained from satellite, it is impossible to get the valuable information, such as a High Definition (HD) map, only depending on remote sensing due to a construction site's fast-changing environment.Also, the sensors can be quite noisy.Especially, they will be further exacerbated on a working site.The sensors, such as Global Positioning System (GPS), Inertial Measurement Unit (IMU), and odometry sensor will have higher measurement errors in case of the harsh environment.In addition, different construction machines have different drivetrain system, which makes a predefined motion model difficult.For instance, since mobile machines may work outside the coverage of base stations, the GPS signal can only achieve nearly 10 m accuracy [14] due to the lack of error correction.Last but not least, for passenger cars, the longitude error might not have such a negative effect as the latitude error since further measurements can be adopted to avoid the collision.In the case of construction machines, both errors shall be treated equally.

III. GOAL OF THIS RESEARCH
The goals of this paper are twofold.The first goal of the paper is to find out the most suitable sensor arrangements for construction machines.For accurate estimation of the position of machines, rather than only trust the measurement from one sensor, we fuse a series of different kinds of sensors with the aim of sensor fusion technology, derived from Kalman filter [15], to achieve better accuracy.Afterward, the second goal is to create a map with the environment condition by combining the surface resistance, road grade, and position information in realtime.Thanks to this map, further optimization of operation strategy and path planning can be realized.Although we measure the surface resistance and road grade by recursive least square with multi forgetting factors, the map-building approach we proposed can also be combined with other methods with other kinds of sensors, such as using ultrasonic proposed by Jung [16].

A. Sensors
The combination of several sensing systems so that they can compensate the technical shortcoming of each other is well-known in the field of autonomous systems [17]- [19].Therefore, there are a series of researches focusing on sensor fusion.Here we first summary the commonly used sensors for simultaneous localization and mapping (SLAM).Although we agree the introduction of the HD map can surely increase the accuracy of the localization, we do not consider this technology for the construction machines due to the dynamically changing of the construction site, as mentioned in [20].
1) GPS: Global navigation satellite systems (GNSS) such as GPS, GLONASS, BeiDou, and Galileo rely on at least four satellites to estimate global position at a relatively low cost.Typical standalone GPS average accuracy ranges from few meters to above 20 m [14] due to ionospheric delay, multipath effects, ephemetrics & clock errors, and Geometric dilution of precision (GDOP).To improve the accuracy, one of the most used techniques is Differential GPS (DGPS), which utilizes measurements from an onboard vehicle GPS unit and a GPS unit on a fixed infrastructure unit with a known location.Here the known fixed infrastructure unit is called Reference Station, which calculates the local error in the GPS position measurement periodically.The onboard vehicle GPS units then use this correction to adjust their own GPS estimation.According to [21]- [25], an average accuracy in the range of 1-2 m can be achieved, mainly depending on the distance between the vehicle and the base station.Another commonly used improvement is realtime kinematic (RTK) GPS, which estimates relative position by means of the phase of the carrier signal and can be expected to achieve centimeter-level accuracy.Notice that, both of them depend on a fixed base station with a known position nearby, through the principle of them is quite different.In Oct 2020, when we write this paper, RTK GPS is still an extraordinary expensive approach and usually be used to define the ground truth position of vehicles.Some low-cost RTK GPS sensors, under 1000 bulks, are designed with much lower receive frequency [26] and thus cause problems as vehicles driving fast.Thus, in most commercial uses, DGPS is preferable for reducing the cost.Therefore, in our research, we conservatively considered the accuracy of DGPS as 2m, which is consistent with the normal performance of DGPS.Obviously, as the performance, especially the accuracy, of the GPS increases, our mapping approach will also have better performance consequently.
2) IMU: Inertial measurement units (IMUs) are integrated electronic devices that contain accelerometers, magnetometers, and gyroscopes.It can provide raw IMU measurements to calculate attitude, angular rates, linear velocity, and position relative to a global reference frame.
3) Odometry: Odometry is the most widely used navigation method for positioning; it provides good short-term accuracy, is inexpensive, and allows very high sampling rates.Odometry is based on simple equations, which hold true when wheel revolutions can be translated accurately into linear displacement relative to the floor.The main advantage of odometry is that all localization information comes from the vehicle itself so that this information is always available.Usually, it is the only localization information when other sensors are not able to provide data.Thus, a good odometry based localization system is always necessary, and it is usually the first step to localization [27].

B. Localization technologies
1) Mobile robotics: a series of researches using sensor fusion to achieve a highly accurate localization has been studied worldwide.The technologies about SLAM can be roughly divided into two parts: indoors and outdoors.For indoor localization, such as domestic robots [28], a GPS system cannot be used.However, the road is relatively flat, and thus only a two-dimensional map is needed.In contrast, when it comes to offload navigation in rough terrain, the algorithms must be capable to handle three dimensions of the environment.After the success of Kalman filter [15], extended Kalman filter [29], and finally unscented Kalman filter [30], [31], the idea that a mobile robot which executes useful missions should be endowed with navigation ability has become a consensus.However, the selection of combining different sensors is from case to case different.For instance, Bento fused the data from ABS sensors and GPS for outdoor localization, based on extended Kalman filter [32], and Zhang integrated the information from GPS and IMU [33].Also, Li used a camera instead of GPS to accomplish mean positioning errors of 75 cm [34].In addition, Wolcott proposed a Visual Localization method within LIDAR Maps for Automated Urban Driving [35].For the cost purpose, Ward studied the possibility to use radar to localize the vehicle's position and demonstrates that errors go to 27.8 cm laterally and 115.1 cm longitudinally by their approach in worst case [36].To investigate the use of LiDAR for localization, Hata suggests using LiDAR to detect curbs and road markings to create a feature map of the environment and localize vehicles with the help of RTK-GPS and IMU within the map [37].Another alternative is using ultrasonic sensors, proposed by Jung [16].Interestingly, as the development of the internet of things (IoT), more and more researchers are focusing on SLAM by cooperative localization techniques.The basic idea of this approach is to get crucial information by adverse weather or obstacles from infrastructure or other vehicles.For example, del Peral-Rosado showed the feasibility of 5G based localization technology [38], and Rohani utilized VANET to enhance GPS accuracy to 3.3m mean level [39].Further information can be found in the survey paper from Kutti [40].
2) Construction machines: for mobile construction machines, the requirements for localization techniques can be different based on different use cases.Some machines may work in the underground, where the situation is similar to working in a tunnel, whereas others might work on an openpit mining site.In underground mines field, it was proposed to use the laser for extracting the wall positions, and dynamically generate a path from these laser data while considering variable offsets [41], [42].In contrast, for the open-pit site, an autonomous wheel loader introduced by Gu [43] uses a set of sensors, including GPS and IMU for localization, and LIDAR, radar as well as a camera for obstacles capture and identification, ensuring it perceives surroundings accurately.Moreover, Xiang created a dataset for mobile machines detection from the view of a camera fixed on the ground [44], while Bang proposed a method recognizing the machines from a view of the drone [45].In additon, the visual SLAM is proposed [46].Besides that, V2X technology was introduced in the field of construction machines [47], [48].In 2020, Xiang proposed to use WIFI to achieve the communication between different vehicles by introducing a realtime estimation method with respect to package loss and delay [49].Afterward, the feasibility of using 5G for machines is also investigated by [50].To avoid additional costs for the vehicles, smartphones show great potential to be utilized as a solution to complement the flaws of onboard ECU [51], [52].
In summary, similar to general autonomous vehicles, most automated mobile machines fuse information from onboard sensors such as IMU and GPS by using diverse sensor fusion technologies.Furthermore, camera, LIDAR, and radar are used to detect the environment in the construction site, to avoid obstacles, and to instruct the machines where to go.However, owing to the harsh environment and diversity of working sites, LIDAR and radar can be sensitive.In the recent future, wireless communication can also contribute to better localization of vehicles.

V. MODEL BUILDING
The wheel loader used in the simulation was modeled in Solidworks and then imported into the Robot Operating System (ROS) to explore the approaches that should be used for mobile machines.Since the first goal of this paper is to find out suitable sensor arrangements to accurately localize wheel loaders, we fused different arrangements of sensor data.Concretely, we use up to three IMUs and three GPSs in the simulation.Based on the characteristic of GPSs, three GPSs are fixed on the cab of the wheel loader.We then installed two IMU sensors under the front axle and other IMUs under the rear axle.Fig. 2 illustrates the wheel loader model we used in the Gazebo environment.Fig. 2. Wheel loader model in Gazebo: once the models had been developed in Solidwork, they were converted to Unified Robotic Description Format (URDF), using a 3rd party URDF conversion tool called "sw urdf exporter", which allows for conveniently export SW Parts and Assemblies into a URDF file.Gazebo enables us to obtain sensors' simulation such as IMUs, GPSs, encoders, cameras, and stereo cameras through gazebo plugins, which can be used to attach into ROS messages and service calling the sensor outputs, i.e., the gazebo plugins create a complete interface (Topic) between ROS and Gazebo.As we know, the URDF is an XML file format used in ROS to describe all elements of a vehicle.URDF can specify the kinematic and dynamic properties of a single robot in isolation.To make our vehicle works properly in Gazebo, additional simulation-specific tags concerning the vehicle pose, frictions, inertial elements, and other properties have been added.The transform tree is shown in Fig. 3.
Each Link in URDF represents a rigid body.Also, according to the kinematic and dynamic model shown in Fig. 3, the wheel loader in the simulation is divided into several parts, including, 1. base link represents the rear part of the wheel loader, which is also the main coordinate frame of the simulated model in ROS, because most of the sensors are attached to the rear part and considered as child links.2. front link represents the front part of the wheel loader, considered as the child link of the base link, and connected by a revolute joint.3. wheel link represents the wheels of the wheel loader.
Apparently, the two front wheels are attached to the front part, and the two rear wheels are attached to the rear part.4. gps link: the GPS devices, which fixed on the roof of the wheel loader.5. imu link: the IMU devices, which two of them fixed under the front part of the wheel loader and other two fixed under the rear part of the wheel loader.In this project, our wheel loader receives GPS data from an onboard GPS sensor plugin with its latitude and longitude; however, the GPS data provided by the GPS plugin cannot be directly applied to the fusion of the sensor data, so coordinate system conversion for GPS data is required.For our simulation, we define a transform for each GPS that converts the vehicle's world frame coordinates, i.e., the frame with its origin at the vehicle's initial position, to the GPS's UTM coordinates, the same as [53], as where φ, θ, ψ denote the vehicle's initial UTM-frame roll, pitch, and yaw.c and s denote the cosine and sine functions, respectively.x U T M 0 , y U T M 0 , and z U T M 0 are the UTM coordinates of the first reported GPS position.Every time after that, we transform the GPS signal into the vehicle's world coordinate frame, odom, by In our simulation the ROS package "robot localization" from Moore [53] was used, including a "navsat transform" node, which provides functions to convert between various coordinate frames and integrate GPS data.It provided a transformation function that allows the conversion between GPS frame, expressed in latitude and longitude, and vehicular coordinate.This process shall be carried out for each GPS independently.
In practical applications, GPS signals can be received infrequently.Yet the localization technology must maintain state estimation even when some of the vehicles' signals are absent.Therefore, we evaluate the performance of the filters when GPS signals infrequently arrive in our environment.Taking this problem into consideration, we build a ROS node to filter the collected GPS signals such that GPS data is unavailable for 1 second once every 10 seconds.Since we use three GPS, the signal failure might not happen at the same time.We aim to observe how the filter and our approach behave with different sensor configurations when some GPS signals go wrong.

A. Sensor fusion for localization
For localization of the wheel loader in the simulation environment, we use EKF and UKF node in "robot localization" [53].On the one hand, this package has no limitation for the number of sensor inputs, which just in line with our construction machines' requirements.On the other hand, a concrete motion model is not needed so that this method can easily be used on both excavators and wheel loaders with different drivetrain solutions.In "robot localization", the filter's state will be driven forward by a standard 3D kinematic model derived from Newtonian mechanics to calculate the vehicle's motion, including position, velocity, and acceleration in three dimensions.
In the correction step, the measurement model integrates sensor data to update the predicted state.GPS provides position information, and wheel encoders provide velocity information for the correction.Moreover, the orientation, velocity, and acceleration information are updated from IMUs via gyroscopes and accelerometers.Furthermore, the process model and measurement model also need to add a noise covariance matrix, Q and R, respectively.The noise matrices can generate uncertainty in the system.The process matrix contributes to the overall uncertainty in the algorithm, which adds to the process model.Intuitively, a large value in the Q matrix means a considerable uncertainty in the process model, causing the system to have greater confidence in the measurement data.In the current implementation, the process noise matrix was set as a diagonal matrix.The state variables, which are directly measured by the sensors, such as x y position by GPS and orientation by IMUs, were set relatively small.The variables, which were not directly measured, could be updated from the measured data.The measurement covariance matrix R corresponding to the confidence in the sensor data.Similarly, the greater the noise in the elements of this matrix, the less confidence in the measurement data.The measurement covariances are derived by the sensors noisy.
In addition to the inaccuracy of filters, outliers are also an important source of error.In our simulation, we assume that the measurements have Gaussian distributions.Although sensors follow the normal distribution as setting, improbable, and extremely noisy measurements can appear due to the high fidelity of ROS.To counteract this problem, we use Mahalanobis distance to detect outliers and thus overcome the consequent adverse effect.After this, the filtered data will be used for state correction.Concretely, the Mahalanobis distance is calculated as a product of the innovation vector to find out the outliers, where A is the covariance matrix.

B. Sensor fusion methodes
State estimation is one of the most critical issues in many autonomous applications.Having an accurate state estimation, we can effectively navigate the machines in the environment and thereby making optimal decisions for specific purposes.For instance, to reach a target destination, it needs to know its current state, which consists of position, velocity, acceleration, and heading to execute the right maneuvers correctly.Since sensors are susceptible to noise and imperfections introducing uncertainty to the measurements, the filter's goal is to fuse all the available sensor data, as well as the vehicle's own dynamics to obtain a more precise estimation of the vehicle's state.As mentioned, we present two necessary extensions of the Kalman filter, notably the EKF and UKF.
The filters are modeled to improve the positioning's accuracy by compensating for the disadvantages of the different sensors.As we know, GPS provides relatively accurate positioning, but the signal's availability remains a problem, especially in urban and mountainous environments.This determines that the results of using GPS alone are usually not satisfactory.Also, IMUs use a combination of accelerometers and gyroscopes to measure linear accelerations and angular velocities, respectively.By estimating the position relative to its initial position, the trajectory can be calculated by these information of the wheel loader as the vehicle travels.For sure, there is also a common problem with IMUs, namely the accumulated errors.To overcome this problem, we shall correct the estimated position using other sensors, to avoid accumulated drift and provide global positioning.Without a doubt, a GPS/IMU system is successful in increasing the accuracy beyond standalone GPS or IMU capabilities.
1) Extended Kalman Filter: although linear Gaussian systems are abundant, most systems, in reality, are non-linear.Also, they often do have Gaussian noise.Wrong assumptions about the system can lead the Kalman filter to diverge and provide estimation with very high errors.Consequently, multiple extensions have been developed to deal with various scenarios encountered in practice.One of the famous variations is the EKF, where it deals with non-linearity by approximating a linear equivalent before performing the required filtering sequence.The idea of the EKF is that if the system is close to linear for short periods, using its linear approximation will then not yield large errors.
Through linearizing the basic equations form Welch [31], we get the following equations: where x k+1 and z k are the actual state and measurement vectors, xk+1 and zk are the approximate state and measurement vectors.xk is an a posteriori estimate of the state at step k, random variables w k and v k represent the process and measurement noise.A is the Jacobian matrix of partial derivatives of f (•) with respect to x, W is the Jacobian matrix of partial derivatives of f (•) with respect to w, H is the Jacobian matrix of partial derivatives of h(•) with respect to x, V is the Jacobian matrix of partial derivatives of h(•) with respect to v.
An essential feature of the EKF is that the Jacobian H k in the equation for the Kalman gain K k serves to correctly propagate only the relevant component of the measurement information [31]; the linearization error is always exist as the function is nonlinear.Because increasing the sampling time and reducing the nonlinearity of function are not always viable, error-state EKF is proposed to counteract the adverse effect.The basic idea of error-state EKF is to reduce the distance of the linear approximation from the operating point; instead of linearization of the nominal state, it handles the error state.
2) Unscented Kalman filter: when the state transition and observation models, that is, the predict and update functions f and h are highly nonlinear, the EKF can give particularly poor performance.This is because the covariance is propagated through the linearization of the underlying nonlinear model.By contrast, the UKF uses unscented transform instead of linearization in the prediction and correction steps to make the estimation.As the first step, we shall compute the decomposition of the covariance matrix and carefully select the sample points, for instance, here we selected 2L+1 points, described as, where x is the selected mean sample point and λ is set as λ = 3 − N for Gaussian probability density function.After that, the sigma points will be propagated through the nonlinear function as, where f (•) is the motion model function and and Xi is the predicted position based on the motion model.As the final step of predicted process, the predicted mean and covariance should be calculated.
Here Q denote the noisy of this process.In the correction step, we firstly calculate the predict measurement with the sigma points, where h(•) is the predicted measurement model, considering the process noise: Ľ ĽT = P .Then, we get the mean and covariance of predicted measurements, where R is the noisy.Based on the previous result, we can compute the cross-covariance and Kalman gain, and then get the corrected covariance and mean.
K = P xy P −1 y (15) where y 0 is the measurement result with respect to X, X i is the final results from UKF.As we can see, UKF does not need Jocobian matrix so that it can achieve a better performance in estimation.Usually, the computation effort can be slightly higher than the other methods, making carefully select sensors configurations meaningful.

C. Realtime map plotter
Inspired by the research from Fankhauser [54], a map can include many layers to store different types of data information.Thus, to develop a realtime plotter of the construction site according to ground condition, we use a multi-layer grid-based map, which divides the environment into uniform cells.Fig. 4 illustrates the multilayered grid map concept, where each cell data is stored on the congruent layers.In this project, since resistance and grade of the road are the most of importance information for the construction machines, we adopt a two layers grid map.Concretely in our study, the map is divided into small cells, whose resolution is 1 meter per cell.As we discussed in previous section, we use GPS/IMU fusion Kalman filter algorithms to locate the mobile machine in the construction site.
As can be seen in Fig. 4, to describe the ground condition of construction sites, we use the values of each cell to represent the information of the ground situation.In Fig. 5, a layer that holds the data of a grid-based map is shown.Obviously, although we only demonstrate the approach with two layers, it is relatively easy to extend the third layer in case that uphill or downhill is vital, as the third layer is responsible for recording the heading of the vehicle.
Based on the previous study, both resistance and grade of the road can be gathered in realtime.Thus, we assume that the ground resistance and slope are known after the mobile machine passed by.When the mobile machine passes through each grid cell, ground information will be added to the corresponding grid of the two layer-grid-maps.Concretely, the plotting algorithm combines the localization results from the Kalman filter and the grade and resistance information from the recursive least square algorithm.To implement the plotting algorithm in ROS, we created a node in ROS that can subscribe to the localization results from the Kalman filter node and gather the current information from ground truth maps with the assumption that resistance and grade of the road can be estimated or measured well.A gird with site information will be created after the vehicle passes by.The map is saved as a 2*m*n*3 tensor, where m is the max displacement in the x-direction, while n is the max displacement in the y-direction.In case a gird does not be occupied once by the vehicle, it will be marked as NaN to denote the unknown regions.

VI. VEHICLE SIMULATION SCENARIOS IN ROS AND GAZEBO
To test the feasibility of the map plotter, we first define different road conditions in a construction site.ROS is a mature and flexible framework for robotics programming, providing the required tools to easily access sensors data, process that data, and generate appropriate responses for the robot's actuators.Due to these characteristics, ROS is a perfect tool for many types of research on modern robotics.After all, a mobile machine can be considered as just another type of robotics, so the same types of programs can be used to develop advanced construction machines.In this paper, we simulated a construction site showed in Fig. 6.According to this real construction site, we define five different ground resistances in the simulation environment, according to different ground conditions.Moreover, two areas according to different slopes.Concretely, we distinguish the different regions based on road material.
1. Gravel surface: Gravel is a loose aggregation of small, variously sized fragments of rock.It has a wide range of applications in the construction industry.Therefore, gravel surface road is very common in the construction site.The rolling resistance coefficient of gravel surface is considered as 0.02.2. Sand surface: Sand is a type of naturally material that is of a loose, granular, fragmented composition, consisting of particulate things such as rock, coral, shells, and so on.The rolling resistance coefficient between the sand surface and mobile machine tires is 0.250.3. Dry dirt road: A dirt road is a type of unpaved road made from the native material of the land surface, which is also very normal in the construction site.The typical rolling resistance coefficient of the dry dirt road is 0.040.4. Wet dirt road: Same as a dry dirt road, the wet dirt road is also a typical road type in the working area.The typical rolling resistance coefficient of the wet dirt road is 0.060. 5. Dry concrete surface: Dry concrete is a normal building material and the typical rolling resistance coefficient of the dry concrete road is 0.008.
Besides, we also define two different ground slopes appropriately.Since we only use a two-layer grid map in this research, we do not discriminate uphill or downhill.

Flat area:
The slope of the ground is near 0°.In the flat area, we can let the mobile machines move faster to increase working efficiency or reduce the reserved dynamics to let the components work in an more economic region, with only a little concern of safety.

15°slope area:
The slope of this area is near 15°.In this area, in contrast, the mobile machines should pay more attention to the safety.
For simulation, we defined the green area as the dry concrete surface in the ground-truth resistance map.The red area represents the gravel surface.The blue area represents the sand surface, the black area, and the yellow area represent dry and wet dirt roads, respectively.With this premise, we draw the ground truth map upon this construction site.Same as in the ground-truth resistances map, we also define the ground slope map, where the green area represents the flat area and the red area represents the 15°slope.
In this project, we wrote the plot node with Python and OpenCV library to visualize the plotted map.To test the feasibility of a realtime plotter in simulation, we use a ground truth node in ROS, which provides a ground truth position of the simulated mobile machine in Gazebo.When the mobile machine moves to a certain position, we use the ground truth position to determine the rolling resistance coefficient and the road grade, then use the Kalman filter filtered position to plot the corresponding information in the grid-based map.
In ROS and Gazebo, the build-in plugins provide many adjustable parameters that can be used to adjust the devices' performance.To get closer to reality, we set the performance parameters of GPSs and IMUs in the simulation according to real GPS and IMU devices.To get the best sensor configuration, we implement different sensor configurations for different algorithms.Each group of sensor configurations is simulated under the same condition by rosbag, and the results are output simultaneously.

A. Localization results
To explore the most suitable sensor arrangements of the Kalman filter for construction machinery, we compared the results from different sensor configurations with different methods.The concrete sensor arrangements in this project are shown in Tab.I.
To evaluate the performance of the different variants of sensors and algorithms concerning accurately positioning, we controlled the wheel loader to drive on the previously defined construction site in Gazebo, and recorded the data from sensors at the same time.Afterward, the localization results of the different methods are compared to the ground truth.Here we use the root-mean-square error (RMSE) as a quantitative indicator of the error to assess the pose estimation results.

Group
Sensor In our simulation, we ignore the mirror difference caused by the slightly different installation position of sensors.Therefore, the various configurations are reduced from 64 to 16.Since odometry is robust and necessary for many applications, we do not consider the case without an encoder.
Where Ŝ is the vector including estimated x and y position, S is the denotes ground truth x and y position, n is number of all estimated samples, and the footnote i denotes the i th time step.Fig. 7 shows the wheel loader estimated trajectories given by different approaches and the ground truth trajectory, where the red lines are the ground truth trajectories that the vehicle passes, and the blue lines are the estimated position of the vehicle.Since only EKF and UKF are capable of handling the nonlinear problem, we compare the results obtained using EKF filtering and the UKF filtering technique with different sensor arrangements.Notice that, odometry sensor is always used though we do not explicitly mention it.Apparently, the UKF performs better than the EKF, which is also in line with the conclusion from most studies.Generally speaking, with GPS fusing in the estimation, the accuracy improves drastically.Also, since the GPS may lose signal every 10 seconds, an additional GPS sensor can surely increase the position accuracy.In contrast, more IMUs can only slightly improve the accuracy of positioning.As we can see, the IMU + Odometry estimation method yields inferior performance no matter with EKF or UKF.Once the IMU reports an inaccurate heading, the errors will be accumulated, causing the measured position drifts further away from its true position as the wheel loader travels.
Fig. 8 shows a comparison of localization error between the different approaches with respect to time.As shown in Fig. 8, the RMSE and the euclidean distance error of each sensor arrangement can be obtained, indicating that the EKF has more significant tracking error than UKF.It happens because the linearization through its Jacobian is an approximation, and the kinematic model of the wheel loader is highly nonlinear.To get a more intuitive and accurate description of the error for (p) UKF with 3 IMU and 3 GPS Fig. 7.The IMU + Odometry estimation method yields for both EKF and UKF the RMSE over 70 meters.Except for the IMU + Odometry methods, the other results can be divided into four performance levels according to the error scale.The worst level is EKF with one GPS, where the RMSE is about 3 ∼ 4 m.The second level is EKF with two GPS and EKF with three IMU and three GPS.In these cases, the RMSEs are about 2 ∼ 3 m.A better level is UKF with 1 GPS and 1 IMU, where the RMSE of the third level can be achieved about 2 ∼ 2.5 m.Finally, our experiment's best class is UKF with 2 GPS and 1 IMU, and UKF with 3 IMU and 3 GPS, which reduce the RMSE to about 1.2 m.
each sensor configuration and method, we create Tab.II to demonstrate the RMSE in detail.
As aforementioned, the GPS signal will be lost for one second every ten seconds.Thus, there are some noticeable instantaneous position changes every ten seconds.The loss of GPS signals clearly causes these jumps.As we can see, for sensor configuration with only one GPS, the leap of the localization error as well as the variance values are more sharply.Obviously, with the number of GPS increases, the jumps are diminished and therefore become more acceptable.
Apparently, the simulation results show that UKF is a better approach using data collected by onboard sensors of the wheel loader in gazebo environments.Intuitively, more sensors represent higher accuracy.However, the results show that an appropriate number of sensors can achieve acceptable accuracy at a lower cost.As we can see in Tab.II, the RMSE of UKF with 1 IMU 2 GPS is 1.7217 m, and UKF with 3 IMU and 2 GPS is 1.4024 m.With additional 2 IMU and 1 GPS, the RMSE is only slightly reduced by 0.3 m.More importantly, the maximal error is strongly diminished by one additional GPS, whereas continually increasing the sensor number does not further reduce the error proportionally.Of course, according to different application scenarios, different sensor configurations shall be chosen.For our application   scenario, UKF with 1 IMU and 2 GPS has sufficient accuracy and a better economy respecting sensor hardware cost and onboard ECU computational effort.Thus, we suggest using this sensor configuration to locate the mobile machines and then develop the realtime map plotter.

B. Plotter results
As our ultimate goal is to create a map of the current working site in realtime based on localization technology so that corresponding optimization can then be achieved, the ground truth maps and estimated maps with different sensor configurations coupled with various algorithms are shown and compared in Fig. 9. Since we use a two-layer grid map, both rolling friction coefficient and road grade are recorded and used to create the estimated maps.In our study, the ground information are saved in corresponding grid after the wheel loader passes by and identify the ground information such as friction and slope through the specific algorithm, e.g.recursive least square.As aforementioned, to locate the mobile machine's position in a cost-efficient fashion, we adopt the configuration of the UKF with 1 IMU and 2 GPS.Also, in order to compare the performance of the selected configuration, we draw the results of the EKF with 1 IMU and 1 GPS and the UKF with 1 IMU and 1 GPS as the control groups.The mispredicted points are calculated as described in ( 19), where Ĝi,j denotes the estimated grid map information, G i,j is the ground truth map information, E is the accumulated number of errors, the subscript r and s denotes resistance and slope map, respectively.Obviously, the goal is to minimize the percent of mispredicted points versus total predicted points, described as (20), where T is the total estimated number, and J is the quantitative criteria to evaluate the accuracy of the plotted map.
The localization errors of each group are shown in Tab.III, where we can see the necessity of the introduction of the second GPS sensors, and the adoption of unscented Kalman filter.To evaluate the plotted maps' accuracy, we use Matlab to implement an algorithm to compare the predefined area and the plotted path the mobile machine traveled.Fig. 10 graphically illustrate the mispredicted grid point with white color, where the mispredicted points are generally distributed in the marginal zone.This is because even the localization technology makes some mistakes; the problem is unlikely to cause an error as long as the vehicle is not at the very edge of different zones, indicating the robustness of this mapping idea of the construction site.
After calculating the wrong located grids and all the plotted grids and according to the Eq. ( 19) and (20): 1.For EKF with 1 IMU and 1 GPS: an error rate J r = 2.389% of the ground resistances map and an error rate J s = 2.258% of the slope map can be obtained.2. For UKF with 1 IMU and 1 GPS: an error rate J r = 1.482% of the ground resistances map and an error rate J s = 1.682% of the slope map can be obtained.3.For UKF with 1 IMU and 2 GPS: an error rate J r = 0.997% of the ground resistances map and an error rate J s = 1.223% of the slope map can be obtained.

VIII. CONCLUSION
In this study, we proposed an approach to creating a multi-layer map of the construction site in realtime so that the environmental information can be taken into account to improve vehicle efficiency and safety further or contribute to the path planning of mobile machines in the construction site.Considering the common phenomenon in reality mentioned by other researchers, such as noisy sensors and infrequent signal loss, we set up our simulation environment in Gazebo with a ROS package based on a real construction site.According to our tests in Gazebo by implementing a series of sensor configurations, we found that the configuration that 1 IMU and 2 GPS with encoder using UKF has the best for overall performance with respect to accuracy and cost.By comparing the estimated maps drawn by map plotter and the predefined maps, the errors are only 1.0% and 1.2% for road resistant force and grade, separately.Thus, we believe that the developed plotter can be used to save the road condition in realtime within a reasonable error range and encourage the engineer in construction machines to develop novel algorithms to further improve the holistic performance of machines based on our approach.

A. Outlook
In our research, we show the method to create a map with only one mobile machine.However, in a real working site, many mobile machines work simultaneously on the construction site, indicating the possibility of creating a map even faster if the machines can share the information.Thus, we encourage the researchers to enable the cooperative map drawing approach by means of WIFI or 5G.

Fig. 3 .
Fig. 3.The dynamic system simulated by URDF file on ROS

Fig. 4 .
Fig.4.Our approach uses multilayered grid maps to store data for different types of information.Concretely, every gird saves a 1*3 matrix including location information and resistance or grade, depending on which layer it is.A gird with site information will be created after the vehicle passes by.The map is saved as a 2*m*n*3 tensor, where m is the max displacement in the x-direction, while n is the max displacement in the y-direction.In case a gird does not be occupied once by the vehicle, it will be marked as NaN to denote the unknown regions.

(Fig. 5 .
Fig. 5. Detail description of a layer in the grid-based map

Fig. 6 .
Fig.6.The ground truth map with dimensions.The simulation environment we used in Gazebo was modeled based on a real construction site, and the parameters are selected according to material characteristics.Since simulating a small construction site may cause system error and thus lack plausibility, we augmented this real construction site's dimensions in Gazebo.

Fig. 9 .Fig. 10 .
Fig.9.The ground truth and estimated maps.In the ground resistance map and road grade map plotted by EKF with 1 IMU and 1 GPS, the spikes caused by infrequent GPS are quite obvious.With additional GPS sensor fused in Kalman filter, the spikes improve a lot.