How to change File Solid

7 次查看(过去 30 天)
A
A 2021-7-5
评论: A 2021-7-24
I imported a CAD model into MATLAB Simscape. I was then able to generate the model in Simscape.
What I am going to do is as follows. Please tell me how to do it.
I want to edit the File Solid block imported into Simscape to change the shape of the model, e.g. size and length. However, I do not want to   edit the File Solid block by changing the CAD model and importing it again as shown in the attached picture.
We want to edit the File Solid block by using MATLAB program or Simlink.
If we can change the shape of the model by editing the File Solid block with a MATLAB program or Simlink, we would like to be able to change the shape of the File Solid block every time we run a simulation.
This is because we want to use it for reinforcement learning. I want to change the shape of the File Solid block every time I run a simulation and reflect it in the File Solid block.

采纳的回答

Yifeng Tang
Yifeng Tang 2021-7-23
I don't think you can edit the content of the solid via the file solid block, so I am not aware of a way to do what you have in mind directly. However, maybe there are workarounds to model the "effects" of changing the shape of the part. What go into the computation/simulation from the solid, apart from the visual, really are the mass, moment of inertia, and attached frames. So, if your reinforcement learning can be set up to change those parameters, to approximately reflect the effects of changing the shape, it may work to some degree. You can get the baseline values of the actual part by looking at the derived values of the inertia in the file block, then you can change the inertia specification to "custom" and allows direct change of those number. Just a thought.
  1 个评论
A
A 2021-7-24
Thank you very much for your answer. I'll give it a try.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Bodies 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by