CMU RI 16-711: KDC: Assignment 2: Planar Biped Simulation and Control


This assignment explores simulation, regulator design using LQR design techniques, and walking controller design.


Part 1: Develop a simulator for a planar biped. You can use ODE, OpenSim, Matlab, your own code, or whatever other simulation technology you want to use. The demonstration that this works is that the biped falls down convincingly. It is not necessary to handle collisions other than foot-ground collisions correctly. Links are

Torso (T)
Left Thigh (LT)
Left Calf (LC)
Right Thigh (RT)
Right Calf (RC)

     |
     |
     | T
     |
   __|__
LT |   | RT
   |   |
   *   *
   |   |
LC |   | RC
The feet are point feet, which can exert a limited torque while on the ground (+/-74 Newton-meters). What is a Newton-meter? A Newton is a unit of force, rather than a unit of weight: Newton = kg-m/(s^2). The number of Newtons needed to hold someone against gravity is G*number-of-kilograms (G = 9.81). A Newton-meter is a unit of torque, and is the unit we will be using for torques. Note that we are using a symmetric foot.
lengths:
head to hip: 0.8m
hip to knee: 0.3918m
knee to ankle: 0.3810m

calf inertial parameters includes foot.

mass:
torso: 50kg
thigh: 5.676kg
calf: 6.8952kg

center of mass
torso: 0.2868m above hip
thigh: 0.1898m below hip
calf: 0.2384m below knee

moment of inertia (about center of mass):
torso: 1.5kg-m^2
thigh: 0.09592kg-m^2
calf: 0.1535kg-m^2

body COM location relative to hip:
(0.2868*50 - 0.1898*5.676*2 - (0.3918+ 0.2384)*6.8952*2)/(50+5.676*2+6.8952*2)
= 0.0465
a little low relative to a human, should be around 0.1

Here is a pointer to some ODE examples. Note that the version of ODE code is a little out of date, so you should update it from the ODE page.

Here are some more relevant demos. Look at notes.txt. Here is a compiled version of ode-0.9 for Linux Fedora Core 6.


Part 2: Planar Balance control:

Part 2a: Manually design a controller that keeps the planar biped balanced in the fore/aft (pitch) direction while standing.

Part 2b: Use LQR design technology to design a controller for standing balance. Q = I, R = I.


Part 3: Planar walking control. From rest, start walking forward, take 10 steps, and then stop walking, remaining standing.


What to turn in?

Generate a web page describing what you did. Include links to your source and compiled code in either .zip, .tar, or .tar.gz format. Be sure to list the names of all the members of your group, which should have no more than three members. Mail the URL of your web page to bstephens@cmu and cc cga@cs [You complete the address, we are trying to avoid spam.] The writeup is more important than the code. What did you do? Why did it work? What didn't work?


You can use any type of computer/OS/language you want. You can work in groups [N <= 3] or alone.


Movie! It would be great if you could make a movie of your walker. Here are some suggestions as to how to do it.

camstudio A Windows program to record what is on your screen and save it as an .avi file. Suggested by Tom Goff tgoff at andrew


Questions

Q1: 1) I'm trying to following along in the mathematica file dynamics-2d/torso-thigh.math file, and on the line: tau0 = Ntorso + tauHipL + CP[ CMtorso, Ftorso ] + CP[ PthighL-Ptorso, FtorsoThighL ] I'm confused about why the tauHipL is in the equation. I can see that the Ntorso is the torque about the center of mass, and it is my impression that CP[ CMtorso, Ftorso ] will be zero since the Ftorso acts on the center of mass. I also see that an additional torque is occuring from the hip link, which is the CP[ PthighL-Ptorso, FtorsoThighL ] part. But what is tauHipL in there for? It doesn't seem like it should just be able to "add" in...

A1: The torques (tauxxx) are the torques at the joints. For the torso (tau0) the "virtual" joint is at the center of mass of the torso, so you are right that the term CP[ CMtorso, Ftorso ] contributes nothing. In the case of the thigh, the joint is not at the center of mass and the term CP[ CMthighL, FthighL ] is non-zero.

The equiation tau0 = stuff needs to take into account all the torques on the body (the torso). The torque exerted by the torso on the thigh results in an equal an opposite torque exerted on the torso (tauHipL). That is why tauHipL is in the equation. Think of tauHipL as the torque exerted by a motor at the hip joint.


Q2: I am considering using ODE, but I'm afraid of using it as a 2d simulator. Is there a clever way to use a 3d simulator to do 2d simulations? I remember you showing us a video of a robot connected to a pole that walks in a circle that is supposed to simulate 2d walking. Would this be a reasonable thing to try to do in ODE?

A2: There are a number of things you could do. a) Just do everything in 3D but don't push or excite the sideways dimensions. ODE should then keep everthing in 2D. b) Build a linkage to keep the robot in 2D, similar to the pole you mentioned. c) Build a simple controller for the sideways direction. I think a) should be sufficient. Here is a pointer to some ODE examples. Note that the version of ODE code is a little out of date, so you should update it from the ODE page.

See this page for a discussion of how to do this in ODE.