Go to the documentation of this file.
26 using namespace trajectories;
27 using namespace tasks;
32 const double frictionCoefficient,
33 const double minNormalForce,
const double maxNormalForce)
36 m_forceInequality(
name, 17, 12),
37 m_forceRegTask(
name, 6, 12),
38 m_contactPoints(contactPoints),
40 m_mu(frictionCoefficient),
41 m_fMin(minNormalForce),
42 m_fMax(maxNormalForce) {
49 const double frictionCoefficient,
50 const double minNormalForce,
const double maxNormalForce,
54 m_forceInequality(
name, 17, 12),
55 m_forceRegTask(
name, 6, 12),
56 m_contactPoints(contactPoints),
58 m_mu(frictionCoefficient),
59 m_fMin(minNormalForce),
60 m_fMax(maxNormalForce) {
61 std::cout <<
"[Contact6d] The constructor with forceRegWeight is deprecated "
62 "now. forceRegWeight should now be specified when calling "
63 "addRigidContact()\n";
78 const int n_in = 4 * 4 + 1;
79 const int n_var = 3 * 4;
80 Matrix B = Matrix::Zero(n_in, n_var);
81 Vector lb = -1e10 * Vector::Ones(n_in);
94 for (
int i = 1;
i < 4;
i++) {
95 B.block<4, 3>(4 *
i, 3 *
i) =
B.topLeftCorner<4, 3>();
113 "f needs to contain " + std::to_string(
n_force()) +
" rows");
125 typedef Eigen::Matrix<double, 6, 6> Matrix6;
126 Matrix6
A = Matrix6::Zero();
135 for (
int i = 0;
i < 4;
i++) {
152 "The number of rows needs to be 3");
154 "The number of cols needs to be 4");
155 if (contactPoints.rows() != 3 || contactPoints.cols() != 4)
return false;
166 "The size of the contactNormal vector needs to equal 3");
175 frictionCoefficient > 0.0,
176 "The friction coefficient needs to be positive");
177 if (frictionCoefficient <= 0.0)
return false;
178 m_mu = frictionCoefficient;
185 minNormalForce > 0.0 && minNormalForce <=
m_fMax,
186 "The minimal normal force needs to be greater than 0 and less than or "
187 "equal to the maximal force");
188 if (minNormalForce <= 0.0 || minNormalForce >
m_fMax)
return false;
197 "The maximal force needs to be greater than "
198 "or equal to the minimal force");
199 if (maxNormalForce <
m_fMin)
return false;
#define PINOCCHIO_CHECK_INPUT_ARGUMENT(...)
Abstract class representing a linear equality/inequality constraint. Equality constraints are represe...
const Vector & lowerBound() const override
const ConstraintBase & compute(const double t, ConstRefVector q, ConstRefVector v, Data &data) override
const ConstraintBase & getConstraint() const override
bool setVector(ConstRefVector b) override
Eigen::Matrix< typename D::Scalar, 3, 3, PINOCCHIO_EIGEN_PLAIN_TYPE(D)::Options > skew(const Eigen::MatrixBase< D > &v)
bool setUpperBound(ConstRefVector ub) override
bool setLowerBound(ConstRefVector lb) override
const Vector & Kp() const
void setReference(TrajectorySample &ref)
Wrapper for a robot based on pinocchio.
const Vector & Kd() const
const typedef Eigen::Ref< const Matrix > ConstRefMatrix
const Vector & upperBound() const override
virtual bool setMatrix(ConstRefMatrix A)
tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Sat May 3 2025 02:48:16