3D Simulation for Testing Unmanned Aerial Vehicles (UAV) Applications
UAV Toolbox provides a 3D simulation environment for unmanned aerial vehicles (UAVs) rendered using the Unreal Engine® from Epic Games® to help UAV engineers build realistic scenarios, model sensors, and test UAV algorithms. Using these capabilities, you can design autonomous UAV applications, co-simulate Simulink® with Unreal Engine, and generate synthetic lidar and image data. The sensor data generated enables closed-loop simulation to verify UAV algorithms.
The toolbox also supports depth and semantic segmentation visualization, which can be used to validate depth estimation algorithms and generate semantic segmentation data to train neural networks. Explore the UAV Package Delivery example to see the Unreal Engine used with multiple sensors in a real use case. Finally, while the toolbox comes installed with prebuilt scenes, you can also build custom scenes with UAV Toolbox Interface for Unreal Engine Projects.
Published: 24 Nov 2020
UAV Toolbox provides a 3D simulation environment using the “Unreal Engine® simulation environment from Epic Games” to help UAV developers build realistic scenarios, model sensors, and test their behavior in the provided environment.
Using these capabilities, you can build a Simulink flight model, simulate it in the Unreal Engine co-simulation controlling it from Simulink, and analyze the Lidar and image data generated.
To quickly get started, open a new “Simulink model” and select “blank model”.
Open the “Library Browser”, and scroll down to the “UAV Toolbox”. Expand it and select “Simulation 3D”. This consists of the blocks needed to create a simple model.
To get started, we drag and drop the “Simulation 3D UAV Vehicle” block to the new Simulink model.
This block implements a quadrotor or fixed wing UAV in the 3D simulation environment.
For this model, we select the quadrotor and set the name to “Quadrotor1”.
Next, we copy over the “Simulink 3D Scene Configuration” block.
This block implements a 3D simulation environment that is rendered using the Unreal Engine.
For this model, we use the default “US city block” scene and set the scene view to “Quadrotor1”.
Finally, we add a sensor to the model. The UAV Toolbox provides Lidar, Fisheye camera, and normal camera blocks for you to simulate.
For this model, we import the “Simulation 3D Camera” block into the model and check that “parent name” is set to the “Quadrotor1”. You can change the location of the camera on the vehicle and for this model, we will move it 10 cm forward.
To display the camera output, we add a “Video viewer” block.
To move the quadrotor in the simulation, we add translation and rotation inputs using constant and ramp blocks.
The model is now complete. To run it, click on “Run”. Two windows pop up, the first is the Unreal engine viewer, and the second is the view of the camera data.
Pausing the Simulink model also pauses the Unreal simulation which shows the synchronization between them and enables the validation of the model next to the live environment.
The toolbox also supports more complex 3D simulation capabilities such as depth visualization and semantic segmentation visualization.
You can use depth maps to validate depth estimation algorithms, and generate semantic segmentation data that can be used to train neural networks.
For a more comprehensive example showcasing the unreal engine being used with multiple sensors and a real use case, you can explore the “UAV Package Delivery” example.
This example shows how to implement a small multicopter simulation to takeoff, fly, and land at a different location.
Finally, while the toolbox comes installed with prebuilt scenes, users can use custom scenes. To do this, please refer to the help page “Customize Unreal Engine Scenes for UAVs” which gives you instructions on the support packages and tools needed.
For more information on 3D simulation, please search for "Scenario Simulation" in the UAV Toolbox documentation. Here you can find additional information and examples to get started.