This week, you will create code to make your robot walk forward while avoiding "cracks in the sidewalk."
The horizontal position of the ith crack in meters is given by the equation
Your code should generate a sequence of foot positions for the left and right foot that avoids the cracks, and which does not go beyond an allowable max step distance.
Next, you should generate a schedule for the footsteps, along with a ZMP reference trajectory that moves the robot's ZMP above each supporting foot as the robot moves.
Finally, you should generate smooth trajectories for each foot which move them into position, and run comIK with the output of the ZMP controller and the foot positions.
Your code should generate sufficient walking behavior walk from the origin at zero meters, past crack # 20 at approximately 20 meters.
glMatrixMode(GL_MODELVIEW) glPushMatrix() glTranslated(-cx, 0, 0) ################################################## # insert the rest of your draw function here ################################################## glPopMatrix() glutSwapBuffers()