주요 콘텐츠

Simulation 3D Haul Truck

R2026b

Haul truck with ground following in 3D simulation environment

Since R2026b

  • Simulation 3D Haul Truck Block Icon

Libraries:
Offroad Autonomy Library / Simulation 3D

Description

Add-On Required: This feature requires the Robotics System Toolbox Offroad Autonomy Library add-on.

The Simulation 3D Haul Truck block provides an interface to implement a ground-following haul truck vehicle in the Simulink® 3D world.

Note

Simulating models with the Simulation 3D Haul Truck block requires Simulink 3D Animation™ and the Robotics System Toolbox™ Offroad Autonomy Library support package. For more information about downloading the support package, see Install Robotics System Toolbox Offroad Autonomy Library Support Package.

The haul truck is part of the Offroad Vehicle Library. For more information about the haul truck model, such as its dimensions, see Haul Truck.

To use this block, ensure that the Simulation 3D Scene Configuration block is in your model. If you set the Sample time parameter of the Simulation 3D Haul Truck block to -1, the block inherits the sample time specified in the Simulation 3D Scene Configuration block.

Examples

expand all

Open the SimulateHaulTruckInOpenPitMine Simulink model. This model contains a Simulation 3D Scene Configuration block and a Simulation 3D Haul Truck block. Note that the offroad pit mining scene must be installed before you can set it in the Simulation 3D Scene Configuration block.

open_system("SimulateHaulTruckInOpenPitMine");

This model places the haul truck at the bottom of the pit mine and oscillates the haul truck bed between its lowest and highest configurations.

Simulate the model. This figure shows the Simulation 3D Viewer with the view manually set to the left camera view.

sim("SimulateHaulTruckInOpenPitMine.slx");

Ports

Note

Note that this block processes input and output values using the right-hand rule MATLAB® world coordinate system. For more information, see Coordinate Systems for Unreal Engine Simulation in Robotics System Toolbox.

Input

expand all

The input ports specify the pose of the rear-axle frame on the haul truck. The x- and y-positions of the origin of the rear-axle frame are centered on the rear-axle, and the z‑position of the frame is aligned with the ground‑contact plane where the rear wheels touch the ground.

x-position of the rear-axle frame of the haul truck in the world coordinate system, specified as a numeric scalar. Units are in meters.

Data Types: double

y-position of the rear-axle frame of the haul truck in the world coordinate system, specified as a numeric scalar. Units are in meters.

Data Types: double

Yaw (z-axis) angle of the rear-axle frame of the haul truck in the world coordinate system, specified as a numeric scalar. Units are in radians.

Data Types: double

Truck bed angle, specified as a scalar in the range [0, 0.7854]. Units are in radians.

This value determines the vertical angle of the truck bed.

Dependencies

To enable this port, select the Enable lift angle input signal parameter.

Output

expand all

The Base Translation and Base Rotation output ports return the pose of the origin frame of the haul truck. The x-, y-, and z-position of the origin of the origin frame are centered on the ground‑contact plane where the four wheels touch the ground.

The Bed Translation and Bed Rotation output ports return the pose of the haul truck bed frame, located at top-end of the piston actuator that moves the truck bed.

Current ground truth world translation of the origin frame of the haul truck, returned as a three-element row vector of the form [x y z]. The elements of the vector are the translations along the x-, y-, and z-axes, respectively. Units are in meters.

Dependencies

To enable this port, select the Enable ground truth world base translation output signal parameter on the Outputs tab of the block mask.

Data Types: double

Current ground truth world rotation of the origin frame of the haul truck, returned as a 3-by-3 rotation matrix representing the orientation of the origin frame of the haul truck relative to the world frame. The rotation follows the right-hand rule.

Dependencies

To enable this port, select the Enable ground truth world base rotation output signal parameter on the Outputs tab of the block mask.

Data Types: double

Current ground truth world translation of the haul truck bed frame, returned as a three-element row vector of the form [x y z]. The elements of the vector are the translations along the x-, y-, and z-axes, respectively. Units are in meters.

Dependencies

To enable this port, select the Enable ground truth world bed translation output signal parameter on the Outputs tab of the block mask.

Data Types: double

Current ground truth world rotation of the origin frame of the haul truck bed frame, returned as a 3-by-3 rotation matrix representing the orientation of the bed-frame origin relative to the world frame. The rotation follows the right-hand rule.

Dependencies

To enable this port, select the Enable ground truth world bed rotation output signal parameter on the Outputs tab of the block mask

Data Types: double

Parameters

expand all

Parameters

Specifies the name of the vehicle as a string scalar. By default, the block sets the Name parameter to SimulinkVehicle.

The vehicle name appears as an option for the Parent name parameter of any simulation 3D sensor blocks within the same model as the vehicle, enabling you to mount those sensors to the vehicle.

Select this parameter to visualize the ray tracing lines emitted at the haul truck wheels. These ray tracers detect the ground under the haul truck for ground following.

Specifies the sample time, Ts, as a positive scalar in seconds. The graphics frame rate is the inverse of the sample time.

If you set the sample time to -1, the block uses the sample time specified in the Simulation 3D Scene Configuration block.

Initial Values

Specifies the initial translation of the rear-axle frame of the haul truck as a three-element row vector of the form [x, y , z], where x, y , and z are the translations along the x-, y-, and z-axes respectively, using the right-hand rule world coordinate system. Units are in meters.

Specifies the initial rotation of the rear‑axle frame of the haul truck as a 3‑by‑3 rotation matrix. The rotation follows the right‑hand rule in the world coordinate system and represents the orientation of the rear‑axle frame relative to the world frame.

Specifies the initial lift angle of the haul truck bed as a numeric scalar in the range [0, 0.7854]. Units are in radians.

Inputs

Select this parameter to enable the Bed Angle input port.

Outputs

Select this parameter to output the ground truth world translation of the origin frame of the haul truck at the Base Translation output port.

Select this parameter to output the ground truth world rotation of the origin frame of the haul truck at the Base Rotation output port.

Select this parameter to output the ground truth world translation of haul truck bed at the Bed Translation output port.

Select this parameter to output the ground truth world rotation of haul truck bed at the Bed Rotation output port.

Algorithms

expand all

The block computes a ground-following pose for the vehicle center by fitting a ground plane to four wheel-contact points and projecting the vehicle frame onto that plane.

Version History

Introduced in R2026b