Clear Filters
Clear Filters

How to run Simulink using unreal engine?

3 views (last 30 days)
준규 박
준규 박 on 4 Oct 2022
Answered: Rahul on 15 Jun 2023
However, in the last step, when running Simulink and playing Unreal Engine, As shown in the picture below, the vehicle is not created
and only the scene is continuously shown. So how do you make it work like a video?
Additionally, I designed only one vehicle differently from the video, and I uploaded the Simulink design as a capture.
  1 Comment
Harshit Gupta
Harshit Gupta on 7 Oct 2022
Are you facing a similar issue when you follow everything exactly as given in the video (i.e. when you don't design even one vehicle differently from the video)?
If the answer to the above question is a yes, then the issue might be because of your camera settings in the Unreal Engine. The camera might be focusing on the road from the front part of the car because of which you are not able to see the car but it is present. If the camera focuses on the road from some offset distance behind the vehicle, you should be able to see the vehicle as well.

Sign in to comment.

Answers (1)

Rahul
Rahul on 15 Jun 2023
You need to ensure a couple of steps to get your issue resolved:
Step 1: Ensure you have followed each step to get the simulation working as given in the video- Integrating RoadRunner with MATLAB-Simulink Video - MATLAB & Simulink (mathworks.com)
Step 2: You need to check if the coordinate system of your scene and vehicle are same and the vehicle is placed slightly higher on the road. You can do this by setting the initial position z-coordinate of the Simulation 3D vehicle with Ground following block to be 0.5 or 1.
Step 3: You can also set the Scene view parameter in the Simulation 3D scene configuration block to be the vehicle which you have added the camera to.
Step 4: Once you click play on Unreal Engine, you can control the camera view of the simulation using arrow keys, then you can navigate around and find if you vehicle is appearing anywhere in the scene.
Step 5: If you are using any custom vehicle for the Simulation 3D vehicle with Ground following block, then you should ensure the file is correct.

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!