Info

この質問は閉じられています。 編集または回答するには再度開いてください。

new robot.Configuration using Manipulator Shape Tracing in MATLAB and Simulink

1 回表示 (過去 30 日間)
slowlearner
slowlearner 2022 年 5 月 1 日
閉鎖済み: slowlearner 2022 年 5 月 7 日
as the title suggests i'm utilizing the "Manipulator Shape Tracing in MATLAB and Simulink" basicaly copied everything point for point. however, i'm not using the same robot sence i'm using the universalUR5 and i've gone through some of the documentation regarding homeConfiguration. But i fail to see how i can implement my own start configuration rather then the [0,0,0,0,0,0]' vector it has now.
I've tried implementing it in the "show" function:
qi = [5.7098 4.7468 1.5401 -2.9748 -4.9925 0.5846]'; % new joint config
ax = show(robot,qi,'PreservePlot',false, 'Frames', 'off');
then adding it as the ikInitGuess:
%% Setup Inverse Kinemtics Solver
ik = inverseKinematics('RigidBodyTree', robot);
%
qi = num2cell(qi);
ikInitGuess = homeConfiguration(robot);
[ikInitGuess.JointPosition] = qi{:};
%
ikWeights = [1 1 1 1 1 1];
as well as:
%% Define the orientation so that the end effector is oriented down
tf = getTransform(robot,qi, 'wrist_2_link','base_link');
robotOrientation = tf(1:3,1:3);% need some form of axang2rotm value for alignment with -z
but it results in a fairly amusing show of what i think are singularities
  2 件のコメント
Karsh Tharyani
Karsh Tharyani 2022 年 5 月 2 日
Hi @slowlearner,
Could you clarify your question? It doesn’t look like you are calling the solver in the above snippet. You have created an instance of the solver, yes, but you haven’t called the step method on the solver which will output a joint configuration given an end-effector pose and an initial guess. In the example we have chosen the home configuration of the robot, as an initial guess, but you could provide others should you feel they could lead to faster solving times.
slowlearner
slowlearner 2022 年 5 月 7 日
hi sorry i can be a bit unclear sometimes but yes thank you for pointing that out i edited the code to include the homeConfiguration(robot).

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by