- “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 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Umang Pandey
on 10 Nov 2023
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 Comments
See Also
Categories
Find more on Robotics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!