give Limbs1.m single leg's worth of position data
This commit is contained in:
1 parent
654bd178b0
commit
be9116c67d
6 files changed
+24
-10
No files matched your search
+22
-8
@@ -1,15 +1,29 @@
|
||||
%% Bend the Knees %%
|
||||
|
||||
END = 8;
|
||||
|
||||
% setup vars
|
||||
t = [0, 1, 2, 3, 4];
|
||||
p = [0, -2, -5, -2, 0];
|
||||
t = 0 : 1 : END;
|
||||
pos_hip = [0, -1, 0, 0, 0, 0, 0, 0, 0];
|
||||
pos_knee = [0, 2, 0, 0, 0, 0, 0, 0, 0];
|
||||
pos_ankle = [0, -0.5, 0, 0, 0, 0, 0, 0, 0];
|
||||
|
||||
% generate graph lines
|
||||
querypts = 0:0.001:4;
|
||||
interpts = interp1(t, p, querypts, 'spline')';
|
||||
querypts_hip = 0 : 0.001 : END;
|
||||
querypts_knee = 0 : 0.001 : END;
|
||||
querypts_ankle = 0 : 0.001 : END;
|
||||
|
||||
ret_LHip = [querypts', interpts];
|
||||
ret_RHip = [querypts', interpts];
|
||||
ret_LKnee = [querypts', interpts];
|
||||
ret_RKnee = [querypts', interpts];
|
||||
interpts_hip = interp1(t, pos_hip, querypts_hip, 'spline')';
|
||||
interpts_knee = interp1(t, pos_knee, querypts_knee, 'spline')';
|
||||
interpts_ankle = interp1(t, pos_ankle, querypts_ankle, 'spline')';
|
||||
|
||||
ret_LHip = [querypts_hip', interpts_hip];
|
||||
ret_LKnee = [querypts_knee', interpts_knee];
|
||||
ret_LAnkle = [querypts_ankle', interpts_ankle];
|
||||
|
||||
ret_RHip = [querypts_hip', interpts_hip];
|
||||
ret_RKnee = [querypts_knee', interpts_knee];
|
||||
ret_RAnkle = [querypts_ankle', interpts_ankle];
|
||||
|
||||
% create graph
|
||||
%figure
|
||||
|
||||
Reference in new issue
Block a user