フィルターのクリア

generalize​dInverseKi​nematics in a nested parforloop

1 回表示 (過去 30 日間)
Denizhan AKINCI
Denizhan AKINCI 2024 年 5 月 2 日
コメント済み: Denizhan AKINCI 2024 年 5 月 6 日
Hello everyone,
I am trying to use PCT for my inverse kinematics solver for my robotic arm: [qWaypoints(2,:), solutionInfo] = gik_Pick(q0, fixOrientation);
but I get this error :
Error: Unable to classify the variable 'qWaypoints' in the body of the parfor-loop. For more information, see Parallel for Loops in MATLAB, "Solve Variable Classification Issues in parfor-Loops".
I looked at the sliced variables etc. but could not find anything that could help me. Any ideas how to make this work?
Also another question, PCT can be used to run simulink files as well ? Or will it cause problems ? Becuse I'll be also trying that in the future.

採用された回答

Edric Ellis
Edric Ellis 2024 年 5 月 2 日
編集済み: Edric Ellis 2024 年 5 月 2 日
You haven't given us a lot to go on there, but the form of assignment you mention is only valid if qWaypoints is a parfor "temporary" variable. In other words, you must have a full (non-indexed) assignment inside the loop to that variable, like this:
parfor i = 1:N
qWaypoints = zeros(3, 5); % or whatever size is appropriate
[qWaypoints(2,:), solutionInfo] = gik_Pick(q0, fixOrientation);
end
I doubt this is actually what you want though. Could you update your question please to give us a minimal reproduction of what you're trying to achieve.
  1 件のコメント
Denizhan AKINCI
Denizhan AKINCI 2024 年 5 月 6 日
I apologize for not providing sufficient context initially. My intention was to ask for assistance in resolving that variable issue in my code. Your response addressed my question effectively. Thank you for your assistance!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by