How can I pass Matlab simulation data to Unreal Engine model?
Show older comments
At the moment I'm looking for a way to pass data from Matlab to Uneal Engine. I have a whole numerical model of a system in matlab&simulink and create data of the movements of the body (like a time-distance table). Now I want to visualize the computed behaviour of the matlab model with the visual model in Unreal Engine. Does someone know something about similar applications, tutorials, documentations oder videos that could help me with my question? i would be very thankful for any answers!
3 Comments
Preston Webb
on 10 Jan 2018
Jakob, I am looking at doing something similar I would love to communicate on this so we can quickly come to a solution. I am currently working on a research project where I am building a flight sim using a physics model in matlab and looking to integrate that with UE4 to drive the physics while UE4 handles the visuals.
Rafael Accácio Nogueira
on 4 Mar 2018
Maybe you can use the MATLAB API for C++: https://fr.mathworks.com/help/matlab/Cpp-api.html https://fr.mathworks.com/solutions/matlab-and-other-programming-languages.html#converting_matlab_code_to_c_code
I've never done it but I intend to try it
Vic Terry
on 21 Nov 2018
@Preston Webb, did you manage to get a solution for this?
Answers (1)
Agastya Bagaskara
on 16 Dec 2024
0 votes
Dear Jakob,
Starting in R2024B, you can use the Read UAV Trajectory block to generate translation and rotation samples from a UAV trajectory that you create using a multirotorFlightTrajectory, fixedwingFlightTrajectory, polynomialTrajectory, or waypointTrajectory object in MATLAB.
You can then use the output of this block as an input for the Simulation 3D UAV Vehicle block to place the UAV in the Unreal Engine scenario.
Please refer to these examples for more information:
- https://www.mathworks.com/help/uav/ug/simulate-uav-scenario-trajectory-in-ue.html
- https://www.mathworks.com/help/uav/ug/design-real-world-trajectory-visualize-cesium.html
- https://www.mathworks.com/help/uav/ug/simulate-flight-plan-real-world-cesium.html
Best regards,
Agastya
Categories
Find more on Simulink 3D Animation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!