How can I pass Matlab simulation data to Unreal Engine model?
5 views (last 30 days)
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
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
Answers (1)
Agastya Bagaskara
on 16 Dec 2024
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
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!