-
Notifications
You must be signed in to change notification settings - Fork 460
Description
According to https://frankaemika.github.io/docs/control_parameters.html, the link 7's parameter "d" should be zero, which was however defined to be 0.107 in mdl_panda(). In the following, I'm writing to verify the correctness of mdl_panda().
In mdl_panda().m, the robot is created using the function revolutemdh(). After reading rne_mdh.m, I understand that the "d" parameter of link
between frame
Anyway, I found that the inertia matrix and center of gravity should be referred in the frame
Line 134 of rne_mdh.m implied that the angular velocity w was calculated and referred in the frame
w =
and from line 154 to 157, the center of mass and inertia matrix were used to operate with this
So if Link7, or L7, is created with d=0.107, then it means it defines a wrong transformation matrix
and a wrong frame 7. Since the center of gravity and inertia matrix were referred to frame 7, it gives wrong results.
I verified this by writing a simple matlab file, just comparing the joint torque given random q, qd, qdd with https://github.com/marcocognetti/FrankaEmikaPandaDynModel/tree/master/matlab/dyn_model_panda, with d=0 and d=0.107. When d=0, there was less error.
qlims = [[-2.8973 2.8973];
[-1.7628 1.7628];
[-2.8973 2.8973];
[-3.0718 -0.0698];
[-2.8973 2.8973];
[-0.0175 3.7525];
[-2.8973 2.8973]];
mdl_panda % modify d=0 or d=0.107 in L7
error = zeros(1,100);
for i = 1:100
q = qlims(:,1) + (qlims(:,2) - qlims(:,1)).*rand(7,1);
dq = -0.5 + 1*rand(7,1);
ddq = -2 + 4*rand(7,1);
temp = get_MassMatrix(q)*ddq + ...
get_CoriolisVector(q, dq) + ...
get_GravityVector(q);
tau_1(:, i) = temp.';
tau_2(:, i) = panda.rne(q',dq',ddq');
error(i) = norm(temp.' - panda.rne(q',dq',ddq'));
end
figure
plot(tau_1(1,:))
hold on
plot(tau_2(1,:))
figure
plot(error)