wbc
ContactsFrictionSurfaceConstraint.hpp
Go to the documentation of this file.
1#ifndef WBC_CORE_CONTACTS_FRICTION_SURFACE_CONSTRAINT_HPP
2#define WBC_CORE_CONTACTS_FRICTION_SURFACE_CONSTRAINT_HPP
3
5
6namespace wbc {
7
17public:
19 explicit ContactsFrictionSurfaceConstraint(bool _reduced = false, bool _use_slack = false) :
20 Constraint(Constraint::inequality), reduced(_reduced), use_slack(_use_slack) { }
21
23
24 virtual void update(RobotModelPtr robot_model) override;
25
27 void setUseSlack(bool enable){use_slack = enable;}
28
30 bool useSlack() const {return use_slack;}
31
32private:
33 bool reduced; // if torques are removed from the qp formulation or not
34 bool use_slack; // if the friction cone is softened using one slack variable per contact
35};
36
37}
38
39#endif // WBC_CORE_CONTACTS_FRICTION_SURFACE_CONSTRAINT_HPP
@ inequality
Definition Constraint.hpp:22
Constraint()
Default constructor.
Definition Constraint.cpp:5
void setUseSlack(bool enable)
Enable/disable softening of the friction cone using one slack variable per contact.
Definition ContactsFrictionSurfaceConstraint.hpp:27
virtual void update(RobotModelPtr robot_model) override
Update constraint matrix and vectors, depending on the type. Abstract method.
Definition ContactsFrictionSurfaceConstraint.cpp:5
bool useSlack() const
Return whether the friction cone is softened using slack variables.
Definition ContactsFrictionSurfaceConstraint.hpp:30
virtual ~ContactsFrictionSurfaceConstraint()=default
ContactsFrictionSurfaceConstraint(bool _reduced=false, bool _use_slack=false)
Default constructor.
Definition ContactsFrictionSurfaceConstraint.hpp:19
Definition ContactsAccelerationConstraint.cpp:3
std::shared_ptr< RobotModel > RobotModelPtr
Definition RobotModel.hpp:318