modifying readme

This commit is contained in:
shamil 2021-04-10 10:32:51 +03:00
parent 82674baa75
commit 75b04d4203
44 changed files with 12 additions and 93 deletions

View File

@ -1,3 +1,4 @@
<<<<<<< Updated upstream
# Here inertial parameter identification of robotic systems is implemented. # Here inertial parameter identification of robotic systems is implemented.
# Identification consistes of several steps: # Identification consistes of several steps:
# -> finding base parameters # -> finding base parameters
@ -5,3 +6,14 @@
# -> running the trajectory on real robot and recording obtained trajectories # -> running the trajectory on real robot and recording obtained trajectories
# -> offline data processing # -> offline data processing
# -> parameter estimation # -> parameter estimation
=======
# Dynamic calibration (dynamic parameter indentification) for rigid body manipulator
The code was developed in the framework of the human-robot interaction project at [Innopolis University](https://innopolis.university/en/). One of the outputs of the project was a paper -- [Practical Aspects of Model-Based Collision Detection](https://www.frontiersin.org/articles/10.3389/frobt.2020.571574/full), where we provide some review of the recent developments in the field of dynamic calibration, outline the steps required for dynamic parameter identification and provide many useful references. If you have questions from theoretical perspective, please check the paper first. If find paper and code useful, consider citing it in your own papers.
The parameter identification prcedure can be divided into several steps:
## Finding regressor
Right now, there are two ways to find regressor matrix:
1. using screw algorithm (function *screw_regressor.m* or *screw_regressor2.m*)
2. using generated matrix function. The expression for the regressor is obtained symbolically using Euler-Lagrage equations, and then the function is generated from symbolic expression (script *ur_regressors_lgr.m*)
Keep in mind that two methods output different regressors, the reason for that is the way you structure the vector of standard parameters!
>>>>>>> Stashed changes

View File

@ -1,93 +0,0 @@
% Get robot description
run('main_ur.m')
%{
q_sym = sym('q%d',[6,1], 'real');
T_pk = sym(zeros(4,4,6)); % transformation between links
T_0k = sym(zeros(4,4,7)); T_0k(:,:,1) = sym(eye(4));
for i = 1:6
jnt_axs_k = str2num(ur10.robot.joint{i}.axis.Attributes.xyz)';
% Transformation from parent link frame p to current joint frame
rpy_k = sym(str2num(ur10.robot.joint{i}.origin.Attributes.rpy));
R_pj = RPY(rpy_k);
R_pj(abs(R_pj)<sqrt(eps)) = sym(0); % to avoid numerical errors
p_pj = str2num(ur10.robot.joint{i}.origin.Attributes.xyz)';
T_pj = sym([R_pj, p_pj; zeros(1,3), 1]); % to avoid numerical errors
% Tranformation from joint frame of the joint that rotaties body k to
% link frame. The transformation is pure rotation
R_jk = Rot(q_sym(i),sym(jnt_axs_k));
p_jk = sym(zeros(3,1));
T_jk = [R_jk, p_jk; sym(zeros(1,3)),sym(1)];
% Transformation from parent link frame p to current link frame k
T_pk(:,:,i) = T_pj*T_jk;
T_0k(:,:,i+1) = T_0k(:,:,i)*T_pk(:,:,i);
end
pos = T_0k(1:3,4,7);
matlabFunction(pos,'File','autogen/position_fk_UR10E','Vars',{q_sym})
%}
% load('ptrnSrch_N6T20QR.mat');
% load('ptrnSrch_N7T20QR.mat');
% load('ptrnSrch_N8T20QR.mat');
% load('ptrnSrch_N10T20QR.mat');
% load('ptrnSrch_N12T20QR.mat');
% load('ptrnSrch_N12T30QR.mat');
load('ptrnSrch_N12T50QR.mat');
% load('ptrnSrch_N15T50QR.mat');
% load('ga_N5T20.mat');
traj_par.t_smp = 5e-2;
traj_par.t = 0:traj_par.t_smp:traj_par.T;
[q,qd,q2d] = mixed_traj(traj_par.t, c_pol, a, b, traj_par.wf, traj_par.N);
% Compute condition number of the observation matrix
load('baseQR.mat');
ab = reshape([a;b], [12*traj_par.N,1]);
conditionNumer = traj_cost_lgr(ab,traj_par,baseQR)
%%
for i = 1:size(q,2)
% pos(:,i) = ur_fk(q(:,i), ur10);
pos(:,i) = position_fk_UR10E(q(:,i));
end
% Needed for surface
[x, y] = meshgrid(-0.4:0.05:0.4); % Generate x and y data
z = zeros(size(x, 1)); % Generate z data
figure
hold on
surf(x, y, z) % Plot the surface
for i = 1:size(q,2)
scatter3(pos(1,i), pos(2,i), pos(3,i))
end
xlabel('X')
ylabel('Y')
zlabel('Z')
axis equal
view(3)
%% write into file
writeTrajectoryCoefficientsIntoFile(a, b, c_pol)
%%
% figure1 = figure;
% axes1 = axes('Parent',figure1);
% hold(axes1,'on');
% for i = 1:6
% scatter3(T_0k(1,4,i), T_0k(2,4,i), T_0k(3,4,i))
% line([T_0k(1,4,i) T_0k(1,4,i+1)], [T_0k(2,4,i) T_0k(2,4,i+1)], ...
% [T_0k(3,4,i) T_0k(3,4,i+1)])
% end
% xlabel('X')
% ylabel('Y')
% zlabel('Z')
% axis equal