executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
mpc-controlOperate the CPU-side quadruped convex MPC controller, its robot/state/command interfaces, gait and FSM runners, policy bridge, and compiled solver extension.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill for low-level, CPU-side control questions: selecting a supported robot or
runner, converting state and commands into 12 joint torques, configuring gaits/FSM
transitions, checking the mpc_osqp binding, or diagnosing controller data-shape
failures. Keep Isaac Gym lifecycle and Hydra/RSL-RL training in the linked neighboring
skills rather than reproducing them here.
RobotType.ALIENGO, RobotType.A1, or RobotType.GO1, and construct
Quadruped(robot_type). Do not invent a fourth robot model; Mini Cheetah is not an
enabled public enum. Preserve the model's four-leg, three-joint-per-leg ordering.ControllerType.FSM, ControllerType.MIN, or ControllerType.POLICY.
RobotRunnerFSM adds state transitions, RobotRunnerMin calls convex MPC directly,
and RobotRunnerPolicy computes learned MPC weights before entering the FSM.runner.init(robot_type) once, then call runner.run(dof_states, body_states, commands) once per control step. Reset between episodes with the runner's reset().
The result is a NumPy float32 vector of exactly 12 torques, ordered as four
consecutive three-joint leg blocks.Parameters.bridge_MPC_to_RL changes the low-level MPC path to
numeric arrays, but the policy runner still expects the structured DOF fields.[x_velocity, y_velocity, yaw_rate]. Optional MPC weights must
be nonnegative and have the exact documented length. A zero command is safe input,
not an implicit request to enter locomotion.DesiredStateCommand stores velocity/yaw commands and a 13-element MPC weight
vector. ConvexMPCLocomotion chooses the gait, estimates contact/ground state,
solves for stance forces, and fills swing/stance leg commands.LegController combines feed-forward force/torque, Cartesian PD, and joint PD through
each leg Jacobian. zeroCommand() must precede each controller call so stale commands
cannot survive a failed branch; updateCommand() is the torque boundary.Parameters.control_mode. In normal operation, recovery stand,
passive, and locomotion transition through ControlFSM; safety checks can redirect
unsafe locomotion to recovery. Test mode runs the current state without transition
checks.Run the bundled scripts/check_mpc_api.py as a read-only API/extension probe. Treat an
extension import failure as a build/runtime diagnosis, not as evidence that the control
math is wrong. The prepared handoff passed Python 3.8, PyTorch 1.10/CUDA 11.3 on an
A100 allocation, package imports, rsl_rl, and mpc_osqp; Isaac Gym was unavailable,
so RL/simulation remains an explicit required-backend block. Do not run interactive
native demos or simulator tests as part of a CPU smoke check; they are deferred until
the required Isaac Gym backend is installed and verified. Keep review reports and test
fixtures outside this runtime subtree. Preserve this separation when handing the
controller to another application: API success is not a claim of gait stability, robot
safety, or sim-to-real readiness.