Scene Interrogation in 3D Environment
The scene interrogation with camera and ray tracing reference application provides the Simulink® interface with the 3D visualization environment. For the minimum hardware required to run the reference application, see Unreal Engine Simulation Environment Requirements and Limitations.
The scene interrogation with camera and ray tracing reference application contains:
One passenger vehicle with a simple driveline, combined slip wheel, and 3DOF vehicle dynamics model.
One camera mounted on the passenger vehicle rear-view mirror.
Steering, acceleration, gear, and braking controls.
Vehicle light controls.
3D visualization environment configured for the Virtual Mcity scene.
Create and open a working copy of the camera and ray tracing reference application project.
When you run the simulation, the reference application provides this vehicle and scene information.
Simulation 3D Viewer
Video output of the Unreal Engine® 3D visualization environment image feedback. By
default, the display shows the view from the Simulation 3D
Scene Configuration block Scene
To smoothly change the camera views, use these keyboard shortcuts.
For additional camera controls, use these keyboard shortcuts.
SDL Video Display
Video image output of Simulation 3D Camera Get block. By default, the display shows the view specified by these parameter settings:
This table summarizes the parts of the reference application.
Dials and gauges that control the vehicle steering, gear, acceleration, and braking. The braking control turns on the vehicle brake lights. Setting the gear control to R turns on the vehicle reverse lights.
The Simulation 3D Actor Transform Get block returns the translation, rotation, and scale for the vehicle passenger vehicle and four wheels from the 3D visualization environment.
The Simulation 3D Camera Get block returns the camera image from the 3D visualization environment. By default, the block returns image data for a camera location specified by these parameter settings:
Dynamics and Controls
Interfaces with Simulink to calculate the dynamic response of the vehicle plant and controller. By default, the subsystem contains a simple driveline and the Vehicle 3DOF Dual Track block vehicle dynamics model.
Implements a Light Controls subsystem that you can use to control the headlights and signal lights.
The Simulation 3D Vehicle with Ground Following block implements a passenger vehicle in the 3D visualization environment. The block uses the vehicle position to adjust the vehicle elevation, roll, and pitch so that the vehicle follows the ground terrain. By default, the block has these parameter settings:
The Simulation 3D Scene Configuration block configures the Unreal Engine 3D visualization environment. By default, the block has these parameter settings:
subsystem displays the translation, rotation, and scale of the
The ImageDisplay subsystem displays the video image output of Simulation 3D Camera Get block in the SDL Video Display window.
In the TransformDisplay subsystem, the Display block provides the translation, rotation, and scale of the vehicle body and four wheels. Use the Constant block value to control the display.
For example, to display translation information, set the value to
The display indicates that the:
Vehicle body is at
0.0112m along the world X-, Y-, and Z- axes, respectively.
Wheels are at their initial positions along the world X-, Y-, and Z- axes, respectively.
The Display block provides an array of the vehicle and wheel locations.
Vehicle translation and rotation are along the world coordinate system axes.
Wheel translations and rotations are with respect to their initial positions, along the world coordinate system axes.
In the ImageDisplay subsystem, the Level-2 MATLAB S-Function block
VideoDisplayMSfcnWin function to display the video image
output of Simulation 3D Camera Get block.
- Coordinate Systems in Vehicle Dynamics Blockset
- Customize 3D Scenes for Vehicle Dynamics Simulations
- How 3D Simulation for Vehicle Dynamics Blockset Works