How loongopen/openloong-dyn-control works
OpenLoong Dynamics Control is a humanoid motion-control framework for MuJoCo, combining model predictive control (MPC), whole-body control (WBC), gait and foot-placement planning, state estimation, and joint actuation. Demo programs coordinate the control loop: simulator measurements enter through the MuJoCo interface and shared data bus; planning and controllers compute desired motion and joint commands; the actuator interface applies torques back to the simulation. Separate demos cover jumping, joystick-guided walking, and obstacle stepping. Wiring beyond the sampled demo excerpts is shown only where documented capabilities support the subsystem.
Main entry points: data_bus.h Robot data bus · walk_mpc_wbc_joystick.cpp Joystick walking · MJ_interface.cpp MuJoCo interface · walk_mpc_wbc.cpp Walking loop
Components 19
Motion demos
- Walking loop
demo/walk_mpc_wbc.cpp - Joystick walking
demo/walk_mpc_wbc_joystick.cpp - Jumping demo
demo/jump_mpc.cpp - Obstacle stepping
demo/walk_mpc_wbc.cpp
Motion planning
- Joystick interpreter
algorithm/joystick_interpreter.cpp - Gait scheduler
algorithm/gait_scheduler.cpp - Foot placement
algorithm/foot_placement.cpp
Control algorithms
- MPC planner
algorithm/mpc.cpp - Whole-body control
algorithm/wbc_priority.cpp - Priority tasks
algorithm/priority_tasks.cpp - Joint PVT control
common/PVT_ctrl.cpp
Robot state
- State estimator
algorithm/StateEst.cpp - Kinematics and dynamics
algorithm/pino_kin_dyn.cpp - Robot data bus
common/data_bus.h
Simulation runtime
- MuJoCo interface
sim_interface/MJ_interface.cpp - GLFW controls
sim_interface/GLFW_callbacks.cpp - Data logger
common/data_logger.cpp
Other components
- Operator
- MuJoCo simulator
Connections 27
- Operator → GLFW controls: controls
- Operator → Joystick interpreter: movement input
- Walking loop → MuJoCo interface: reads sensors
- MuJoCo interface → Robot data bus: writes measurements
- Walking loop → Kinematics and dynamics: computes dynamics
- Kinematics and dynamics → Robot data bus: writes kinematics
- Joystick walking → State estimator: updates estimate
- State estimator → Robot data bus: reads and writes state
- Joystick walking → Kinematics and dynamics: computes dynamics
- Joystick interpreter → Robot data bus: sets desired motion
- Gait scheduler → Robot data bus: updates gait state
- Foot placement → Robot data bus: updates foot targets
- MPC planner → Robot data bus: writes motion commands
- Whole-body control → Priority tasks: computes task priorities
- Whole-body control → Robot data bus: reads state and writes commands
- Joint PVT control → Robot data bus: reads commands and writes torques
- Walking loop → MuJoCo interface: applies torques
- MuJoCo interface → MuJoCo simulator: reads and actuates
- MuJoCo simulator → MuJoCo interface: sensor data
- GLFW controls → MuJoCo simulator: renders and steps
- Walking loop → Data logger: records telemetry
- Jumping demo → MPC planner: plans jump motion
- Obstacle stepping → MPC planner: plans stepping motion
- Joystick walking → Gait scheduler: schedules gait
- Joystick walking → Foot placement: plans foot placement
- Joystick walking → Whole-body control: computes joint motion
- Joystick walking → Joint PVT control: computes joint torques