Programmatic Simscape Multibody Model: How to set the initial State Targets of joints?

4 ビュー (過去 30 日間)
Justina
Justina 2025 年 9 月 28 日
コメント済み: Yifeng Tang 2025 年 10 月 2 日
Hi guys!
I'm using programming to build a Simscape Multibody model. The model is a Stewart platform with six prismatic legs. However, when I use the OperatingPoint object to limit the initial position of the joint to 0 m:
op = OperatingPoint;
for i = 1:6
op(sprintf('Leg%d_Prismatic/X/q', i)) = simscape.op.Target(0, 'm', 'High');
end
the program doesn't work.
The entire code is running normally without any warning, but the initial position of the prismatic joint is not 0 m.
The entire codes are attached below. Please help me if you are professional in programmatic modeling. Thanks a lot!
  1 件のコメント
Yifeng Tang
Yifeng Tang 2025 年 10 月 2 日
Just to make sure, you've enabled the operating point initialization in Model Settings or through command line, right?
I didn't see that in your code, so just to make sure.
If so and the problem persists, the best next step is to build a very simple mechanism to reproduce the problem. Upload the model and script then so the community can better diagnose.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeAssembly についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by