This paper presents software that has been devised for the purpose of optimal motions computation for robots. For the time being, this study considered only open-loop and fully actuated structures. Generated motion satisfies a stability criterion while minimizing energy consumption. Motion optimization is solved with the IPOPT optimization package. In order to achieve fast and reliable optimization convergence, an efficient calculation of gradients is presented. Moreover, almost rarely considered in the literature, joint friction, which has a non- negligible effect on the optimized motion, is taken into account. Efficiency of the proposed software is demonstrated through the optimization of a kicking motion for the 30 degrees of freedom humanoid robot HRP-2.