mcarfagno/mpc_python — reverse-engineered prompt
Reverse engineered prompt
Build me a simple Python project that shows model predictive control for a small car following a path. I want it to be educational and easy to read, not a giant research codebase.
The main demo should make a toy car track a curved path using an iterative MPC approach with CVXPY, including basic vehicle kinematics and repeated linearization so it can handle nonlinear motion in a practical way. Please include a headless demo that runs without a physics simulator, and if possible a MuJoCo demo using a small car model so I can see it drive in a simple scene.
I’d also like examples with no obstacles, static obstacles, and moving obstacles, where the car tries to avoid them while staying on the path. Put the tuning values in clear config files, add comments, and include a few notebooks or scripts that explain the model derivation and MPC setup. Look up current docs online if you need to.
Want more depth? Deep Reverse