– Conservation of angular momentum that introduces nonholonomic behavior, underactuation and time dependence, makes the trajectory planning of gymnastic robots difficult. By defining appropriate values for the initial angular momentum, a method is developed that can lead a mechanism to a desired final configuration from an initial given one, in prescribed time. This method is optimization-based and fully exploits the initial mechanism angular momentum. Obstacle avoidance during flight is achieved by setting additional constraints. The method results in smooth, small in magnitude, and therefore easily applicable joint torques.