Software
OpenLoong-Dyn-Control
By OpenLoong (Humanoid Robotics (Shanghai), OpenAtom Foundation), China (checked on github.com/loongOpen/OpenLoong-Dyn-Control/blob/main/README… (opens in a new tab)), from github.com/loongOpen/OpenLoong-Dyn-Control (opens in a new tab)
- Humanoids and robot learning
- Framework
- Apache-2.0
A C++ motion control framework for the Qinglong humanoid robot, combining MPC and WBC, runnable in the MuJoCo simulator with walking, jumping and blind obstacle stepping examples.
- Stale. No commit in 12 months: the newest is from 27 May 2025.
Facts
- GitHub stars
- 390read on 28 Nov 2026
- Last update
- 27 May 2025Newest commit on main
- Maintenance
- Staleno commit in 12 months
- Difficulty
- Advanced
Checked on GitHub on 28 Nov 2026.
Licenses
- Code
- Apache-2.0 (opens in a new tab)
Read by Robotheca from license (opens in a new tab) (Apache-2.0) at commit 4dd7a7e (opens in a new tab), on 16 Oct 2026.
- Commercial use
- Yes
At a glance
- What it is
- Provides a layered, modular humanoid control framework built on Model Predictive Control (MPC) and Whole-Body Control (WBC).
- Runs on the MuJoCo simulation platform, based on the Qinglong robot model.
- Includes three motion examples: walking (walk_wbc), jumping (jump_mpc), and blind obstacle stepping (walk_mpc_wbc).
- Bundles major dependencies such as MuJoCo, Pinocchio, Eigen, Quill, GLFW and JsonCpp to simplify setup.
- Exposes tunable MPC weights, WBC task priorities, swing leg trajectory, gait and joint parameters.
Robotheca's summary of the project's documents, not the creator's words.
- Robots on Robotheca
- No robot on Robotheca uses it yet.
- Licence
- Apache-2.0. Commercial use: Yes. Where it was read
- Install
- In the creator's words: The project's website (opens in a new tab)
- Maintenance
- Stale, last commit on 27 May 2025.
Use it
How to install it, in the creator's words: The project's website (opens in a new tab)
Robotheca doesn't review code. Read it before running it.
Files and versions
- Repository on GitHubgithub.com/loongOpen/OpenLoong-Dyn-Control (opens in a new tab)
- The version Robotheca read4dd7a7e (opens in a new tab)
- Latest releaseNone published on GitHub
Robotheca never hosts the code: each link goes to the creator's own page.
The README
The creator's own README, copied as written: README.md by OpenLoong (Humanoid Robotics (Shanghai), OpenAtom Foundation), at commit 4dd7a7e, under Apache-2.0 (opens in a new tab). The original on GitHub (opens in a new tab).
Read the README here

OpenLoong Dynamics Control
Motion control framework for humanoid robots based on MPC and WBC
Please visit 🐉 OpenLoong open source code repository!
The OpenLoong open-source project is a collaborative initiative operated by Humanoid Robotics (Shanghai) Co., Ltd., the Shanghai Humanoid Robotics Manufacturing Innovation Center, and the OpenAtom Foundation. This repository provides a humanoid robot control framework based on MPC (Model Predictive Control) and WBC (Whole-Body Control), which can be deployed on the Mujoco simulation platform. Based on the "Qinglong" robot model from the Shanghai Humanoid Robotics Innovation Center, it offers three motion examples: walking (opens in a new tab), jumping (opens in a new tab), and blind obstacle stepping (opens in a new tab). The physical prototype has achieved walking and blind obstacle stepping motions.
📖 Read this in Chinese / 阅读中文版 (opens in a new tab)
Project Features
- Easy Deployment Provides a comprehensive solution for deploying code execution environments, enabling users to easily configure their required working environments. This code repository includes major dependencies, eliminating the need for extensive third-party library installations and simplifying the entire deployment process.
- Extensible The control framework structure adopts a layered modular design aimed at enhancing system maintainability and extensibility. Each functional module of the system has clear logical and functional boundaries, offering a more developer-friendly environment for secondary development. This allows developers to more easily customize and extend system functionalities.
- Easy to Understand The code structure is concise, adhering to the principle of modular encapsulation based on functionality. It uses a bus for data interaction between modules, reducing encapsulation redundancy and helping to lower code complexity. Algorithm implementations follow a simple "read-compute-write" logic, enhancing code comprehensibility.


Changelog
2024.06.29
- Added two new demos,
walk_wbc_joystickandwalk_mpc_wbc_joystick, which allow keyboard-controlled robot movement and enable turning functionality.
2024.08.12
- Fixed the issue of incorrect sensor data extraction IDs in MuJoCo. Thanks to Xunlong Software for reporting this issue.
- Corrected the dimensionality error in the definition of the c matrix in MPC. Thanks to @geekloong and @yichuanku for reporting this issue.
- Fixed the calculation error in the first priority level of the WBC priority computation. Thanks to @1190201119 for reporting this issue.
- Modified the cost function in MPC.
2024.09.11
- Added a new branch named "low_damping_model," which aligns closely with the joint response of the physical prototype. This branch provides two demos:
walk_wbc_joystickandwalk_mpc_wbc_joystick. - Added the Model Replacement documentationTutorial (opens in a new tab)。
Environment Installation
Environment Suggestion
- Operation System:Ubuntu 22.04.4 LTS
- Compiler:g++ 11.4.0
Dependent Installation
This repository is based on MuJoCo for simulation testing of the "Qinglong" humanoid robot. The repository also includes the MuJoCo simulation engine, the Pinocchio dynamics library, Eigen, the Quill logging tool, the GLFW graphics library, and the JsonCpp parsing library. However, the simulation interface requires system support for OpenGL, which needs to be installed.
# Update & Install Dependencies
sudo apt-get update
sudo apt install git cmake gcc-11 g++-11
sudo apt install libglu1-mesa-dev freeglut3-dev
Installation Guide
Code Acquisition and Compilation
# Clone
git clone https://github.com/loongOpen/Openloong-dyn-control.git
# Build
cd openloong-dyn-control
mkdir build
cd build
cmake ..
make
# mujoco simulation
./walk_mpc_wbc #or ./walk_wbc or ./jump_mpc
Simulation performance

