How to change File Solid

조회 수: 10 (최근 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