How to implement DH-parameters in a loadable robot-model (UR3e) to visualize the "Pose" ?

28 views (last 30 days)
Hi guys and girls,
I am quite new to MatLab, so please excuse me silly, basic questions.
So: i already have the calculations for the DH-parameters ('T0AM',...'T0FM') which are dependend on 6dof (q1(t),...,q6(t)). F.e: 'T0FM' is the 4x4 sym matrix which goes from a global Zeropoint towards F(the Endeffector).
Now i want to implement those DH-Parameters into the loadable robot "UR3e" so that i can see the 3D-Pose of the robot in a figure...later on i want to try constant q's for different poses. -> to ensure the pose is the pose i have in mind when changing the q's; so i can compare Pose with Stability easier.
(The aim is to let the UR3e stand in different poses and see how stable it is with an external force applied (with controller and closed loop system --> ss() ))

Answers (1)

Sakshay
Sakshay on 28 Nov 2022
Hi,
As per my understanding, you are trying to build a manipulator robot using DH Parameters.
You can use the "rigidBodyTree" object in MATLAB to do the same. Once you have the DH Parameters as a matrix, you can create a "rigidBodyTree" object and specify its joint transformations using DH Parameters. The following example illustrates how to do that:
% Assuming DH Parameters as available as matrix, under variable dhparams
% Initialize the Rigid Body Tree Object
robot = rigidBodyTree;
% Iterate over the DH Parameters and create the joints
bodies = cell(6,1);
joints = cell(6,1);
for i = 1:6
bodies{i} = rigidBody(['body' num2str(i)]);
joints{i} = rigidBodyJoint(['jnt' num2str(i)],"revolute");
setFixedTransform(joints{i},dhparams(i,:),"dh");
bodies{i}.Joint = joints{i};
if i == 1 % Add first body to base
addBody(robot,bodies{i},"base")
else % Add current body to previous body by name
addBody(robot,bodies{i},bodies{i-1}.Name)
end
end
% Verify the robot by plotting
show(robot);
Please refer to the following documentation for more information on creating manipulator robots using DH Parameters:
Other than this, you can also load pre-existing robots present in MATLAB, using the following documentation:
  1 Comment
moinmoinnoob69
moinmoinnoob69 on 28 Nov 2022
Hi :)
Thanks for your answer! I already tried the implementation into a new rigidbodytree which kinda works -not 100% sure if every joint is in the position/angle i want, but that's just a problem of the input dh-parameters...
The real question was:
1. Can i even change the parameters in a LOADABLE robot?
2. If so: HOW? I'm maybe too stupid, but i don't know how to get to its 'rigidbodytree' and therefore change some parts in this tree?
for my case there is a Excel file on Universal Robots Homepage ( https://www.universal-robots.com/articles/ur/application-installation/dh-parameters-for-calculations-of-kinematics-and-dynamics/ ) where u can exactly do what i want to do in MathLab: Change some Joint Parameters and then see the resulting position.
Thank you!

Sign in to comment.

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!