Code Explanation
Refer to the API interface of this code.Document (opens in a new tab)andWiki (opens in a new tab)。
Explanation of Main Prefixes and Suffixes
| Prefixes and Suffixes | Explanation |
|---|---|
| _L, _W | in local frame、in global frame |
| fe_ | endpoint of feet |
| _L, _l, _R, _r | left |
| swing, sw | swing leg |
| stance, st | support leg |
| eul, rpy | Attitude Angle |
| omega | angular velocity |
| pos | position |
| vel | linear velocity |
| tor*, tau* | torque |
| base | BaseLink |
| _des | Expected Value |
| _cur | cur |
| _rot | 坐标变换矩阵 |
Development Guide
Key Control Parameters
- MPC Weights
//MPC.h
void set_weight(double u_weight, Eigen::MatrixXd L_diag, Eigen::MatrixXd K_diag);
//*u_weight* :Minimum weight of system input
//*L_diag* :Weight of system state and desired error, ordered as eul, pos, omega, vel
//*K_diag* :Weight of system input, ordered as fl, tl, fr, tr
- WBC Task Priorities
//WBC_QP.cpp
std::vector<std::string taskOrder;
taskOrder.emplace_back("RedundantJoints");
taskOrder.emplace_back("static_Contact");
taskOrder.emplace_back("Roll_Pitch_Yaw_Pz");
taskOrder.emplace_back("PxPy");
taskOrder.emplace_back("SwingLeg");
taskOrder.emplace_back("HandTrack");
//Adjust task priority order
- WBC Weights
//PriorityTasks.h
Eigen::MatrixXd Kp; // Position error weight for a specific WBC priority
Eigen::MatrixXd Kd; // Velocity error weight for a specific WBC priority
//WBC_QP.h
Eigen::MatrixXd Q1; // External contact force and expected error weight, ordered as fl, tl, fr, tr
Eigen::MatrixXd Q2; // Joint acceleration and expected error weight
- Swing Leg Trajectory
//FootPlacement.h
double kp_vx; // Adjustment parameter for foot placement in x direction
double kp_vy; // Adjustment parameter for foot placement in y direction
double kp_wz; // Adjustment parameter for foot placement in z direction
double stepHeight; // Step height
//FootPlacement.cpp
double FootPlacement::Trajectory(double phase, double des1, double des2); //Swing Leg Trajectory in z direction
//phase:Swing phase reaching the highest point
//des1:Highest trajectory position
//des2:Final trajectory position
- Gait Control
//GaitScheduler.h
double tSwing; // Single step duration
double FzThrehold; // Ground contact force threshold
//GaitScheduler.cpp
DataBus::LegState legState=DataBus::RS; // Initial swing leg
- Joint Parameters
//JointCtrConfig.json
"Joint-ankle-l-pitch" : {
"PVT_LPF_Fc" : 20,
"kd" : 5.0,
"kp" : 50.0,
"maxPos" : 0.61087,
"maxSpeed" : 48.8,
"maxTorque" : 58.5,
"minPos" : -0.43644
}
Model Replacement Guide
Refer to theTutorial (opens in a new tab)document for model replacement.
Reference
[1] D. Kim, J. D. Carlo, B. Katz, G. Bledt, S. Kim, Highly dynamic quadruped locomotion via whole-body impulse control and model predictive control. arXiv:1909.06586 (2019).
[2] Kim D, Jorgensen S J, Lee J, et al. Dynamic locomotion for passive-ankle biped robots and humanoids using whole-body locomotion control. arXiv:1901.08100 (2020).
[3] Di Carlo J, Wensing P M, Katz B, et al. Dynamic locomotion in the mit cheetah 3 through convex model-predictive control[C]//2018 IEEE/RSJ international conference on intelligent robots and systems (IROS). IEEE, 2018: 1-9.
[4] 卞泽坤, 王兴兴. 四足机器人控制算法: 建模、控制与实践[M]. 机械工业出版社, 2023
Citation Format
If you use the code from this open-source project, please cite it as follows:
@software{Robot2024OpenLoong,
author = {Humanoid Robot (Shanghai) Co., Ltd},
title = {{OpenLoong-DynamicsControl: Motion control framework of humanoid robot based on MPC and WBC}},
url = {https://github.com/loongOpen/Openloong-dyn-control.git},
year = {2024}
}
Contact Information
Developers are welcome to contribute to the optimization and improvement of this code repository!
💬 Start a Discussion (opens in a new tab) | 📝 Report an Issue (opens in a new tab) | 📨 Submit a Change Request (opens in a new tab)
For any questions or suggestions regarding this code, please contact open@openloong.org.cn (opens in a new tab)
Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.