Main Content

Vehicle Scenarios

Drive cycles, driver models, test maneuvers, and 3D simulation in Unreal Engine®visualization environment

To configure vehicle scenarios, use the drive cycle, driver, and 3D simulation blocks.

  • Drive Cycle Sourceblock — Generates a standard or user-specified longitudinal drive cycle. By default, the block includes theFTP–75drive cycle. To install additional drive cycles from a support package, seeSupport Package For Maneuver and Drive Cycle Data. The support package has drive cycles that include gear shift schedules, for exampleJC08andCUEDC.

  • Driver blocks — Implement controllers that generate normalized steering, acceleration, and braking commands to track velocity or displacement.

  • 3D visualization blocks — Integrate 3D visualization environment with Simulink®so that you can interrogate the world around the vehicle for virtually testing perception, control, and planning algorithms.

Blocks

expand all

Drive Cycle Source Standard or specified longitudinal drive cycle
Lateral Driver Lateral path-tracking controller
Longitudinal Driver Longitudinal speed-tracking controller
Predictive Driver Predictive driver controller to track longitudinal speed and lateral path
Simulation 3D Vehicle Implement vehicle in 3D environment
Simulation 3D Vehicle with Ground Following Implement vehicle that follows ground in 3D environment
Simulation 3D Tractor Implement tractor in 3D environment
Simulation 3D Trailer Implement trailer in 3D environment
Simulation 3D Motorcycle Implement motorcycle in 3D environment
Simulation 3D Dolly Implement dolly in 3D environment
Vehicle Terrain Sensor Vehicle and tire distances to objects
Simulation 3D Scene Configuration Scene configuration for 3D simulation environment
Simulation 3D Actor Transform Get Get actor translation, rotation, scale
Simulation 3D Actor Transform Set Set actor translation, rotation, scale
Simulation 3D Camera Get Camera image
Simulation 3D Message Get Retrieve data fromUnreal Enginevisualization environment
Simulation 3D Message Set Send data toUnreal Enginevisualization environment

Scenes and Vehicle Dimensions

expand all

Curved Road Curved road 3D environment
Double Lane Change Double lane change 3D environment
Large Parking Lot Large parking lot 3D environment
Open Surface Open surface 3D environment
Parking Lot Parking lot 3D environment
Straight Road Straight road 3D environment
US City Block US city block 3D environment
US Highway US highway 3D environment
Virtual Mcity VirtualMcity3D environment
Box Truck Box truck vehicle dimensions
Hatchback Hatchback vehicle dimensions
Muscle Car Muscle car vehicle dimensions
Sedan Sedan vehicle dimensions
Small Pickup Truck Small pickup truck vehicle dimensions
Sport Utility Vehicle Sport utility vehicle dimensions
Cab-Over Tractor Cab-over tractor dimensions
Conventional Tractor Conventional tractor dimensions
Two-Axle Trailer Two-axle trailer dimensions
三轴拖车 Three-axle trailer dimensions
One-Axle Dolly One-axle dolly dimensions
Two-Axle Dolly Two-axle dolly dimensions
Three-Axle Dolly Three-axle dolly dimensions
Motor Bike Motor bike dimensions
Scooter Scooter dimensions
Sports Bike Sports bike dimensions

Functions

expand all

sim3d.Editor Interface to theUnreal Engineproject
open Open theUnrealEditor
ASim3dActor Abstract class to use as a base class for user-definedUnreal EngineC++ or blueprint actors
Sim3dSetup C++ method that sets up actor inUnreal Engine3D simulation
Sim3dStep C++ method that steps actor inUnreal Engine3D simulation
Sim3dRelease C++ method that releases actor inUnreal Engine3D simulation
StartSimulation3DMessageReader Constructs a message reader object in theUnrealEditor
ReadSimulation3DMessage Receives message from金宝appmodel using a message reader object
StopSimulation3DMessageReader Deletes message reader object in theUnrealEditor
StartSimulation3DMessageWriter Constructs a message writer object in theUnrealEditor
WriteSimulation3DMessage Sends message to金宝appmodel using a message writer object
StopSimulation3DMessageWriter Deletes message writer object in theUnrealEditor

Topics

Simulation Basics

3D Simulation for Vehicle Dynamics Blockset

Learn now to visualize vehicle performance in a 3D environment using the Unreal Engine from Epic Games®.

Unreal Engine Simulation Environment Requirements and Limitations

When simulating in the Unreal Engine environment, keep these software requirements, minimum hardware requirements, and limitations in mind.

How 3D Simulation for Vehicle Dynamics Blockset Works

Learn about the co-simulation framework between Simulink and the Unreal Engine and how block execution order affects 3D simulation.

Coordinate Systems in Vehicle Dynamics Blockset

Understand coordinate systems for representing vehicle dynamics.

Scene Customization

Customize 3D Scenes for Vehicle Dynamics Simulations

To customize scenes and vehicles, use theVehicle Dynamics Blockset™ Interface for Unreal Engine 4 Projectssupport package.

Get Started Communicating with the Unreal Engine Visualization Environment

Use the Simulation 3D Message Get and Simulation 3D Message Set blocks to communicate with the Unreal®Editor.

Animate Custom Actors in the Unreal Editor

Animate a custom bicycle actor.

Create and Use an Oval Track

Create a oval track withRoadRunnerand use it in a Vehicle Dynamics Blockset simulation that co-simulates with Unreal.

Prepare Custom Vehicle Mesh for the Unreal Editor

Create custom vehicle mesh for theSimulation 3D VehicleandSimulation 3D Vehicle with Ground Followingblocks.

Place Cameras on Actors in the Unreal Editor

Place theSimulation 3D Camera GetSimulation 3D Camerablock on static and custom actors.

Send and Receive Double-Lane Change Scene Data

Use the Simulation 3D Message Set and Simulation 3D Message Get blocks to communicate with the double-lane change scene.

Featured Examples