Main Content

How 3D Simulation forVehicle Dynamics BlocksetWorks

The vehicle dynamics models run programmable maneuvers in a photorealistic 3D visualization environment. Vehicle Dynamics Blockset™ integrates the 3D simulation environment with Simulink®so that you can query the world around the vehicle for virtually testing perception, control, and planning algorithms. The Vehicle Dynamics Blockset visualization environment uses the Unreal Engine®by Epic Games®.

了解这模拟环境的工作s can help you troubleshoot issues and customize your models.

Communication with 3D Simulation Environment

When you use Vehicle Dynamics Blockset to run your algorithms, Simulink co-simulates the algorithms in the visualization engine.

In the Simulink environment, Vehicle Dynamics Blockset:

  • Determines the next position of objects by using 3D visualization environment feedback and vehicle dynamics models.

  • Configures the 3D visualization environment, specifically:

    • Ray tracing

    • Scene capture cameras

    • Initial object positions

In the visualization engine environment, Vehicle Dynamics Blockset positions the objects and uses ray tracing to query the environment.

The diagram summarizes the communication between Simulink and the visualization engine.

Block Execution Order

During simulation, the 3D simulation blocks follow a specific execution order:

  1. 车辆模块初始化车辆和森d theirX,Y, andYawsignal data to theSimulation 3D Scene Configurationblock.

  2. TheSimulation 3D Scene Configurationblock receives the vehicle data and sends it to the sensor blocks.

  3. The sensor blocks receive the vehicle data and use it to accurately locate and visualize the vehicles.

ThePriorityproperty of the blocks controls this execution order. To access this property for any block, right-click the block, selectProperties, and click theGeneraltab. By default,Simulation 3D Vehicle with Ground Followingblocks have a priority of-1,Simulation 3D Scene Configurationblocks have a priority of0, and sensor blocks have a priority of1.

If your sensors are not detecting vehicles in the scene, it is possible that the 3D simulation blocks are executing out of order. Try updating the execution order and simulating again. For more details on execution order, seeControl and Display Execution Order.

Also be sure that all 3D simulation blocks are located in the same subsystem. Even if the blocks have the correctPrioritysettings, if they are located in different subsystems, they still might execute out of order.

Related Examples

More About

External Websites