Errors while linking unreal engine to matlab

Unreal Engine: 5.1.1
Matlab Release: R2024a
I am trying to make a custom scene in unreal engine, for that I installed Aerospace Toolbox Unreal ENgine Interface, after installing, when I try to opne the editor using
`editor.open()'
I get following message:
I tried to build it through IDE but it gave me the following error:
I need help resolving this issue.

 Accepted Answer

Hi Ketan,
I believe this error regarding the MathWorks Geospatial plugin is suggesting that you have not installed CesiumForUnreal, which is necessary when using the Aerospace Blockset interface to Unreal Engine.
Please note the specific version of CesiumForUnreal needed for your version of MATLAB and please place the CesiumForUnreal plugin folder in the \UE_5.1\Engine\Plugins\Marketplace directory.
Regarding the first error, are you upgrading from an older version of MATLAB or are you installing these plugins for the first time?
Let me know if installing the Cesium plugin works for you to resolve the IDE build!
Nishan

16 Comments

Ketan
Ketan on 16 Sep 2024
Edited: Ketan on 16 Sep 2024
Hey Nishan,
I already have CesiumforUnreal v1.20.1-ue5 Installed and I am able to open projects with it.
I am installing MATLAB plugins for the first time.
Hi Ketan,
Gotcha, sorry if that wasn't the issue. Do you have different versions of Unreal Engine installed? E.g. 4.27, etc?
Would you be able to ensure that the default editor being opened is 5.1 instead of any older version? I believe people have sporadically run into issues before when an older version of Unreal is installed, I wonder if you can uninstall any older versions of Unreal and try again with a fresh install of the support package.
Could you share the log file located in "<UE5Project>/Saved/Logs/<UE5Project>.log"?
Nishan
Sure, Here is the log file:
Ketan, when you downloaded the plugin, did you follow the instructions to run the "sim3d.utils.copyExampleSim3dProject" function: https://www.mathworks.com/help/releases/R2024a/aeroblks/install-support-package-and-configure-environment.html#mw_9625caa4-f1a9-422c-b2c2-7a75a633c803
This step is necessary to ensure the plugins are placed correctly in the Unreal Engine installation folder. Can you try the above and see if you can open that project that you create via editor.open()?
Ketan
Ketan on 16 Sep 2024
Edited: Ketan on 16 Sep 2024
Hey Nishan, That is the first thing I tried after installing the Unreal Engine Interface.
I tried it again, same error. Sharing the log.
Can you verify that the MathWorksSimulation plugin is at the following directory?
C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Marketplace\MathWorks\MathWorksSimulation
Did you install Unreal Engine in an external directory instead of the above default?
The MathWorksSimulation plugin is at the following director:
"E:\UE_5.1\Engine\Plugins\Marketplace\MathWorks\mw_simulation\MathWorksSimulation"
Thanks for confirming that Ketan.
Can you verify the existence of the "AutoVrtlEnv.uproject" and the plugins in the ProgramData directory too? This is usually under: "C:\ProgramData\MATLAB\SupportPackages\R2024a\toolbox\shared\sim3dprojects\spkg"
I suspect the issue may be related to the fact that your UE installation is in the E: drive instead of C: drive. The API is configured to copy the plugins around the system under the C: drive by default. Did you specify the PluginDestination argument to tell the API that your UE installation is under the E: drive?
Do you happen to have an Unreal Engine installation in your C drive as well or is it only in the E drive?
1.) Directory "C:\ProgramData\MATLAB\SupportPackages\R2024a\toolbox\shared\sim3dprojects\spkg" exists
2.) I think I missed the step of specifying PluginDestination.
but after I do that, it shows the following error.
>> sim3d.utils.copyExampleSim3dProject("E:\UnrealProjects\");
Error using sim3d.utils.copyExampleSim3dProject
Directory 'C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Marketplace\MathWorks' already exists.
Error in sim3d.utils.copyExampleSim3dProject
Turns out, the plugins are present in side the 'C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Marketplace\MathWorks' directory
I tried manually copying them from that folder to my UE installation/plugin/marketplace/MathWorks/
doing this gives me a new error:
Update; Now, If I open the projects from Scene 3D Configuration block, The UE editor launches without any errors. But If I directly open the project and enable mathwork plugins, it throws the same error.
Hi Ketan,
This is expected behavior that is documented here - once you enable the MathWorks Simulation plugin, the Unreal Engine project can only be opened via MATLAB or Simulink. If you don't plan on working in both environments together very often, you can disable the plugins and re-enable them as necessary when doing co-simulation.
Apologies for this inconvenience and I'm glad everything is working now!
Nishan
Thank you!! I appreciate your assistance.
@Nishan Nekoo Is it possible to an build executable for Linux from UE and matlab on windows.
I tried doing it, but I got the following error:
Missing precompiled manifest for 'MathWorksAerospace', 'E:\UE_5.1\Engine\Plugins\Marketplace\MathWorks\MathWorksSimulation\Intermediate\Build\Linux\B4D820EA\UnrealGame\Development\MathWorksAerospace\MathWorksAerospace.precompiled'
could you please point me to the documentation which can guide be for the same.
Hi Ketan, I believe this should be possible.
Please follow the instructions here but select Linux instead of Windows: https://www.mathworks.com/help/aeroblks/package-custom-scenes-into-executable.html
Let me know if you still run into issues after following the instructions on that page.
Nishan
Ketan
Ketan on 19 Sep 2024
Edited: Ketan on 19 Sep 2024
Hey Nishan,
I am sure I've followed those steps, yet I am getting the same error;
Errors:
Library 'E:\MATLAB\R2024a\bin\glnxa64\libmwshared_sim3d_io.so' was not resolvable to a file when used in Module 'MathWorksSimulation'
Missing precompiled manifest for 'MathWorksAerospace', 'E:\UE_5.1\Engine\Plugins\Marketplace\MathWorks\MathWorksSimulation\Intermediate\Build\Linux\B4D820EA\UnrealGame\Development\MathWorksAerospace\MathWorksAerospace.precompiled'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in MathWorksAerospace.build.cs to override. If part of a plugin, also check if its 'Type' is correct.
Attaching the log for reference.

Sign in to comment.

More Answers (0)

Products

Release

R2024a

Asked:

on 13 Sep 2024

Edited:

on 19 Sep 2024

Community Treasure Hunt

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

Start Hunting!