2. Create Photorealistic Scenario Simulations
Simulate and visualize your vehicle models, such as an excavator, in the photorealistic 3D environment from Unreal Engine®. Use this scenario simulation to visualize vehicle movement and generate synthetic sensor data for autonomous algorithm development. By running scenario simulation in parallel with dynamic simulation in Simulink, you can validate the performance of your algorithms in perception, motion planning, and motor control.
Section 1: Three ways to perform 3D scenario simulation with Simulink and Unreal Engine
![Illustration shows three different ways to perform 3D scenario simulation with Simulink and Unreal Engine.](https://fr.mathworks.com/solutions/robotics/offroad-vehicles/scenario-simulations/_jcr_content/mainParsys/band_copy_copy/mainParsys/columns_406906434_co_1344387074/cc0c1574-a0ed-47a5-948e-b30447140d2e/image_copy.adapt.full.medium.jpg/1719932574428.jpg)
Resources
- Autonomous Excavator – GitHub
Explore 3D scenario simulations of excavators in Unreal Engine and Simulink. Use a prebuilt Unreal Engine executable without the need to Install Unreal Engine Editor. - Using Unreal Engine with Simulink – Video Series
- Visualize with Cesium – Documentation
Convert 3D map and terrain data of a location into a scenario. - Unreal Engine Simulation Environment Requirements and Limitations – Documentation
Each version of MATLAB supports a specific version of Unreal Engine. MATLAB 2024a supports Unreal Engine Version 5.1.
Section 2: Control the machine movement in scenario simulation, and read sensor data from scenario simulation
![Illustration shows Simulink blocks being used for data exchange with Unreal Engine.](https://fr.mathworks.com/solutions/robotics/offroad-vehicles/scenario-simulations/_jcr_content/mainParsys/band_copy_copy/mainParsys/columns_406906434_co_695962234/cc0c1574-a0ed-47a5-948e-b30447140d2e/image_copy_copy.adapt.full.medium.jpg/1719932574483.jpg)
Resources
- Use Actor Blocks to Send Control Signals to Unreal Engine – Documentation
- Use Sensor Blocks to Retrieve Sensor Data from Unreal Engine – Documentation
Section 3: Connect to other 3D Simulators using ROS
Resources
- Connectivity to ROS-Enabled Simulators (Gazebo®, Unity, CARLA, NVIDIA® Isaac Sim™) – Documentation
- Design and Simulating Autonomy for Construction Vehicles (50:56) – Video
See how to set up a scenario simulation in MATLAB and Unity Game Engine using ROS for communication.