From 11af40e7deb758ec080a175fed8fcdd6c99aca29 Mon Sep 17 00:00:00 2001 From: shamil Date: Tue, 16 Nov 2021 15:29:33 +0100 Subject: [PATCH] removed small bug in experiment design script --- experiment_design.m | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/experiment_design.m b/experiment_design.m index 39d98e4..fc6e6fa 100644 --- a/experiment_design.m +++ b/experiment_design.m @@ -22,25 +22,6 @@ include_motor_dynamics = 1; % Choose optimization algorithm: 'patternsearch', 'ga' optmznAlgorithm = 'patternsearch'; -% Getting limits on posistion and velocities. Moreover we get some -% constant parmeters of the robot that allow us to accelerate computation -% of the robot regressor. -q_min = zeros(6,1); q_max = zeros(6,1); qd_max = zeros(6,1); -for i = 1:6 - rot_axes(:,i) = str2num(ur10.robot.joint{i}.axis.Attributes.xyz)'; - R_pj = RPY(str2num(ur10.robot.joint{i}.origin.Attributes.rpy)); - p_pj = str2num(ur10.robot.joint{i}.origin.Attributes.xyz)'; - T_pj(:,:,i) = [R_pj, p_pj; zeros(1,3), 1]; - r_com(:,i) = str2num(ur10.robot.link{i+1}.inertial.origin.Attributes.xyz)'; - - q_min(i) = str2double(ur10.robot.joint{i}.limit.Attributes.lower); - q_max(i) = str2double(ur10.robot.joint{i}.limit.Attributes.upper); - qd_max(i) = str2double(ur10.robot.joint{i}.limit.Attributes.velocity); -end -ur10.rot_axes = rot_axes; % axis of rotation of each joint -ur10.T_pj = T_pj; -ur10.r_com = r_com; - % Trajectory parameters traj_par.T = 25; % period of signal traj_par.wf = 2*pi/traj_par.T; % fundamental frequency @@ -63,7 +44,6 @@ lb = []; ub = []; if strcmp(optmznAlgorithm, 'patternsearch') x0 = rand(6*2*traj_par.N,1); - x0 = reshape([a b], [6*2*traj_par.N, 1]); optns_pttrnSrch = optimoptions('patternsearch'); optns_pttrnSrch.Display = 'iter'; optns_pttrnSrch.StepTolerance = 1e-1;