Optimization-Based Reference Generator for Nonlinear Model Predictive Control of Legged Robots Article in Robotics (January 2023)