How mit-biomimetics/cheetah-software works
Project Type & Purpose
• This is a robotics control and simulation framework for MIT’s Cheetah‐3 and Mini Cheetah robots.
• It consists of:
• A shared “common” library (dynamics, state estimation, controllers, utilities)
• A real–hardware robot executable (hardware interfaces, real‐time loops)
• A Qt-based simulator executable (visualization, simulator loop)
• Multiple user‐supplied controller executables (e.g. JPos, MIT_Controller, etc.)
• LCM‐based messaging for inter‐process communication
• Embedded third-party libraries (solvers, EtherCAT stack, YAML parser, IMU drivers)
File Structure
• Top‐level directories:
• cmake/ & CMakeLists.txt – build configuration
• common/ – static library containing Dynamics, Collision, Controllers, Math, Utilities, simulation helpers, + unit tests
• robot/ – RobotRunner, HardwareBridge (EtherCAT, SPI, serial, VectorNav), control loops, real‐time support
• sim/ – Simulation engine, Qt UI panels, Graphics3D, RobotInterface, joystick support
• user/ – Example controllers, each in its own subfolder, linking common + robot logic into standalone executables
• lcm-types/ – .lcm message definitions (robot state, commands, visualization data)
• third-party/ – Bundled libraries (OSQP, qpOASES, SOEM, ParamHandler, inih, LORD IMU, vectornav)
• scripts/ – Helper scripts for building, LCM type generation, network setup, logging, deployment
• Each of common/robot/sim/user targets links against common/libbiomimetics.a, LCM, Eigen, Qt (sim_only), and the third-party libs it needs.
Pull Insights from README
• common/ produces a single static library libbiomimetics.a with all simulation, dynamics, and control-code.
• robot/ and sim/ are separate executables; sim/ is the only one requiring Qt5.
• user/ controllers are launched either in sim mode (s) or real‐robot mode (r), passing in robot type (3 or m).
• Communication between robot, sim, and user controllers is handled by LCM pub/sub.
Capturing Essential Detail
• Don’t hesitate to break out subcomponents for clarity (e.g., within Common Library: DynamicsSimulator, GaitScheduler, FootSwingTrajectory, ContactEstimator).
• Build-time relationships if relevant (e.g., CMake target dependencies), but focus primarily on runtime architecture.