  This note presents a solution of the swing-up task of two acrobots using
trajectory optimization method. The equations of motion for 2-link and 3-link
acrobot are manually derived, and then form the dynamics of the robots.
Numerical integration method is used to simulate the behaviour of passive
robots, with the goal of showing the correctness of the complicated dynamics of
the 3-link acrobot. Direct collocation method is used to optimize the
trajectory of state and control of the robots with bounds on both.
