Is it posibble to import a simulink model into Unreal Engine simulation ?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jakub Wiech
le 10 Juil 2024
Commenté : Nishan Nekoo
le 12 Juil 2024
Hi,
I'm trying to create a simulation of a self-driving car in Unreal Engine with Simulink modeling the dynamics and control logic. It is easy to use UE scenes in Simulink, but I'm wondering if it's possible to compile the Simulink model into the Unreal Engine project. The simulation would be developed in Unreal Engine, and I need the logic from Simulink to be imported into the UE project.
Is there any easy way to do this, except for compiling the Simulink model into C++ and incorporating it by hand into UE project?
Thanks for the help.
0 commentaires
Réponse acceptée
Nishan Nekoo
le 12 Juil 2024
Hi Jakub,
There currently isn't a very easy way to do this unfortunately beyond the method you have mentioned. Can you tell me a little more about your use case for doing this? Is it due to the co-simulation performance or are there any other reasons?
Nishan
2 commentaires
Nishan Nekoo
le 12 Juil 2024
Hi Jakub,
I just wanted to note that Simulation 3D blocks currently do not support code generation to begin with (link to doc), so you wouldn't be able to generate code or a standalone application for your Simulink model if you are using Simulation 3D blocks. The development team is aware of this limitation and may consider improving this in a future product release.
If you aren't using Simulation 3D blocks, then integrating is possible but this will likely be a tricky process as you have mentioned. For one, the generated Simulink code would need to be recompiled which requires dealing with any dependencies needed. You will likely also need to write some C++ code to expose the functions to blueprints etc if that is what you are using.
I apologize that there isn't a more straightforward approach for now... but we are aware of how useful this workflow can be!
Nishan
Plus de réponses (1)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!