Can Unreal physics engine be used for simulink models to verify the physics of simulation
8 次查看(过去 30 天)
显示 更早的评论
I recently saw that there is a visualisation block in simulink. It helps to visualise simulink models in a virtual environment of Unreal scenes. I want to know is this visualisation only for photo realistic or it includes physics too (Eg:- Gravity, collisions etc). This is incase of using Prebuilt Unreal scenes that Simulink uses. Looking forward for the response.
采纳的回答
Nishan Nekoo
2023-10-10
The answer is yes, it does include physics and is not just for visualization only!
With reference to this documentation page: https://www.mathworks.com/help/sl3d/scenario-simulation.html
You can use Simulink and MATLAB interfaces to "Access advanced features available in the Unreal Engine, such as collision detection, and the physics engine..."
A basic example:
More complex example and associated webinar series:
17 个评论
VIGNESH BALAJI
2023-10-17
Thanks a lot for providing a detailed information on this. I am interested in the Physics engine feature of Unreal engine. I have a follow up on this, I saw that Unreal scenes can be used with Simulink in 3 ways -
- Using inbuilt scene in Simulink
- Using a custom compiled scene in Simulink
- Using Co-Simulation at the same time running both Unreal and Simulink
Can I use the Physics engine in all the three methods or ways ?
VIGNESH BALAJI
2023-10-18
Thanks a lot for your reply, can you suggest me some inbuit scenes for water interaction and a quadrotor.
Nishan Nekoo
2023-10-18
Unfortunately we do not have any inbuilt scenes for water interaction right now.
VIGNESH BALAJI
2024-2-9
Can I model ropes with unreal ? Is there any examples for it with matlab available ?
Nishan Nekoo
2024-2-9
Hi Vignesh, unfortunately we do not have any examples of modeling ropes (or any other deformable body) with MATLAB in the Unreal environment. Depending on your use case, perhaps the rope behavior can be approximated using multiple primitives linked together heirarchically.
Can you provide more information on what you are hoping to model here?
VIGNESH BALAJI
2024-2-9
Sure, I can provide you a detailed information on it.
I am trying to model hanging ropes (catenaries) which are moving slowly (quasi-statically) in space as their end points move slowly (0.5 m/s) the hanging cable also moves.
I built a simulink model for it with analytical equations for a catenary and did optimisation of potential energies to always get the right shape of the hanging cable. Although the model is working, I have attached a video below as a zip file for your reference. Please take a look at it.
I would like to have a physical simulator (which acts like a model) to verify my correctness of my numerical calculations in my model and it can also be used for my further development to verify the model I am developing.
I hope I explained it. Please do let me know if you have any questions about what I am trying to do.
Nishan Nekoo
2024-2-9
编辑:Walter Roberson
2024-2-20
Hi Vignesh,
I think the most effective way to model this in Unreal is to use the Cable Component from Unreal: https://docs.unrealengine.com/4.27/en-US/Basics/Components/CableComponent/
You would need to carefully tune the parameters of the cable and the physics settings in Unreal to get realistic physical behavior.
You can control the movement of those Cable Components from Simulink by following a similar process to the one described in this video: https://www.youtube.com/watch?v=fNd0fVYxkGg&ab_channel=MATLAB
I hope that helps, all the best!
Nishan
VIGNESH BALAJI
2024-2-9
Thanks a lot for the suggestion and resources.
Once, I make this I can put it out as a FEX package like an open source plugin in the community for others to use it for their works.
I do have 2 questions -
- Does Simulink have a direct connection to Unity just like Unreal ?
- I heard Unity has better Cable modelling than Unreal like Obi Rope package ?
Please let me know.
Nishan Nekoo
2024-2-9
Unfortunately, we do not have a similar interface to Unity using Simulink 3D Animation. However, you can use the ROS Toolbox to connect to Unity such as in this example: https://www.mathworks.com/help/ros/ug/pick-and-place-workflow-in-unity-3d-using-ros.html.
I am not familiar with the cable modelling capabilities in either Unreal or Unity so I cannot comment on this topic.
Nishan
VIGNESH BALAJI
2024-2-12
@Nishan Nekoo
Thanks a lot for the suggestions. I have been looking into Unreal engine with simulink. Can you please let me know if there are examples of multi-rotors (quadrotors) with simulink - Unreal connection examples. I was not able to see it on my initial google search.
Nishan Nekoo
2024-2-12
@VIGNESH BALAJI this page has several examples that use the Simulation 3D UAV Vehicle block which models a quadcopter by default.
VIGNESH BALAJI
2024-2-13
@Nishan Nekoo thanks, I tried the example in a simulink project. I did get an error stating it does not support my operating system Ubuntu. On looking further in Matlab Documentation. It says Unreal co-simulation is only possible in Windows and not available on Ubuntu (Linux). Is it true ?
Further, Is it possible to have Force Sensors for the quadrotors in Unreal simulation ? I saw other sensors in UAV toolbox like Lidar, Camera, Ultrasound etc and no force sensor was available. Please let me know the possibility of force sensor as a lot of things are dependent on it.
I am looking forward for your reply.
Nishan Nekoo
2024-2-13
Unfortunately, Linux is not supported for Unreal co-simulation as of release R2023b. Support for Linux may be added in a future MATLAB release.
The Simulation 3D UAV vehicle only visualizes the UAV given a certain translation and rotation in a 3D environment. To analyze the physical behavior of the quadcopter system, I would recommend using the Quadcopter drone model in Simscape and performing physical modeling of the queadcopter system instead.
VIGNESH BALAJI
2024-2-20
编辑:VIGNESH BALAJI
2024-2-20
@Nishan Nekoo can you please help me with the answers for this installation procedure to try out Simulink-Gazebo link - https://nl.mathworks.com/matlabcentral/answers/2082173-unable-to-install-gazebo-plugin-for-simulink-co-simulation?s_tid=prof_contriblnk ?
Nishan Nekoo
2024-2-20
Hi @VIGNESH BALAJI I am not sure about the answer to this question, I would recommend reaching out to our Tech Support team who can work directly with you to resolve the issue.
VIGNESH BALAJI
2024-2-21
@Nishan Nekoo Thanks a lot for your answer. I have contacted them in Installation section. I hope i will receive a reply. Thanks a lot for your help :)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)