1#ifndef ROBOTOC_SPLIT_SOLUTION_HPP_
2#define ROBOTOC_SPLIT_SOLUTION_HPP_
122 Eigen::VectorBlock<Eigen::VectorXd>
f_stack();
127 const Eigen::VectorBlock<const Eigen::VectorXd>
f_stack() const;
178 Eigen::VectorBlock<Eigen::VectorXd>
mu_stack();
183 const Eigen::VectorBlock<const Eigen::VectorXd>
mu_stack() const;
202 Eigen::VectorBlock<Eigen::VectorXd>
xi_stack();
207 const Eigen::VectorBlock<const Eigen::VectorXd>
xi_stack() const;
339 void disp(std::ostream& os) const;
344 Eigen::VectorXd mu_stack_, f_stack_, xi_stack_;
345 bool has_floating_base_;
347 std::vector<
bool> is_contact_active_;
348 int dimf_, dims_, max_num_contacts_;
354#include "robotoc/core/split_solution.hxx"
Impact status of robot model. Wrapper of ContactStatus to treat impacts.
Definition: impact_status.hpp:21
Dynamics and kinematics model of robots. Wraps pinocchio::Model and pinocchio::Data....
Definition: robot.hpp:32
Newton direction of the solution to the optimal control problem split into a time stage.
Definition: split_direction.hpp:20
Solution to the optimal control problem split into a time stage.
Definition: split_solution.hpp:20
Eigen::VectorBlock< Eigen::VectorXd > f_stack()
Stack of the active contact forces. Size is ContactStatus::dimf().
Definition: split_solution.hxx:40
Eigen::VectorBlock< Eigen::VectorXd > xi_stack()
Stack of the Lagrange multipliers w.r.t. the switching constraints that is active at the future impac...
Definition: split_solution.hxx:146
SplitSolution(const Robot &robot)
Construct a split solution.
SplitSolution()
Default constructor.
void disp(std::ostream &os) const
Displays the split solution onto a ostream.
void setRandom(const Robot &robot)
Set each component vector by random value based on the current contact status.
void set_f_stack()
Sets SplitSolution::f_stack() from SplitSolution::f.
Definition: split_solution.hxx:51
Eigen::VectorXd u
Control input torques. Size is Robot::dimu().
Definition: split_solution.hpp:109
void integrate(const Robot &robot, const double step_size, const SplitDirection &d, const bool impact=false)
Integrates the solution based on step size and direction.
Eigen::VectorXd q
Configuration. Size is Robot::dimq().
Definition: split_solution.hpp:87
int dimf() const
Returns the dimension of the contact at the current contact status.
Definition: split_solution.hxx:157
double lagrangeMultiplierLinfNorm() const
Return L-infinity Norm of the lagrange multipliers. Used in line search.
Eigen::Matrix< double, 6, 1 > Vector6d
Definition: split_solution.hpp:22
Eigen::VectorXd dv
Generalized acceleration. Size is Robot::dimv().
Definition: split_solution.hpp:104
Eigen::VectorXd beta
Lagrange multiplier w.r.t. the inverse dynamics constraint. Size is Robot::dimv().
Definition: split_solution.hpp:155
SplitSolution & operator=(const SplitSolution &)=default
Default copy assign operator.
int dims() const
Returns the dimension of the switching constraint.
Definition: split_solution.hxx:162
Eigen::VectorXd gmm
Lagrange multiplier w.r.t. the state equation w.r.t. v. Size is Robot::dimv().
Definition: split_solution.hpp:149
void setSwitchingConstraintDimension(const int dims)
Sets the dimension of the switching constraint.
Definition: split_solution.hxx:33
std::vector< bool > isContactActive() const
Return activities of contacts.
Definition: split_solution.hxx:175
void set_mu_vector()
Set SplitSolution::mu from SplitSolution::mu_stack().
Definition: split_solution.hxx:125
Eigen::VectorXd v
Generalized velocity. Size is Robot::dimv().
Definition: split_solution.hpp:92
Eigen::VectorBlock< Eigen::VectorXd > mu_stack()
Stack of the Lagrange multipliers w.r.t. the acceleration-level contact constraints that is active at...
Definition: split_solution.hxx:93
void set_mu_stack()
Set SplitSolution::mu_stack() from SplitSolution::mu.
Definition: split_solution.hxx:104
void copyDual(const SplitSolution &other)
Copies the dual solution from another solution.
bool isApprox(const SplitSolution &other) const
Return true if two SplitSolution have the same value and false if not.
Eigen::VectorXd lmd
Lagrange multiplier w.r.t. the state equation w.r.t. q. Size is Robot::dimv().
Definition: split_solution.hpp:143
Eigen::VectorXd a
Generalized acceleration. Size is Robot::dimv().
Definition: split_solution.hpp:98
void set_f_vector()
Sets SplitSolution::f from SplitSolution::f_stack().
Definition: split_solution.hxx:72
~SplitSolution()=default
Default destructor.
static SplitSolution Random(const Robot &robot)
Generates split solution filled randomly.
std::vector< Vector6d > mu
Lagrange multiplier w.r.t. the acceleration-level contact constraint. Upper 3 elements are w....
Definition: split_solution.hpp:163
void setContactStatus(const ContactStatus &contact_status)
Set contact status, i.e., set the dimension of the contacts.
Definition: split_solution.hxx:10
SplitSolution(const SplitSolution &)=default
Default copy constructor.
Eigen::VectorXd nu_passive
Lagrange multiplier w.r.t. the passive joint constraint. Size is Robot::dim_passive().
Definition: split_solution.hpp:169
std::vector< Vector6d > f
Contact wrenches. Upper 3 elements are linear contact force and the lower 3 elements are the angular ...
Definition: split_solution.hpp:116
void copyPrimal(const SplitSolution &other)
Copies the primal solution from another solution.
SplitSolution(SplitSolution &&) noexcept=default
Default move constructor.
Definition: constraint_component_base.hpp:17
ContactType
Types of contacts.
Definition: contact_status.hpp:22