Main Content

Simulation 3D UAV Vehicle

Place UAV vehicle in 3D visualization

  • Library:
  • UAV Toolbox / Simulation 3D

  • Simulation 3D UAV Vehicle block

Description

The Simulation 3D UAV Vehicle block implements an unmanned aerial vehicle (UAV) in a 3D simulation environment. This environment is rendered using the Unreal Engine® from Epic Games®. The block uses the input (X, Y, Z) position and input (roll, pitch, yaw) attitude of the UAV in the simulation.

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 UAV Vehicle block to -1, the block inherits the sample time specified in the Simulation 3D Scene Configuration block.

Note

The Simulation 3D UAV Vehicle block must execute before the Simulation 3D Scene Configuration block. That way, the Simulation 3D UAV Vehicle block prepares the signal data before the Unreal Engine 3D visualization environment receives it. To check the block execution order, right-click the blocks and select Properties. On the General tab, confirm these Priority settings:

  • Simulation 3D Scene Configuration0

  • Simulation 3D Vehicle-1

For more information about execution order, see Block Execution Order.

Ports

Input

expand all

Translated position of the vehicle relative to the Unreal Engine scene origin. Translation vector defines the X, Y, and Z positions, in meters, of the vehicle using the Unreal Engine world coordinate frame. For more information on the coordinate systems, see Coordinate Systems for Unreal Engine Simulation in UAV Toolbox.

Data Types: double

Rotation of the vehicle relative to the Unreal Engine inertial reference frame. The rotation vector defines the Yaw, Pitch, and Roll values, in degrees, of the vehicle rotation relative to the Unreal Engine world coordinate frame. For more information on the coordinate systems, see Coordinate Systems for Unreal Engine Simulation in UAV Toolbox.

Data Types: double

Parameters

expand all

Vehicle Parameters

Select the type of vehicle. To obtain the dimensions of each vehicle type, see these reference pages:

  • QuadcopterQuadcopter

  • Fixed wingFixed wing

Select the color of the vehicle.

Name of vehicle. By default, when you use the block in your model, the block sets the Name parameter to SimulinkVehicleX. The value of X depends on the number of Simulation 3D UAV Vehicle blocks that you have in your model.

The vehicle name appears as a selection in the Parent name parameter of any UAV Toolbox Simulation 3D sensor blocks within the same model as the vehicle. With the Parent name parameter, you can select the vehicle on which to mount the sensor.

Initial Values

Initial vehicle position along the X-axis, Y-axis, and Z-axis in the inertial Z-down coordinate system, in m.

Initial angle of vehicle rotation, in rad. The angle of rotation is defined by the roll, pitch, and yaw of the vehicle.

Sample Time

Sample time, Ts, 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.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2020b