To produce a real lunar driving experience, the simulated world must represent the target physical environment. To restore the dynamic characteristics of the lunar rover, we established a manned lunar rover simulation model and a virtual environment based on Unity3D. We built a four-wheel independent semi-active posture adjustment mechanism, and built a sensor model to simulate the movement, posture adjustment, path planning, and other operations of the rover.
2.2.1. Lunar Environment Generation
The lunar environment includes the lunar terrain and the geometric and kinematics model of the manned lunar rover. On the moon, the main obstacles of interest to the lunar rover are rocks and craters. The distribution of obstacles has a significant impact on the simulation effect [
11]. We tried to simulate this effect by procedurally placing rocks and craters and using the latest orbital information to simulate the formation of the lunar terrain.
The topographic data are from the Lunar Reconnaissance orbit satellite LRO, which is located 3 km south of the Apollo 15 landing site [
12,
13]. Craters were added through the transformation of the height map.
represents the coordinates of the sampling point. The two-dimensional coordinates
of the height map corresponded to the
of the sampling point, and the relationship between the brightness value and the
of the sampling point is shown in Formula (1):
where
is the maximum height of the lunar surface. The luminance value of
is
.
The depth and diameter of the crater met the following formula [
14]:
where
H is the depth of the crater and
D is the diameter of the crater.
The height map was loaded into Unity3D as a terrain model to generate a simulation environment.
The shapes of the lunar rocks included circular, rectangular, concave, and so on. Rocks were generated on the terrain according to the distribution density of rocks with different diameters on the moon. The shape, size, quantity, and spatial distribution of rocks can be adjusted in Unity3D. The final lunar surface model is shown in
Figure 4.
Referring to the Apollo manned lunar rover, we designed a symmetrical springless suspension model, including two single-sided rocker arms and four bogies. The rocker arms on both sides had rotational freedom and were connected by a differential device. The pitch angle of the body was the average of the pitch angles of the rocker arms. The four wheels were independently driven and combined for steering [
15,
16]. The model of the rover is shown in
Figure 5.
2.2.2. Motion Simulation of the Rover
Due to the limitations of the mechanical structure, the translation range of the 6-DOF platform is limited [
17]. Therefore, in the process of simulating the actual movement of the rover, the platform cannot track the 6-DOF attitude. To achieve high-fidelity posture following, the output data needs to be processed.
The human vestibular perception system is composed of otoliths and semicircular canals. The driver feels linear acceleration through otoliths, and angular velocity through semicircular canals. When the data is greater than the threshold, the driver will sense movement. To be perceived by humans, the longitudinal and lateral acceleration must be greater than 0.17 m/s
2, the vertical acceleration must be greater than 0.28 m/s
2, and the pitch, roll, and yaw angular velocity must be greater than 3.6°/s, 3.0°/s, 2.6°/s. The platform moves at an angular velocity lower than the human perception threshold, and the longitudinal and lateral linear acceleration are simulated by the gravity component. Based on this principle, we designed a motion simulation system. The motion parameters of the rover and the linear acceleration perceived by the otolith were used as the input data of the algorithm to obtain the displacement and attitude angle. The flow of the somatosensory feedback algorithm is shown in
Figure 6.
Otoliths cannot distinguish the influence of gravity on motion, and the perceived linear acceleration exists in the form of the specific force
:
where
is the absolute linear acceleration of human body and
is the gravitational acceleration.
It is difficult for the human body to perceive tiny angular velocities, so tilt coordination cannot simulate excessively high linear acceleration. It is necessary to scale the kinematic parameters through the scale link. Taking into account the relative position of the vehicle centroid and the vestibule,
is the coordinate transformation matrix from the human body coordinate system to the inertial coordinate system, and
represents the transformation matrix from the angular velocity to the Euler angle change rate. The linear acceleration and angular acceleration in the human body coordinate system was converted to the inertial coordinate system:
where
are the specific force in the human body coordinate system and the inertial coordinate system, respectively.
are the angular velocity signals in the human body coordinate system and the inertial coordinate system.
The speed of the rover was low, and the posture change was small. The 6-DOF platform could easily track the high-frequency components of linear acceleration and angular velocities. The motion simulation system tracked high-frequency linear acceleration and used tilt coordination to simulate longitudinal and lateral linear acceleration. We designed the angular velocity-limiting link to ensure that it would be difficult for the human body to perceive posture changes caused by tilt coordination. We limited the angular displacement caused by the low-frequency angular velocity to ensure that the 6-DOF platform was not affected by interference factors.
It is necessary to ensure that the platform returned to the initial position without being perceived after the pose change occurred. We designed a third-order high-pass filter to filter the linear acceleration in the inertial coordinate system. The transfer function is as follows:
is the input line acceleration, is the filtered acceleration, and are the natural cut-off frequencies of the first and second order links respectively, and is the damping ratio; here, .
We used a second-order low-pass filter to construct the tilt coordination link. The transfer function is as follows:
is the specific force in the human body coordinate system, is the output of low-pass filter, is the natural cut-off frequency of the second-order low-pass filter, and is the damping ratio—which was set as 1.
When the vehicle is driving on the moon, the posture angle changes in various directions are quite different. The yaw angle has a large variation range, so we used a first-order filter to filter the pitch and roll angles, and a second-order filter to filter the yaw angle. The transfer functions of the first-order high-pass filter and low-pass filter are as follows:
is the angular velocity in the inertial coordinate system and and are the output of the first-order high pass filter and low-pass filter, respectively. and are the natural cut-off frequencies.
The transfer functions of the second-order high-pass filter and low-pass filter are as follows:
and are the natural cut-off frequencies of the high-pass filter and the low-pass filter, and and are the damping ratios—set here is 1.
After each component is obtained through the filter, the tilt coordination link converts the low-frequency linear acceleration component into the tilt angle. The formula is:
is the low frequency vertical and horizontal component of the proportional input, and
is the pitch angle and roll angle of the tilt coordination (in
Figure 6, they are uniformly represented by
).
We passed each component through the limiting and integration link and superimposed it. We calculated the angular displacement and linear displacement of 3-DOF. The extension of each hydraulic cylinder was obtained through the inverse kinematics solution to drive the motion platform.
2.2.3. Posture Adjustment Module
The rover’s posture adjustment module—that is, the suspension—is a mechanism that connects the wheels and the body of the rover. Its functions include power transmission, buffering, and vibration reduction [
18], which affect the performance, stability, ride comfort, and anti-overturning ability of the rover. We designed the posture adjustment module. Through the above work, it was ensured that the astronauts will have a stable and comfortable driving experience when the rover works on the rugged lunar surface.
According to the connection between the wheels and the body, the suspension was divided into independent and non-independent suspensions. We used four-wheel independent semi-active suspension to ensure comfort and reliability while reducing energy consumption.
The PID control model of the semi-active posture adjustment system is shown in
Figure 7.
is the spring stiffness,
is the damping coefficient of the shock absorber,
is the driving force of the
wheel generated by PID adjustment,
is the excitation displacement,
is the displacement of the suspension connection, and
is the body displacement.
According to the model, the dynamic equation of the suspension can be established [
19,
20]:
To realize the leveling of the car body, the car body inclination was regarded as the object of PID control to reduce turbulence. PID control is a commonly used control method in semi-active suspensions and has strong applicability. Its structural framework is shown in
Figure 8. In Unity 3D, we used the collider component and wrote PID adjustment scripts to carry out the simulation:
We took the pitch angle
and roll angle
of the car body as the input of the PID control, and generated the driving force
of the
wheel as the output of the system. The output was
and
, which obtained
after different linear combinations. The structure diagram of the PID control is shown in
Figure 8.
2.2.4. Virtual Sensors and Driving Warning
We installed virtual sensors on the lunar rover to collect the terrain data of the surrounding environment. The sensor model was based on the VLP-32 three-dimensional lidar developed by Velodyne and implemented using the ray detection function in Unity.
The VLP-32 lidar scanned the lunar terrain with a fixed angular resolution. After scanning for a week, the angle and distance data of a set of points were obtained and converted into coordinates in the global coordinate system. We generated squares of different colors according to the difficulty of driving on the terrain, and used this as a marker. The rendering effect of the virtual sensor is shown in
Figure 9.
We generated mark points according to actual operation requirements, and the classification method is shown in
Table 1. The effect of driving warnings is shown in
Figure 10.
With the completion of the detection, the system carried out path planning according to the terrain data obtained by lidar and calculated the best scheme to reach the target point. We used the A* algorithm for path planning [
21]. The algorithm considers the distance cost and the slope cost calculated from radar data, and constantly searches for unknown nodes according to the heuristic function
. The formula is as follows:
where
represents the exact path from the starting point to node
n,
is the estimated remaining path from node
n to the target point,
is the horizontal distance from the starting point to node
n,
is the vertical distance from the starting point to node
n, and
is the slope parameter. The results of the path planning are shown in
Figure 11.