This assignment explores trajectory optimization. Given a set of footstep locations and timing, you find an appropriate center of mass trajectory. We use a simplified model, the linear inverted pendulum model (LIPM).
Google "lipm linear inverted pendulum model" for more information, and solution methods for this assignment. For example, this paper describes how to do the assignment using DDP.
In this assignment the robot consists of a point mass and massless legs. We will maintain the body at constant height z. We assume no double support except at the beginning and end of the trajectory. The LIPM dynamics in the x direction (forwards) are given by:
m * xdd = Fx m * xdd = Fz*(x - p_x)/z m * xdd = m*G*(x - p_x)/z so xdd = (x - p_x) * G/zm is the mass, x is the COM location in the x direction, xdd is the COM acceleration, Fx is the horizontal force from the leg, Fz is the vertical force from the leg, p_x is the foot location in the x direction and G is the gravitational constant. We will add ankle torque actuation, but use the offset of the center of pressure (COP) that it causes as the actuation u_x:
xdd = (x - p_x + u_x) * G/zThere is a corresponding equation for the dynamics in the y direction (sideways):
ydd = (y - p_y + u_y) * G/zThe cost function to optimize is
(x - p_x)^2 + xd^2 + 30*u_x^2 + (y - p_y)^2 + yd^2 + 30*u_y^2xd is the COM velocity in the x direction.
Here is a footstep plan, which sets footstep timing, p_x, and p_y. The columns are duration (sec), p_x, p_y, and stance_type (2 = double support, 0 = right stance, 1 = left stance).
1.5 0 0 2 0.5 0 -0.15 0 0.5 0.7 0.15 1 0.5 1.4 -0.15 0 0.5 2.1 0.15 1 0.5 2.8 -0.15 0 0.5 3.5 0.15 1 1.5 3.5 0 2Here are two plan files in this format: plan001 and plan002.
Here is a optimized trajectory for the above footstep plan.
Part 1) Develop a computer program to find an optimal COM trajectory (x(t) and y(t)) and COP offset trajectory (u_x(t) and u_y(t)), given a footstep plan.
Part 2) The footstep timing is fixed in the current footstep plan. Develop a computer program to find an optimal COM trajectory and COP offsets, while also optimizing footstep timing.
The first thing to figure out is what is a reasonable optimization criterion:
(distance/(time^2))^2where distance is the swing distance, and time is the time taken to swing the foot?
Part 3) Develop a computer program to find an optimal COM trajectory and COP offsets, while also optimizes footstep location and timing. Assume quadratic cost functions for each footstep location (p_x_i and p_y_i) are given ((p_x_1 - p_x_1_d)^2, etc.).
Part 4) Thought Question: The number of footsteps and footstep location is fixed by the footstep plan. How would you set up an optimization problem and algorithm to optimize the number of footsteps, footstep timing, and footstep location. How would terrain information be presented to the planner?
The TA will have office hours after class Monday and Wednesday.