Four-Wheel Ground Following
R2026bLibraries:
Offroad Autonomy Library /
Ground Following
Description
Add-On Required: This feature requires the Robotics System Toolbox Offroad Autonomy Library add-on.
The Four-Wheel Ground Following block computes a terrain-aligned 3-D pose (translation and rotation) for a four-wheeled vehicle moving over uneven ground in Simulink®, without requiring Unreal Engine® visualization. The block uses the 2-D pose of the rear-axle frame of the vehicle chassis and the wheel parameters to determine the vehicle translation and orientation where the wheels remain in contact with the terrain surface. The output pose represents the vehicle chassis aligned with the terrain geometry.
The chassis is modeled as a rectangular frame whose length and width are equal to the wheel base and track width respectively, and the rear-axle frame is placed at the midpoint of the rear axle of this rectangular chassis frame. All input and output poses use a right-handed coordinate system. The block uses meters for all distance values and meters per pixel for resolution.
Use this block for kinematic simulation of wheeled vehicles where you need ground following, but do not need to account for wheel dynamics or suspension modeling. You can use the outputs with the Chassis To Tree-Frame Motion block to simulate (Inertial Measurement Unit) IMU readings at sensor mounting locations defined on a rigid body tree.
Ground Elevation Lookup
The Four-Wheel Ground Following block gathers the elevation values of the wheels by projecting XY-plane of the wheel frame, which is always vertically downwards in the world frame. It then uses the coordinates of the projection to look up the terrain elevation from the heightmap using bilinear interpolation. In contrast, the Simulation 3D Four-Wheel Ground Following block, uses ray tracing perpendicular to the chassis in an Unreal Engine scene.
This figure illustrates the difference between the Simulink vertical projection approach and the Unreal® perpendicular ray tracing approach.
This distinction means:
On flat or gently sloped terrain, results closely match the Simulation 3D Four-Wheel Ground Following block.
On steep terrain, the vertical projection may yield different contact points than the chassis-perpendicular projection used in Unreal Engine.
Comparison with Simulation 3D Ground-Following Block
This table summarizes the differences between the Four-Wheel Ground Following block and the Simulation 3D Four-Wheel Ground Following block.
| Aspect | Four-Wheel Ground Following | Simulation 3D Four-Wheel Ground Following |
|---|---|---|
| Requires Unreal Engine | No | Yes |
| Terrain source | 16-bit grayscale PNG heightmap | Unreal Engine scene |
| Ray projection | Vertical (world-frame Z-down) | Perpendicular to chassis |
| Output match | Not an exact match with the Simulation 3D Four-Wheel Ground Following block | Native Unreal Engine output |
Examples
Limitations
This block does not model wheel dynamics, suspension, or tire deformation. It computes a purely kinematic terrain-following pose.
The Resolution (m / pixel) parameter requires a two-element vector. Uniform resolution must be specified as
[res, res].
Ports
Input
Output
Parameters
More About
Tips
When importing terrain from Unreal Engine, all Unreal values are in centimeters. Divide Translation and Scale values by 100 to convert to meters before entering them as block parameters.
The terrain origin is at the center of the heightmap image. Use the Origin (m) parameter to translate the terrain to the desired location in the world frame.
You can feed the Translation and Rotation outputs of this block back into an Unreal Engine simulation to enforce an exact match between Simulink and Unreal ground-following results.
To simulate IMU readings, connect the Translation and Rotation outputs to the Chassis To Tree-Frame Motion block, which transforms velocities and accelerations to a target sensor frame on a rigid body tree.
Algorithms
Version History
Introduced in R2026b







