Towards Application On Optimization-Based Methods For Motion Planning Of Legged Robots