Releases: stephane-caron/qpmpc
v3.0.1
This release fixes inequality vector data types for the wheeled inverted pendulum system, and adds some type checks to make sure generated problems use floating-point arrays.
Fixed
- Deprecation warning from using
logging.warn
- Make sure stacked MPC matrices have floating-point data type
- Type of inequality vectors in wheeled inverted pendulum MPC
v3.0.0
This is a major release according to semantic versioning because the name of the project changed to qpmpc. In passing, the "cart pole" system was a misnomer and has been renamed to "wheeled inverted pendulum".
Changed
- Renamed the "cart pole" system (misnomer) to "wheeled inverted pendulum"
- Renamed the library to "qpmpc"
v2.0.0
This release makes a major API update to switch from cold-start to hot-start when solving of MPC QP problems. It meanwhile adds two examples (with live plots) taken from real-robot use cases:
- The open-loop MPC part of the LIPM walking controller:
python examples/lipm_walking_controller.py
- A closed-loop MPC balancer for Upkie, which also runs on the real robots:
python examples/cart_pole.py
The problem class, now called MPCProblem
, allows for initial/goal state and target trajectory updates. A new MPCQP
class is introduced for QP vector updates (cost vectors depend on the initial state and targets, while on LTI problems QP matrices don't depend on these changing quantities, a source of optimization for faster solve times).
The new API also introduces two new submodules:
- Live plots: a debugging tool for plotting MPC trajectories while running (uses the
TkAgg
matplotlib backend) - Systems: we start gathering common systems that can be re-used outside of examples. For instance,
CartPole
shipped with this release is used in a closed-loop MPC balancer on Upkie.
Added
- Base class for exceptions raised by this library
- Documentation checks using
ruff
- Exception:
ProblemDefinitionError
- MPCProblem: setter for the initial state
- MPCProblem: target state trajectory for stage state cost
- MPCQP class to update cost vectors during execution
- Plan:
first_input
getter - Plan:
is_empty
property - Started
ltv_mpc.live_plots
submodule - Started
ltv_mpc.systems
submodule
Changed
- Always add state-input inequalities (even when unfeasible)
- Don't assume a
Problem
is fully defined in constructor - Initial and goal states are now keyword arguments of
MPCProblem
- Refactor
build_qp
into a newMPCQP
class - Rename
Problem
toMPCProblem
- Rename
Solution
toPlan
- Rename
stacked_inputs
to justinputs
in plans - Rename
stacked_states
to juststates
in plans - Solver keyword argument to
solve_mpc
is now mandatory - Use problem class from
qpsolvers
internally - Warn rather than raise an exception when initial state is unfeasible
v1.0.0
This version adds a solver
keyword argument to solve_mpc
to select the backend QP solver.
It follows from the API update in qpsolvers v2.0 where the default solver was deprecated and the solver
argument became mandatory.
Added
- New
mpc_interface
alternative in the README
Changed
⚠️ API update:solve_qp
now takes a mandatorysolver
keyword argument
Fixed
- Unit tests for the new
solver
keyword argument
v0.7.0
This minor version adds a sparse keyword argument, for use with sparse QP solvers like OSQP.
Added
sparse
keyword argument to use with sparse QP solvers- Usage and examples documentation sections
Changed
- Only export
Problem
,Solution
andsolve_mpc
module-wide
Fixed
- Edge case where inputs don't affect the first inequality constraints
v0.6.0
Here comes the first working version of this module, following an initial import from pymanoid and refactoring to a functional API.
This module defines a one-stop shop solve_mpc(problem: Problem) -> Solution
function. The Problem
type defines the linear model predictive control problem (system, constraints, initial state and cost function to optimize) while the Solution
holds the resulting state and input trajectories.
Added
- Initial import from pymanoid's
mpc.py
. - Humanoid stepping example
- Triple integrator example
Changed
- Extend to time-varying state and input transition matrices