Our goal was to create a dancing robot that fluidly moved through 4 different poses. Two represent real dance we used two different poses and their mirror images, and tuned the pendulum to move rapidly between them. The images below show the dance and the corresponding table of values. We then attempted to use the optimizer within our performance to dynamically tune the dance.

We were able to find a set of gains that could quickly achieve our desired position through hand tuning and adjusting the threshold of when the simulation thought it reached the target. We applied the optimization code to be run after every pose. But unfortunately, during run time the gains trend back towards the initial conditions. Due to time we decided to just hand tune, but to solve this issue we could try calling the function at the end of a whole cycle, or adjusting the cost function.

Here is a zip folder for our final project:

doublependulumcontrol