clear all
close all
clc


data = csvread('Results_best_knee_roll_paulo/recorded_left_leg_torque_filtered.csv');
data_2 = csvread('Results_best_knee_roll_paulo/recorded_right_leg_torque_filtered.csv');

time = data(:,1);
time = time/100000;


feedback_left_hip_roll = data(:,2);
feedback_left_hip_pitch = data(:,3);
feedback_left_knee_roll = data(:,4);

feedback_right_hip_roll = data_2(:,2);
feedback_right_hip_pitch = data_2(:,3);
feedback_right_knee_roll = data_2(:,4);





figure('position', [80 80 420 320], 'color', [1 1 1])
hold on
plot(time, feedback_left_hip_roll, 'r' , 'LineWidth',0.5);

plot(time, feedback_right_hip_roll, 'b' , 'LineWidth',0.5);


grid on
box on

axis ([5 40 -600 600])

legend('Left Hip Roll', 'Right Hip Roll')

AxisFontName = 'Helvetica';
AxisFontSize = 9;

set(gca, 'XTick', 0:10:900, 'YTick', -1800:100:1800, 'FontName', AxisFontName, 'FontSize', AxisFontSize)

title('Torque Rendering', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)
xlabel('Time [s]', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)
ylabel('Torque [Nmm]', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)

export_fig paulo_hip_roll -pdf -transparent

%--------------------------------------------------------------------------------------
figure('position', [80 80 420 320], 'color', [1 1 1])
hold on
plot(time, feedback_left_hip_pitch, 'r', 'LineWidth',0.5);

plot(time, feedback_right_hip_pitch, 'b', 'LineWidth',0.5);

grid on
box on

axis ([5 40 -900 900])

legend('Left Hip Pitch', 'Right Hip Pitch')

AxisFontName = 'Helvetica';
AxisFontSize = 9;

set(gca, 'XTick', 0:10:900, 'YTick', -1800:100:1800, 'FontName', AxisFontName, 'FontSize', AxisFontSize)

title('Torque Rendering', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)
xlabel('Time [s]', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)
ylabel('Torque [Nmm]', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)

export_fig paulo_hip_pitch -pdf -transparent

%---------------------------------------------------------------------------------------------------
figure('position', [80 80 420 320], 'color', [1 1 1])
hold on

hold on
plot(time, feedback_left_knee_roll, 'r', 'LineWidth',0.5);

plot(time, feedback_right_knee_roll, 'b', 'LineWidth',0.5);

grid on
box on

axis ([5 40 -600 600])

legend('Left Knee Roll', 'Right Knee Roll')

AxisFontName = 'Helvetica';
AxisFontSize = 9;

set(gca, 'XTick', 0:10:900, 'YTick', -1800:100:1800, 'FontName', AxisFontName, 'FontSize', AxisFontSize)

title('Torque Rendering', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)
xlabel('Time [s]', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)
ylabel('Torque [Nmm]', 'Fontsize', AxisFontSize, 'FontName', AxisFontName)

export_fig paulo_knee_roll -pdf -transparent


