Commit e7154987 authored by mmroma's avatar mmroma
Browse files

Updated with new plots on relevant parameters

parent 577817a2
......@@ -11,7 +11,7 @@ function [f] = plotHapticForceEstimate(data, params, location,lw,fs)
plot(data.tout,data.F_user(:,i),'LineWidth',lw);
% plot(data.tout,data.F_user_est_unfilt(:,i),'--');
hold off;
legend('Estimate','Actual');
legend('Estimate','Actual','Location','Best');
% legend('Estimate','Actual','Unfiltered Estimate');
xlabel('Time (s)');
ylabel([dims{i} '-dir (N)']);
......
function [coarse_WPs] = WPs_set1_hover()
%WPs_set1
h = 1.5;
h = -1.7;
coarse_WPs = [0, 0, h, 0;
0, 0, h, 10];
end
......
......@@ -79,8 +79,8 @@ function [params] = parameters_Quad(global_params)
%% Tether Parameters
params.l_i_last = 0; % used for simple numerical integration
params.L = 0.5; % Unstretched Length (m)
params.k = 20; % Spring Constant
params.b = 1; % Damping Coefficient
params.k = 750; % Spring Constant
params.b = 40; % Damping Coefficient
params.NegTension = 0; % Allow "Negative Tensions"? 0 = No, 1 = Yes
params.r_Pi_P = [0;0;0]; % Tether Mounting Point in Payload Frame
params.MaxTension = 100*params.m*params.g;
......
......@@ -72,7 +72,8 @@ function [params] = setUpParameters(traj_num)
%% Load Multirotors
params.num_vehicles = 5;
L_all = 1.5;
% L_all = 1.5;
L = [ 2.02, 2.02, 2.02, 2.02, 1.44];
azi = [ pi/4, 3*pi/4,-3*pi/4, -pi/4, 0];
ele = [ pi/4, pi/4, pi/4, pi/4, pi/2];
params.azi = azi;
......@@ -80,13 +81,13 @@ function [params] = setUpParameters(traj_num)
for i=1:params.num_vehicles
params.multirotors{i} = parameters_Quad(params);
params.multirotors{i}.L = L_all;
params.multirotors{i}.L = L(i);
r_Pi_P = makehgtform('zrotate',azi(i)) *...
makehgtform('yrotate',ele(i)) *...
[r;0;0;1];
params.multirotors{i}.r_Pi_P = r_Pi_P(1:3);
% params.multirotors{i}.distSTD = quad_dist_STD;
params.l_i_last{i} = L_all;
params.l_i_last{i} = L(i);
params.multirotors{i}.ctlDt = params.ctlDt;
params.multirotors{i}.dist_F_seed = i*10 + [1 2 3];
......
......@@ -64,10 +64,10 @@ function [] = animate_simulink_data(simData, params, using_load)
yLlim = -cubeSideLength;
% Z Graph Limits
zUlim = cubeSideLength;
zLlim = -cubeSideLength;
% zUlim = -1;
% zLlim = -2;
% zUlim = cubeSideLength;
% zLlim = -cubeSideLength;
zUlim = -1;
zLlim = -4;
%% Set up the graph
figure(100); clf;
......
......@@ -10,7 +10,7 @@ function [f] = plot_velocity(T,X,Xd,title_string,location,lw,fs)
% ylabel('x_{dot} (m/s)');
ylabel('$\dot{x}$ (m/s)', 'Interpreter','latex');
title(title_string);
legend('Actual','Desired');
legend('Actual','Desired','Location','Best');
ax = gca;
ax.FontSize = fs;
......@@ -21,7 +21,7 @@ function [f] = plot_velocity(T,X,Xd,title_string,location,lw,fs)
hold off;
% ylabel('y_{dot} (m/s)');
ylabel('$\dot{y}$ (m/s)', 'Interpreter','latex');
legend('Actual','Desired');
legend('Actual','Desired','Location','Best');
ax = gca;
ax.FontSize = fs;
......@@ -33,7 +33,7 @@ function [f] = plot_velocity(T,X,Xd,title_string,location,lw,fs)
% ylabel('z_{dot} (m/s)');
ylabel('$\dot{z}$ (m/s)', 'Interpreter','latex');
xlabel('Time (s)');
legend('Actual','Desired');
legend('Actual','Desired','Location','Best');
ax = gca;
ax.FontSize = fs;
......
......@@ -11,7 +11,7 @@ function [] = paper_plot_admittance_control(d,p)
f.Children(6).YLim = [-0.1, 1.2]; %x
f.Children(6).XLim = [0, 10]; %x
f.Children(4).YLim = [-0.1, 0.1]; %y
f.Children(2).YLim = [1.4, 1.6]; %z
f.Children(2).YLim = [-1.8, -1.6]; %z
% extra_ylims = [-0.05, 0.05];
% f.Children(6).YLim = f.Children(6).YLim + extra_ylims; %x
% f.Children(4).YLim = f.Children(4).YLim + extra_ylims; %y
......@@ -29,9 +29,9 @@ function [] = paper_plot_admittance_control(d,p)
f = plot_velocity(d.tout, d.payload_X, d.Xd_load,'','northeast',lw,fs);
% Adjust ylims
f.Children(6).YLim = [-0.2, 0.4]; %x
f.Children(6).YLim = [-0.3, 0.4]; %x
f.Children(4).YLim = [-0.1, 0.1]; %y
f.Children(2).YLim = [-0.1, 0.2]; %z
f.Children(2).YLim = [-0.1, 0.1]; %z
% Adjust font size and boldness
......@@ -58,7 +58,7 @@ function [] = paper_plot_admittance_control(d,p)
saveas(f,'Plotting/saved_plots/sim_haptic_force_estimate.eps')
%% 4) 3D System
limits = [2.0, -0.7, 1.1, -1.1, 1.7, -0.5];
limits = [2.5, -0.7, 1.3, -1.3, -1.5, -3.5];
f = plotData_3d(d,p,limits);
% Save the plot
......
......@@ -45,7 +45,7 @@ paper_plot_admittance_control(simData, params);
% plot_force(simData.tout, simData.q1_F_drag, 'Q1 Drag_V');
%% Animate
animate_simulink_data(simData, params, true);
% animate_simulink_data(simData, params, true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment