More info on Assignment #1 example code:

 

1.    Mass-Spring-Damper Simulation

First use Ex1.m to simulate a mass-spring damper system, as shown.  This system approximates the legs of the hopper/walker.

Check: What should be the value of y as time goes to infinity?

 

 

 

2.    Vertical Hopping

 

Use Ex2.m to simulate hopping vertically.  In the example above, the spring and damper are always attached to the ground, so they can apply a negative force (downward).  Ex2.m makes the small change that forces are only applied vertically and only when the legs are in contact.

 

Think: What is the assumption we are making for this simple simulation?

3.    Control of Vertical Hopping

 

Now we give the hopper the ability to change the free-length of the spring.  In ex3.m and control3.m, the free-length instantaneously changed to a fixed length.  The effect is a constant offset in leg push-off force.

 

In ex4.m and control4.m, a simple controller is added to smoothly change the free-length of the spring.  This requires feedback control of the position of the mass and simulates a smooth push-off force.

 

Trivia: What professor of the CMU Robotics Institute worked on legged hoppers for a PhD thesis?

 

4.    Horizontal Hopping

 

Now we allow the legs to swing to different angles and allow not only vertical forces, but horizontal forces.  The file, read_sensors_2D.m calculates the x and y components of the force based on the leg angle.  control5.m contains the closed-loop controller from control4.m, but also includes a leg angle controller.

Throw-down: What can you make your hopper do with this controller?

 

 

 

5.    Walking

Now give the hopper two legs and it becomes a biped.  A lot of the code for this simulation is exactly the same as for the hopper.

 

read_sensors.m – same as before but loops through both legs and sums the ground forces.

 

control1.m – uses the simple constant-force push-off as in ex4. 

 

Think: Again, what are some assumptions made by this model?

 

Try: Can you add modify the one legged hopping controller from ex5 to handle the bipedal walker?