12namespace smooth::feedback {
25 Eigen::Matrix<double, Dof<U>, 1>
u_weight{Eigen::Matrix<double, Dof<U>, 1>::Ones()};
41template<LieGroup G, Manifold U,
typename Dyn, diff::Type DT = diff::Type::Default>
61 const int nu_ineq = prm_.ulim.A.rows();
62 asif_to_qp_allocate<G, U>(qp_, prm_.asif.K, nu_ineq, prm_.nh);
82 std::pair<U, QPSolutionStatus>
operator()(
const G & g,
const U & u_des,
auto && h,
auto && bu)
84 using std::chrono::duration, std::chrono::duration_cast, std::chrono::nanoseconds;
86 assert((prm_.nh == std::invoke_result_t<
decltype(h), Scalar<G>, G>::RowsAtCompileTime));
96 asif_to_qp_update<G, U, DT>(qp_, pbm, prm_.asif, f_, std::forward<
decltype(h)>(h), std::forward<
decltype(bu)>(bu));
97 auto sol = feedback::solve_qp(qp_, prm_.qp, warmstart_);
99 if (sol.code == QPSolutionStatus::Optimal) { warmstart_ = sol; }
101 return {rplus(u_des, sol.primal.template head<Dof<U>>()), sol.code};
109 std::optional<
QPSolution<-1, -1,
double>> warmstart_;
Functions for active Set Invariance (ASI) filtering on Lie groups.
ASIFilter(const Dyn &f, const ASIFilterParams< U > &prm=ASIFilterParams< U >{})
Construct an ASI filter.
ASIFilter(Dyn &&f, ASIFilterParams< U > &&prm=ASIFilterParams< U >{})
Construct an ASI filter (rvalue version).
std::pair< U, QPSolutionStatus > operator()(const G &g, const U &u_des, auto &&h, auto &&bu)
Filter an input.
Quadratic Program solver.
Active set invariance problem definition.
ASIFilter filter parameters.
ASIFtoQPParams asif
ASIFilter algorithm parameters.
ManifoldBounds< U > ulim
Input bounds.
std::size_t nh
Number of barrier constraints (must agree with output dimensionality of h)
QPSolverParams qp
solve_qp() parameters
Eigen::Matrix< double, Dof< U >, 1 > u_weight
Weights on desired input.
Parameters for asif_to_qp.
Quadratic program definition.