How skywoodsz/qm_control works
Project type and purpose
• From the README and file tree, qm_control is a robotics software stack implemented as a ROS1 (Noetic) Catkin workspace.
• It provides a Model Predictive Control (MPC) + Whole-Body Control (WBC) framework for a quadruped manipulator, along with simulation support in Gazebo.
• The key use cases: whole-body planning, end-effector motion tracking, disturbance-robust control, compliance control, and real-hardware deployment.
File structure
Top-level organization:
– LICENSE, README.md, docs
– A Catkin workspace with multiple ROS packages, each in its own subfolder:
· qm_common: shared data structures and hardware interface abstractions
· qm_control: the core controller logic (MPC + WBC orchestrator)
· qm_controllers: ROS controller plugins and nodes
· qm_description: URDF/Xacro robot models, meshes, and RViz configs
· qm_estimation: state estimation interfaces and implementations
· qm_gazebo: Gazebo hardware simulation plugin and launch files
· qm_interface: the “API” layer to the OCS2 solver and visualization
· qm_msgs: custom ROS message definitions
· qm_wbc: WBC algorithms (hierarchical QP solvers, tasks)
· qpoases_catkin: catkinized external dependency (qpOASES QP solver)
Notice patterns:
• MVC-like layering: qm_msgs ↔ controllers (qm_controllers) ↔ core logic (qm_control + qm_interface + qm_wbc) ↔ hardware/sim (qm_gazebo, actual hardware).
• ROS-centric micro-services: each package is a node or plugin with its own CMakeLists/package.xml.
• Clear separation of concerns: description (URDF), simulation (Gazebo), estimation, control, interface, and shared utilities.
README insights
• Depends on ROS1-Noetic & OCS2 (external MPC solver).
• Two modes: “MPC with WBC” and “MPC only.”
• Launch sequence: gazebo world → load controllers → start controller manager → send commands via ROS topics/services or GUI (rqt).
• Uses ROS launch files (qm_gazebo/launch, qm_controllers/launch, qm_description/launch).