**5. Experimental Results**

Experiments were conducted in a real static environment. The path planning method has been tested for a hexagonal map of the environment based on the robot's sensor data. Figures 13–16 show paths generated for several different situations.

R denotes the location of the robot. G denotes the location of the target. Red color indicates cells occupied by obstacles; green color indicates cells free from obstacles; white color indicates cells whose state is unknown; black cells represent the path. Figure 13 shows a situation in which the robot avoids moving through unknown areas (cf = 100), but the distance to obstacles has not been taken into account. It is clear that the path runs dangerously close to the obstacles.

In Figure 14, an additional cost was added to the cells directly adjacent to obstacles. In Figure 15, the neighborhood radius was extended by three cells.

For different values of the radius of interaction of the obstacles, we obtain different paths. The path shown in Figure 15 is longer than the path in Figure 13, but it is safer.

Figure 16 shows a situation where the cost function is the same for free and unknown cells and the radius of interaction of obstacles is three cells. The path is completely different from that shown in the previous figures.

We performed three series of experiments to compare the lengths of the path generated by the diffusion method in the case of hexagonal and rectangular grids. In each series, 1000 start and destination points were generated. Paths were planned using the methods mentioned above. The generated lists of cells were converted into lists of segments, and then, the lengths of the paths were calculated.

**Figure 13.** Collision free path—classic approach, green for obstacle-free cells, red for obstacleoccupied cells, and black for the planned path.

**Figure 14.** Collision free path—distance to the obstacles is taken into account (radius of neighborhood = 1), green for obstacle-free cells, red for obstacle-occupied cells, and black for the planned path.

**Figure 15.** Collision free path—distance to the obstacles is taken into account (radius of neighborhood = 3), green for obstacle-free cells, red for obstacle-occupied cells, and black for the planned path.

**Figure 16.** Collision free path—the cost function is the same for free and unknown cells, green for obstacle-free cells, red for obstacle-occupied cells, and black for the planned path.

The value of parameter dd is computed as follows:

$$dd^i = \frac{(dr^i - dh^i)}{dh^i} \tag{9}$$

where: *i*—the number of experiments; *dr*—the length of a path generated using square grids; *dh*—the length of a path generated using hexagonal grids.

In grid-based path planning methods, we need to expand obstacles by a given number of cells. This operation is equivalent to the dilation used in machine vision. We performed each series of experiments for a different neighborhood value (from r = 0 to r = 2). The results of the experiments are presented in Table 2. Figure 17 shows histograms of the parameter dd and corresponding Gaussian KDE distributions.

It can be seen that when we do not expand the obstacles, the gain from using the hexagonal grids is about 3%, while it exceeds 10% when we expand the obstacles. The shortened path length for the hexagonal grid is due to the fact that the hexagonal grid represents the shape of the obstacles better than the rectangular grid. For r = 2, the graph is not symmetrical with respect to the mean value, and in 82% of the cases, the path planned with the hexagonal grid is shorter than with the rectangular grid.

We did not notice a significant effect of map form (rectangular grid, hexagonal grid) on path planning time. The most time-consuming stage was diffusion. Regardless of the grid type, the number of cells occupied by obstacles affected the diffusion process. The diffusion process took more than one second (computer, map) for an empty environment. Fortunately, the absence of barriers is easy to detect, and we can plan the path using ordinary geometrical methods. In a maze-type environment with many obstacles, the diffusion time did not exceed 0.5 s (PC, Windows 10, i5-1035G1 CPU 1.00 GHz, 1.19 GHz, RAM 16 GB, map: 640 × 320 cells; a cell represents 1 m<sup>2</sup> in area). An essential advantage of the hexagonal mesh is that it approximates the shape of objects much better (Section 3). As a result, in many situations, a collision-free path is not found when using a rectangular mesh, but is found when using hexagonal one. As a result, the generated path transforms to the interpretable data by the Łukasiewicz—PIAP drive-by-wire system, which works on the universal automotive-grade controller for complex mobile working machines. The lowlevel program was designed to control the steering wheel by the original power steering of the off-road car. The velocity of the vehicle is controlled by the algorithm by using the electronic throttle and added electric ABS pomp. The universal controller is responsible for adjusting the velocity of the vehicle and the steering angle of the wheels to the set value by the CAN frame sent by the Łukasiewicz—PIAP autonomy controller.

**Table 2.** Mean values of parameter dd, for different neighborhood values.


r=2

**Figure 17.** Histograms of parameter dd; the red line represents the estimated probability density function.

#### **6. Conclusions and Future Works**

In this paper, we presented the possibility of using hexagonal grids in outdoor navigation. Experimental results showed the advantages of a hexagonal grid over a square grid. In our further work, we will use the diffusion map to determine safe vehicle speeds. Furthermore, we plan to determine robot localization based on matching hexagonal maps from two places.

The method could be used in the autonomy systems for the outdoor navigation in the UGV control systems in convoys, reconnaissance, surveillance missions, etc. This type of mapping can bring the goals of speedup and improved local path planning in real time on autonomous systems to reach the level of not limiting the UGV ability on rough terrains. We also plan to apply elements of the presented algorithm to the tasks described in the papers [25,26].

**Author Contributions:** Methodology and writing: B.S., P.D. and R.W.; software for path planning, B.S.; software for mapping, P.D.; low-level control, R.W. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The source code and data used to support the findings of this study are available from the corresponding author upon request.

**Conflicts of Interest:** The authors declare no conflict of interest.
