legged_control (NMPC + WBC framework for legged robots)
legged_controlAdvancedAn open-source legged-robot control framework combining nonlinear MPC planning with whole-body control tracking, built on OCS2 and ROS.
legged_control is an open-source, model-based control framework for quadruped robots by Qiayuan Liao, built on ROS and ros_control. The upper level uses the OCS2 library to run nonlinear model predictive control (NMPC — solving online for an optimal trajectory over a short future horizon at every control step); the lower level uses whole-body control (WBC) based on hierarchical quadratic programming to convert that plan into individual joint torques, together with a state estimator that fuses leg odometry and IMU data. It provides Gazebo simulation and real-robot examples on platforms such as the Unitree A1, making it a common reference implementation to get running and modify when learning model-based legged locomotion control, and it's also frequently used as a baseline to compare against reinforcement-learning-based locomotion control.
ExampleLaunch a Unitree A1 model in Gazebo and use legged_control's NMPC+WBC controller to have the robot switch into a diagonal trot and follow velocity commands from a game controller.
- Also called
- qiayuanl/legged_control
- Related
- Nonlinear Model Predictive Control · Whole-Body Control · OCS2 (Optimal Control for Switched Systems) · Hierarchical Quadratic Programming · Legged Locomotion · Model-Based Control
- Sources
- qiayuanl/legged_control (GitHub)