Main Content

Suburban scene

Suburban Unreal Engine environment

Since R2022b

Description

The Suburban scene is an Unreal Engine® environment of a suburban area that contains houses with backyards, trees, power poles, and vehicles on the road. The scene is rendered using the Unreal Engine from Epic Games®.

Suburban scene sample visualization.

Setup

To simulate a UAV flight in this scene:

  1. Download the Suburban scene from the server.

  2. Add a Simulation 3D Scene Configuration block to your Simulink® model.

  3. In this block, set the Scene source parameter to Default Scenes.

  4. Set the enabled Scene name parameter to Suburban scene.

Examples

expand all

This example shows how to download and access the Suburban scene map from the Simulation 3D Scene Configuration block. Then add a UAV vehicle and simulate a simple flight scenario in the Unreal Engine® simulation environment.

Download Suburban Scene Map

To begin, check the maps available in the server.

sim3d.maps.Map.server
        MapName                        Description                    Version    MinimumRelease    ReleaseUpdate
    ________________    __________________________________________    _______    ______________    _____________

    "Suburban scene"    "a suburban area beyond the city's border"      "1"         "R2022b"           "[]"     

Download the Suburban scene from the server.

sim3d.maps.Map.download("Suburban scene")
Map is successfully downloaded and is up-to-date

Check if the downloaded maps are available in your local machine.

sim3d.maps.Map.local
        MapName                        Description                    Version    MinimumRelease    ReleaseUpdate
    ________________    __________________________________________    _______    ______________    _____________

    "Suburban scene"    "a suburban area beyond the city's border"      "1"         "R2022b"           "[]"     

Add Suburban Scene Map to Simulink model

Open the Simulink model.

open_system("uavSuburbanScene")

Open the Simulation 3D Scene Configuration block mask and set Scene name to Suburban scene.

set_param("uavSuburbanScene/Simulation 3D Scene Configuration", "SceneDesc", "Suburban scene");
open_system("uavSuburbanScene/Simulation 3D Scene Configuration")

Add UAV Vehicle

Open the Simulation 3D UAV Vehicle block mask and set the color of the vehicle in Color to Yellow or any color of your choice. Specify the name of the vehicle in Name as Quadrotor1.

open_system("uavSuburbanScene/Simulation 3D UAV Vehicle")

To change the prespective of the scene to follow behind the UAV, set Scene view to Quadrotor1 in Simulation 3D Scene Configuration block.

Simulate Model

When the simulation begins, it can take a few seconds for the visualization engine to initialize, especially when you are running it for the first time.

sim("uavSuburbanScene","StopTime","10");

Tips

  • If you have the UAV Toolbox Interface for Unreal Engine Projects support package, then you can modify this scene. In the Unreal Engine project file that comes with the support package, this scene is named Suburban scene.

    For more details on customizing scenes, see Customize Unreal Engine Scenes for UAVs.

Version History

Introduced in R2022b