
% First, set parameters for the walker:
par.L = .132; % [m], leg length
par.R = .06;  % [m], foot radius
par.m = .07;  % [kg], leg mass
par.I = 1.8e-4;  % [ kgm^2], leg inertia
par.B = 0;    % [m], CoM B (horizontal position on leg)
par.C = .061; % [m], CoM C (vertical position on leg)
par.gamma = .005; % [radians], ground slope
par.g = 9.81; % [m/s^2], gravity
par   % display all parameter values...


s0 = [0.2; -0.2; -2.5; -2.0]  % an initial condition (not s_star)
t0 = 0;
[s_end, t_end, data] = Step(s0, t0, par);
plot(data.t,data.s)
legend('phi st','phi sw','phi st d','phi sw d')
xlabel('time [s]'), ylabel('angle [rad], angular rate [rad/s]')
Animation(data,par)  % create an animation of walking

