- “JointName” - Character vector representing the name of the joint as specified in the RigidBodyTree robot model.
- “JointPosition” - The position of the corresponding joint.
Robotics Toolbox determine inverse kinematics relationships for all end effector positions
5 ビュー (過去 30 日間)
古いコメントを表示
I have written a matlab scrip based on: 2-D Path Tracing with Inverse Kinematics with the Robotics Toolbox. I have set up a six joint rigid body tree in 2d with 2 degrees of freedom and am able so display the orientation of the joints for a certain end effector position: (some of my code)
q0 = homeConfiguration(robot);
ik = inverseKinematics('RigidBodyTree', robot);
weights = [0, 0, 0, 1, 1, 0];
endEffector = 'tool';
qInitial = q0;
x = 2;
y = 2;
point = [x,y,0];
qSol = ik(endEffector,trvec2tform(point),weights,qInitial);
figure
show(robot,qSol);
view(2)
ax = gca;
ax.Projection = 'orthographic';
axis([-0.3 3 -0.3 3])
This code works and I can see the robotic arm orientation for the end effector position (2,2)

I was wonder how I would be able to derive the joint angles for an arbitrary point (x,y) as a function of x and y. For example we could do this with geometry for 2 joints and get the relationship for the second angle like this.

Is there a way to generate this type of relationship for 6 joints through the ik function and maybe the symbolic math toolbox?
0 件のコメント
回答 (1 件)
Umang Pandey
2023 年 11 月 10 日
Hi Jamie,
I understand that you would like to obtain the values of joint angles from the inverseKinematics (IK) object that you have created.
You can achieve this by using the "configSol" output parameter. This parameter is a struct array that contains the following fields:
Here's an example of how you can obtain the "configSol" as an output parameter:
[configSol, solInfo] = ik(endeffector, pose, weights, initialguess);
For more information, refer the following documentation:
Best,
Umang
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Robotics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!