algorithm/contact-cholesky.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019-2024 INRIA
3 //
4 
5 #ifndef __pinocchio_algorithm_contact_cholesky_hpp__
6 #define __pinocchio_algorithm_contact_cholesky_hpp__
7 
11 
14 
15 namespace pinocchio
16 {
17 
18  // Forward declaration of algo
19  namespace details
20  {
21  template<typename MatrixLike, int ColsAtCompileTime = MatrixLike::ColsAtCompileTime>
22  struct UvAlgo;
23 
24  template<typename MatrixLike, int ColsAtCompileTime = MatrixLike::ColsAtCompileTime>
25  struct UtvAlgo;
26 
27  template<typename MatrixLike, int ColsAtCompileTime = MatrixLike::ColsAtCompileTime>
28  struct UivAlgo;
29 
30  template<typename MatrixLike, int ColsAtCompileTime = MatrixLike::ColsAtCompileTime>
31  struct UtivAlgo;
32 
33  template<typename Scalar, int Options, typename VectorLike>
34  VectorLike & inverseAlgo(
36  const Eigen::DenseIndex col,
37  const Eigen::MatrixBase<VectorLike> & vec);
38  } // namespace details
39 
40  template<typename _ContactCholeskyDecomposition>
42 
54  template<typename _Scalar, int _Options>
55  struct PINOCCHIO_UNSUPPORTED_MESSAGE("The API will change towards more flexibility")
57  {
58  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
59 
60  typedef pinocchio::Index Index;
61  typedef _Scalar Scalar;
62  enum
63  {
64  LINEAR = 0,
65  ANGULAR = 3,
66  Options = _Options
67  };
68 
69  typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1, Options> Vector;
70  typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options> Matrix;
71  typedef typename PINOCCHIO_EIGEN_PLAIN_ROW_MAJOR_TYPE(Matrix) RowMatrix;
72  // TODO Remove when API is stabilized
78  typedef Eigen::Matrix<Eigen::DenseIndex, Eigen::Dynamic, 1, Options> IndexVector;
79  typedef typename PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(IndexVector) VectorOfIndexVector;
80  typedef Eigen::Matrix<bool, Eigen::Dynamic, 1, Options> BooleanVector;
81 
84  struct Slice
85  {
86  Slice(const Eigen::DenseIndex & first_index, const Eigen::DenseIndex & size)
87  : first_index(first_index)
88  , size(size)
89  {
90  }
91 
92  Eigen::DenseIndex first_index;
93  Eigen::DenseIndex size;
94  };
95 
97  DelassusCholeskyExpression;
99 
100  typedef std::vector<Slice> SliceVector;
101  typedef std::vector<SliceVector> VectorOfSliceVector;
103 
108 
114  template<typename S1, int O1, template<typename, int> class JointCollectionTpl>
116  {
117  // TODO Remove when API is stabilized
122  allocate(model, empty_contact_models);
123  }
124 
132  // TODO Remove when API is stabilized
135  template<typename S1, int O1, template<typename, int> class JointCollectionTpl, class Allocator>
138  const std::vector<RigidConstraintModelTpl<S1, O1>, Allocator> & contact_models)
139  {
140  allocate(model, contact_models);
141  }
143 
147 
155  // TODO Remove when API is stabilized
158  template<typename S1, int O1, template<typename, int> class JointCollectionTpl, class Allocator>
159  void allocate(
161  const std::vector<RigidConstraintModelTpl<S1, O1>, Allocator> & contact_models);
163 
168  Matrix getInverseOperationalSpaceInertiaMatrix() const
169  {
170  Matrix res(constraintDim(), constraintDim());
171  getInverseOperationalSpaceInertiaMatrix(res);
172  return res;
173  }
174 
175  template<typename MatrixType>
176  void getInverseOperationalSpaceInertiaMatrix(const Eigen::MatrixBase<MatrixType> & res) const
177  {
178  typedef typename SizeDepType<Eigen::Dynamic>::template BlockReturn<RowMatrix>::ConstType
179  ConstBlockXpr;
180  // typedef typename RowMatrix::ConstBlockXpr ConstBlockXpr;
181  const ConstBlockXpr U1 = U.topLeftCorner(constraintDim(), constraintDim());
182 
184  MatrixType & res_ = PINOCCHIO_EIGEN_CONST_CAST(MatrixType, res);
185  OSIMinv_tmp.noalias() = D.head(constraintDim()).asDiagonal() * U1.adjoint();
186  res_.noalias() = -U1 * OSIMinv_tmp;
188  }
189 
192  DelassusCholeskyExpression getDelassusCholeskyExpression() const
193  {
194  return DelassusCholeskyExpression(*this);
195  }
196 
200  Matrix getOperationalSpaceInertiaMatrix() const
201  {
202  Matrix res(constraintDim(), constraintDim());
203  getOperationalSpaceInertiaMatrix(res);
204  return res;
205  }
206 
207  template<typename MatrixType>
208  void getOperationalSpaceInertiaMatrix(const Eigen::MatrixBase<MatrixType> & res_) const
209  {
210  MatrixType & res = PINOCCHIO_EIGEN_CONST_CAST(MatrixType, res_);
211  typedef typename SizeDepType<Eigen::Dynamic>::template BlockReturn<RowMatrix>::ConstType
212  ConstBlockXpr;
213  // typedef typename RowMatrix::ConstBlockXpr ConstBlockXpr;
214  const Eigen::TriangularView<ConstBlockXpr, Eigen::UnitUpper> U1 =
215  U.topLeftCorner(constraintDim(), constraintDim())
216  .template triangularView<Eigen::UnitUpper>();
217 
219  U1inv.setIdentity();
220  U1.solveInPlace(U1inv); // TODO: implement Sparse Inverse
221  OSIMinv_tmp.noalias() = -U1inv.adjoint() * Dinv.head(constraintDim()).asDiagonal();
222  res.noalias() = OSIMinv_tmp * U1inv;
224  }
225 
226  Matrix getInverseMassMatrix() const
227  {
228  Matrix res(nv, nv);
229  getInverseMassMatrix(res);
230  return res;
231  }
232 
233  template<typename MatrixType>
234  void getInverseMassMatrix(const Eigen::MatrixBase<MatrixType> & res_) const
235  {
236  MatrixType & res = PINOCCHIO_EIGEN_CONST_CAST(MatrixType, res_);
237  typedef typename SizeDepType<Eigen::Dynamic>::template BlockReturn<RowMatrix>::ConstType
238  ConstBlockXpr;
239  // typedef typename RowMatrix::ConstBlockXpr ConstBlockXpr;
240  const Eigen::TriangularView<ConstBlockXpr, Eigen::UnitUpper> U4 =
241  U.bottomRightCorner(nv, nv).template triangularView<Eigen::UnitUpper>();
242 
244  U4inv.setIdentity();
245  U4.solveInPlace(U4inv); // TODO: implement Sparse Inverse
246  Minv_tmp.noalias() = U4inv.adjoint() * Dinv.tail(nv).asDiagonal();
247  res.noalias() = Minv_tmp * U4inv;
249  }
250 
251  template<typename MatrixType>
252  void getJMinv(const Eigen::MatrixBase<MatrixType> & res_) const
253  {
254  MatrixType & res = PINOCCHIO_EIGEN_CONST_CAST(MatrixType, res_);
255  typedef typename SizeDepType<Eigen::Dynamic>::template BlockReturn<RowMatrix>::ConstType
256  ConstBlockXpr;
257  const Eigen::TriangularView<ConstBlockXpr, Eigen::UnitUpper> U4 =
258  U.bottomRightCorner(nv, nv).template triangularView<Eigen::UnitUpper>();
259  ConstBlockXpr U2 = U.topRightCorner(constraintDim(), nv);
261  U4inv.setIdentity();
262  U4.solveInPlace(U4inv); // TODO: implement Sparse Inverse
263  res.noalias() = U2 * U4inv;
265  }
266 
283  // TODO Remove when API is stabilized
286  template<
287  typename S1,
288  int O1,
289  template<typename, int> class JointCollectionTpl,
290  class ConstraintModelAllocator,
291  class ConstraintDataAllocator>
292  void compute(
295  const std::vector<RigidConstraintModelTpl<S1, O1>, ConstraintModelAllocator> & contact_models,
296  std::vector<RigidConstraintDataTpl<S1, O1>, ConstraintDataAllocator> & contact_datas,
297  const S1 mu = S1(0.))
298  {
299  compute(model, data, contact_models, contact_datas, Vector::Constant(U1inv.rows(), mu));
300  }
301 
318  template<
319  typename S1,
320  int O1,
321  template<typename, int> class JointCollectionTpl,
322  class ConstraintModelAllocator,
323  class ConstraintDataAllocator,
324  typename VectorLike>
325  void compute(
328  const std::vector<RigidConstraintModelTpl<S1, O1>, ConstraintModelAllocator> & contact_models,
329  std::vector<RigidConstraintDataTpl<S1, O1>, ConstraintDataAllocator> & contact_datas,
330  const Eigen::MatrixBase<VectorLike> & mus);
332 
340  template<typename VectorLike>
341  void updateDamping(const Eigen::MatrixBase<VectorLike> & mus);
342 
350  void updateDamping(const Scalar & mu);
351 
353  Eigen::DenseIndex size() const
354  {
355  return D.size();
356  }
357 
360  Eigen::DenseIndex constraintDim() const
361  {
362  return size() - nv;
363  }
364 
366  Eigen::DenseIndex numContacts() const
367  {
368  return num_contacts;
369  }
370 
382  template<typename MatrixLike>
383  void solveInPlace(const Eigen::MatrixBase<MatrixLike> & mat) const;
384 
394  template<typename MatrixLike>
395  Matrix solve(const Eigen::MatrixBase<MatrixLike> & mat) const;
396 
402  template<typename S1, int O1, template<typename, int> class JointCollectionTpl>
404  getMassMatrixChoeslkyDecomposition(const ModelTpl<S1, O1, JointCollectionTpl> & model) const;
405 
408  template<typename MatrixLike>
409  void Uv(const Eigen::MatrixBase<MatrixLike> & mat) const;
410 
411  template<typename MatrixLike>
412  void Utv(const Eigen::MatrixBase<MatrixLike> & mat) const;
413 
414  template<typename MatrixLike>
415  void Uiv(const Eigen::MatrixBase<MatrixLike> & mat) const;
416 
417  template<typename MatrixLike>
418  void Utiv(const Eigen::MatrixBase<MatrixLike> & mat) const;
420 
422  Matrix matrix() const;
423 
425  template<typename MatrixType>
426  void matrix(const Eigen::MatrixBase<MatrixType> & res) const;
427 
429  Matrix inverse() const;
430 
432  template<typename MatrixType>
433  void inverse(const Eigen::MatrixBase<MatrixType> & res) const;
434 
435  // data
436  Vector D, Dinv;
437  RowMatrix U;
438 
441  template<typename MatrixLike, int ColsAtCompileTime>
442  friend struct details::UvAlgo;
443 
444  template<typename MatrixLike, int ColsAtCompileTime>
445  friend struct details::UtvAlgo;
446 
447  template<typename MatrixLike, int ColsAtCompileTime>
448  friend struct details::UivAlgo;
449 
450  template<typename MatrixLike, int ColsAtCompileTime>
451  friend struct details::UtivAlgo;
452 
453  // TODO Remove when API is stabilized
456  template<typename Scalar, int Options, typename VectorLike>
457  friend VectorLike & details::inverseAlgo(
459  const Eigen::DenseIndex col,
460  const Eigen::MatrixBase<VectorLike> & vec);
462 
463  template<typename S1, int O1>
464  bool operator==(const ContactCholeskyDecompositionTpl<S1, O1> & other) const;
465 
466  template<typename S1, int O1>
467  bool operator!=(const ContactCholeskyDecompositionTpl<S1, O1> & other) const;
469 
470  protected:
471  IndexVector parents_fromRow;
472  IndexVector nv_subtree_fromRow;
473 
475  IndexVector last_child;
476 
477  Vector DUt; // temporary containing the results of D * U^t
478 
480  Eigen::DenseIndex nv;
481 
483  Eigen::DenseIndex num_contacts;
484 
485  VectorOfSliceVector rowise_sparsity_pattern;
486 
488  mutable Matrix U1inv;
490  mutable Matrix U4inv;
491 
492  mutable RowMatrix OSIMinv_tmp, Minv_tmp;
493  };
494 
495  template<typename ContactCholeskyDecomposition>
497  {
498  enum
499  {
500  RowsAtCompileTime = Eigen::Dynamic
501  };
503  typedef typename ContactCholeskyDecomposition::Matrix Matrix;
504  typedef typename ContactCholeskyDecomposition::Vector Vector;
505  };
506 
507  template<typename _ContactCholeskyDecomposition>
509  : DelassusOperatorBase<DelassusCholeskyExpressionTpl<_ContactCholeskyDecomposition>>
510  {
511  typedef _ContactCholeskyDecomposition ContactCholeskyDecomposition;
513  typedef typename ContactCholeskyDecomposition::Vector Vector;
514  typedef typename ContactCholeskyDecomposition::Matrix Matrix;
515  typedef typename ContactCholeskyDecomposition::RowMatrix RowMatrix;
518 
519  typedef
520  typename SizeDepType<Eigen::Dynamic>::template BlockReturn<RowMatrix>::Type RowMatrixBlockXpr;
521  typedef typename SizeDepType<Eigen::Dynamic>::template BlockReturn<RowMatrix>::ConstType
523 
524  enum
525  {
527  };
528 
530  : Base(self.constraintDim())
531  , self(self)
532  {
533  }
534 
535  template<typename MatrixIn, typename MatrixOut>
537  const Eigen::MatrixBase<MatrixIn> & x, const Eigen::MatrixBase<MatrixOut> & res) const
538  {
539  PINOCCHIO_CHECK_ARGUMENT_SIZE(x.rows(), self.constraintDim());
540  PINOCCHIO_CHECK_ARGUMENT_SIZE(res.rows(), self.constraintDim());
541  PINOCCHIO_CHECK_ARGUMENT_SIZE(res.cols(), x.cols());
542 
544 
545  const RowMatrixConstBlockXpr U1 =
546  self.U.topLeftCorner(self.constraintDim(), self.constraintDim());
547 
548  if (x.cols() <= self.constraintDim())
549  {
550  RowMatrixBlockXpr tmp_mat =
551  const_cast<ContactCholeskyDecomposition &>(self).OSIMinv_tmp.topLeftCorner(
552  self.constraintDim(), x.cols());
553  // tmp_mat.noalias() = U1.adjoint() * x;
554  triangularMatrixMatrixProduct<Eigen::UnitLower>(U1.adjoint(), x.derived(), tmp_mat);
555  tmp_mat.array().colwise() *= -self.D.head(self.constraintDim()).array();
556  // res.const_cast_derived().noalias() = U1 * tmp_mat;
557  triangularMatrixMatrixProduct<Eigen::UnitUpper>(U1, tmp_mat, res.const_cast_derived());
558  }
559  else // do memory allocation
560  {
561  RowMatrix tmp_mat(x.rows(), x.cols());
562  // tmp_mat.noalias() = U1.adjoint() * x;
563  triangularMatrixMatrixProduct<Eigen::UnitLower>(U1.adjoint(), x.derived(), tmp_mat);
564  tmp_mat.array().colwise() *= -self.D.head(self.constraintDim()).array();
565  // res.const_cast_derived().noalias() = U1 * tmp_mat;
566  triangularMatrixMatrixProduct<Eigen::UnitUpper>(U1, tmp_mat, res.const_cast_derived());
567  }
568 
570  }
571 
572  template<typename MatrixDerived>
573  typename PINOCCHIO_EIGEN_PLAIN_TYPE(MatrixDerived)
574  operator*(const Eigen::MatrixBase<MatrixDerived> & x) const
575  {
576  typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE(MatrixDerived) ReturnType;
577  ReturnType res(self.constraintDim(), x.cols());
578  applyOnTheRight(x.derived(), res);
579  return res;
580  }
581 
582  template<typename MatrixDerived>
583  void solveInPlace(const Eigen::MatrixBase<MatrixDerived> & x) const
584  {
585  PINOCCHIO_CHECK_ARGUMENT_SIZE(x.rows(), self.constraintDim());
586 
587  const Eigen::TriangularView<RowMatrixConstBlockXpr, Eigen::UnitUpper> U1 =
588  self.U.topLeftCorner(self.constraintDim(), self.constraintDim())
589  .template triangularView<Eigen::UnitUpper>();
590 
592  U1.solveInPlace(x.const_cast_derived());
593  x.const_cast_derived().array().colwise() *= -self.Dinv.head(self.constraintDim()).array();
594  U1.adjoint().solveInPlace(x);
596  }
597 
598  template<typename MatrixDerivedIn, typename MatrixDerivedOut>
599  void solve(
600  const Eigen::MatrixBase<MatrixDerivedIn> & x,
601  const Eigen::MatrixBase<MatrixDerivedOut> & res) const
602  {
603  res.const_cast_derived() = x;
604  solveInPlace(res.const_cast_derived());
605  }
606 
607  template<typename MatrixDerived>
608  typename PINOCCHIO_EIGEN_PLAIN_TYPE(MatrixDerived)
609  solve(const Eigen::MatrixBase<MatrixDerived> & x) const
610  {
611  typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE(MatrixDerived) ReturnType;
612  ReturnType res(self.constraintDim(), x.cols());
613  solve(x.derived(), res);
614  return res;
615  }
616 
619  const ContactCholeskyDecomposition & cholesky() const
620  {
621  return self;
622  }
623 
624  Matrix matrix() const
625  {
626  return self.getInverseOperationalSpaceInertiaMatrix();
627  }
628 
629  Matrix inverse() const
630  {
631  return self.getOperationalSpaceInertiaMatrix();
632  }
633 
641  template<typename VectorLike>
642  void updateDamping(const Eigen::MatrixBase<VectorLike> & mus)
643  {
644  const_cast<ContactCholeskyDecomposition &>(self).updateDamping(mus);
645  }
646 
654  void updateDamping(const Scalar & mu)
655  {
656  const_cast<ContactCholeskyDecomposition &>(self).updateDamping(mu);
657  }
658 
659  Eigen::DenseIndex size() const
660  {
661  return self.constraintDim();
662  }
663  Eigen::DenseIndex rows() const
664  {
665  return size();
666  }
667  Eigen::DenseIndex cols() const
668  {
669  return size();
670  }
671 
672  protected:
674  }; // DelassusCholeskyExpression
675 
676 } // namespace pinocchio
677 
678 // Because of a GCC bug we should NEVER define a function that use ContactCholeskyDecompositionTpl
679 // before doing the explicit template instantiation.
680 // If we don't take care, GCC will not accept any visibility attribute when declaring the
681 // explicit template instantiation of the ContactCholeskyDecompositionTpl class.
682 // The warning message will look like this: type attributes ignored after type is already defined
683 // [-Wattributes] A minimal code example is added on the PR
684 // (https://github.com/stack-of-tasks/pinocchio/pull/2469)
685 #if PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
686  #include "pinocchio/algorithm/contact-cholesky.txx"
687 #endif // PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
688 
689 #include "pinocchio/algorithm/contact-cholesky.hxx"
690 
691 #endif // ifndef __pinocchio_algorithm_contact_cholesky_hpp__
pinocchio::RigidConstraintData
RigidConstraintDataTpl< context::Scalar, context::Options > RigidConstraintData
Definition: algorithm/fwd.hpp:27
PINOCCHIO_CHECK_ARGUMENT_SIZE
#define PINOCCHIO_CHECK_ARGUMENT_SIZE(...)
Macro to check if the size of an element is equal to the expected size.
Definition: include/pinocchio/macros.hpp:216
pinocchio::SizeDepType
Definition: matrix-block.hpp:13
pinocchio::DelassusCholeskyExpressionTpl::RowMatrixBlockXpr
SizeDepType< Eigen::Dynamic >::template BlockReturn< RowMatrix >::Type RowMatrixBlockXpr
Definition: algorithm/contact-cholesky.hpp:520
pinocchio::DelassusCholeskyExpressionTpl::ContactCholeskyDecomposition
_ContactCholeskyDecomposition ContactCholeskyDecomposition
Definition: algorithm/contact-cholesky.hpp:511
triangular-matrix.hpp
pinocchio::DelassusCholeskyExpressionTpl::cols
Eigen::DenseIndex cols() const
Definition: algorithm/contact-cholesky.hpp:667
pinocchio::traits< DelassusCholeskyExpressionTpl< ContactCholeskyDecomposition > >::Scalar
ContactCholeskyDecomposition::Scalar Scalar
Definition: algorithm/contact-cholesky.hpp:502
pinocchio::DataTpl
Definition: context/generic.hpp:25
pinocchio::cholesky::Uv
Mat & Uv(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< Mat > &v)
Perform the sparse multiplication using the Cholesky decomposition stored in data and acting in plac...
pinocchio::details::UtivAlgo
Definition: algorithm/contact-cholesky.hpp:31
pinocchio::DelassusOperatorBase
Definition: delassus-operator-base.hpp:15
pinocchio::DelassusCholeskyExpressionTpl::Vector
ContactCholeskyDecomposition::Vector Vector
Definition: algorithm/contact-cholesky.hpp:513
delassus-operator-base.hpp
pinocchio::Options
Options
Definition: joint-configuration.hpp:1082
pinocchio::nv
int nv(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvVisitor to get the dimension of the joint tangent space.
PINOCCHIO_EIGEN_CONST_CAST
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE, OBJ)
Macro for an automatic const_cast.
Definition: eigen-macros.hpp:51
pinocchio::operator==
bool operator==(const ConstraintDataBase< ConstraintDataDerived > &data1, const ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > &data2)
Definition: constraint-data-generic.hpp:104
pinocchio::DelassusCholeskyExpressionTpl::RowMatrix
ContactCholeskyDecomposition::RowMatrix RowMatrix
Definition: algorithm/contact-cholesky.hpp:515
model.hpp
matrix-block.hpp
setup.data
data
Definition: cmake/cython/setup.in.py:48
PINOCCHIO_COMPILER_DIAGNOSTIC_POP
#define PINOCCHIO_COMPILER_DIAGNOSTIC_POP
Definition: include/pinocchio/macros.hpp:130
pinocchio::PINOCCHIO_UNSUPPORTED_MESSAGE
struct PINOCCHIO_UNSUPPORTED_MESSAGE("The API will change towards more flexibility") ContactCholeskyDecompositionTpl
Contact Cholesky decomposition structure. This structure allows to compute in a efficient and parsimo...
Definition: algorithm/contact-cholesky.hpp:55
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
vec
vec
pinocchio::res
ReturnType res
Definition: spatial/classic-acceleration.hpp:57
pinocchio::operator*
TridiagonalSymmetricMatrixApplyOnTheLeftReturnType< LhsMatrixType, TridiagonalSymmetricMatrixTpl< S, O > > operator*(const Eigen::MatrixBase< LhsMatrixType > &lhs, const TridiagonalSymmetricMatrixTpl< S, O > &rhs)
Definition: math/tridiagonal-matrix.hpp:319
pinocchio::Index
PINOCCHIO_COMPILER_DIAGNOSTIC_POP typedef std::size_t Index
Definition: multibody/fwd.hpp:22
pinocchio::details::UvAlgo
Definition: algorithm/contact-cholesky.hpp:22
simulation-contact-dynamics.contact_datas
list contact_datas
Definition: simulation-contact-dynamics.py:60
pinocchio::DelassusCholeskyExpressionTpl::updateDamping
void updateDamping(const Scalar &mu)
Add a damping term to the diagonal of the Delassus matrix. The damping term should be positive.
Definition: algorithm/contact-cholesky.hpp:654
pinocchio::cholesky::solve
Mat & solve(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< Mat > &y)
Return the solution of using the Cholesky decomposition stored in data given the entry ....
pinocchio::details::UivAlgo
Definition: algorithm/contact-cholesky.hpp:28
details
pinocchio::DelassusCholeskyExpressionTpl::RowMatrixConstBlockXpr
SizeDepType< Eigen::Dynamic >::template BlockReturn< RowMatrix >::ConstType RowMatrixConstBlockXpr
Definition: algorithm/contact-cholesky.hpp:522
pinocchio::DelassusCholeskyExpressionTpl::Matrix
ContactCholeskyDecomposition::Matrix Matrix
Definition: algorithm/contact-cholesky.hpp:514
pinocchio::RigidConstraintModelTpl
Definition: algorithm/constraints/fwd.hpp:14
PINOCCHIO_EIGEN_MALLOC_ALLOWED
#define PINOCCHIO_EIGEN_MALLOC_ALLOWED()
Definition: eigen-macros.hpp:71
pinocchio::Dynamic
const int Dynamic
Definition: fwd.hpp:140
pinocchio::details::UtvAlgo
Definition: algorithm/contact-cholesky.hpp:25
pinocchio::DelassusCholeskyExpressionTpl::Scalar
ContactCholeskyDecomposition::Scalar Scalar
Definition: algorithm/contact-cholesky.hpp:512
mat
mat
pinocchio::RigidConstraintDataTpl
Definition: algorithm/constraints/fwd.hpp:16
D
D
pinocchio::DelassusCholeskyExpressionTpl::PINOCCHIO_EIGEN_PLAIN_TYPE
PINOCCHIO_EIGEN_PLAIN_TYPE(MatrixDerived) operator*(const Eigen
Returns the Constraint Cholesky decomposition associated to this DelassusCholeskyExpression.
Definition: algorithm/contact-cholesky.hpp:573
size
FCL_REAL size() const
PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
Definition: include/pinocchio/macros.hpp:131
x
x
pinocchio::inverse
void inverse(const Eigen::MatrixBase< MatrixIn > &m_in, const Eigen::MatrixBase< MatrixOut > &dest)
Definition: math/matrix.hpp:273
PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH
#define PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH
macros for pragma push/pop/ignore deprecated warnings
Definition: include/pinocchio/macros.hpp:129
pinocchio::cholesky::Uiv
Mat & Uiv(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< Mat > &v)
Perform the pivot inversion using the Cholesky decomposition stored in data and acting in place.
PINOCCHIO_EIGEN_MALLOC_NOT_ALLOWED
#define PINOCCHIO_EIGEN_MALLOC_NOT_ALLOWED()
Definition: eigen-macros.hpp:72
pinocchio::traits< DelassusCholeskyExpressionTpl< ContactCholeskyDecomposition > >::Vector
ContactCholeskyDecomposition::Vector Vector
Definition: algorithm/contact-cholesky.hpp:504
PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR
#define PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(T)
Definition: container/aligned-vector.hpp:13
pinocchio::operator!=
bool operator!=(const JointDataBase< JointDataDerived > &joint_data, const JointDataTpl< Scalar, Options, JointCollectionTpl > &joint_data_generic)
Definition: joint-generic.hpp:447
mu
double mu
Definition: delassus.cpp:58
pinocchio::DelassusCholeskyExpressionTpl
Definition: algorithm/contact-cholesky.hpp:41
ocp.U
U
Definition: ocp.py:80
pinocchio::DelassusCholeskyExpressionTpl::self
const ContactCholeskyDecomposition & self
Definition: algorithm/contact-cholesky.hpp:673
pinocchio::DelassusCholeskyExpressionTpl::Self
DelassusCholeskyExpressionTpl< _ContactCholeskyDecomposition > Self
Definition: algorithm/contact-cholesky.hpp:516
pinocchio::copy
void copy(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &origin, DataTpl< Scalar, Options, JointCollectionTpl > &dest, KinematicLevel kinematic_level)
Copy part of the data from origin to dest. Template parameter can be used to select at which differen...
Definition: copy.hpp:42
pinocchio::traits< DelassusCholeskyExpressionTpl< ContactCholeskyDecomposition > >::Matrix
ContactCholeskyDecomposition::Matrix Matrix
Definition: algorithm/contact-cholesky.hpp:503
pinocchio::RigidConstraintModel
RigidConstraintModelTpl< context::Scalar, context::Options > RigidConstraintModel
Definition: algorithm/fwd.hpp:24
contact-cholesky.contact_models
list contact_models
Definition: contact-cholesky.py:22
pinocchio::traits
Common traits structure to fully define base classes for CRTP.
Definition: fwd.hpp:71
pinocchio::DelassusCholeskyExpressionTpl::DelassusCholeskyExpressionTpl
DelassusCholeskyExpressionTpl(const ContactCholeskyDecomposition &self)
Definition: algorithm/contact-cholesky.hpp:529
contact-info.hpp
pinocchio::ContactCholeskyDecompositionTpl
Definition: algorithm/fwd.hpp:17
pinocchio::DelassusCholeskyExpressionTpl::rows
Eigen::DenseIndex rows() const
Definition: algorithm/contact-cholesky.hpp:663
pinocchio::ModelTpl
Definition: context/generic.hpp:20
pinocchio::DelassusCholeskyExpressionTpl::size
Eigen::DenseIndex size() const
Definition: algorithm/contact-cholesky.hpp:659
pinocchio::cholesky::Utv
Mat & Utv(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< Mat > &v)
Perform the sparse multiplication using the Cholesky decomposition stored in data and acting in plac...
pinocchio::DelassusCholeskyExpressionTpl::RowsAtCompileTime
@ RowsAtCompileTime
Definition: algorithm/contact-cholesky.hpp:526
pinocchio::cholesky::Utiv
Mat & Utiv(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< Mat > &v)
Perform the pivot inversion using the Cholesky decomposition stored in data and acting in place.
pinocchio::details::inverseAlgo
VectorLike & inverseAlgo(const ContactCholeskyDecompositionTpl< Scalar, Options > &chol, const Eigen::DenseIndex col, const Eigen::MatrixBase< VectorLike > &vec)
pinocchio::DelassusCholeskyExpressionTpl::Base
DelassusOperatorBase< Self > Base
Definition: algorithm/contact-cholesky.hpp:517
pinocchio::DelassusCholeskyExpressionTpl::applyOnTheRight
void applyOnTheRight(const Eigen::MatrixBase< MatrixIn > &x, const Eigen::MatrixBase< MatrixOut > &res) const
Definition: algorithm/contact-cholesky.hpp:536
PINOCCHIO_EIGEN_PLAIN_ROW_MAJOR_TYPE
#define PINOCCHIO_EIGEN_PLAIN_ROW_MAJOR_TYPE(D)
Similar to macro PINOCCHIO_EIGEN_PLAIN_TYPE but with guaranty to provite a row major type.
Definition: eigen-macros.hpp:23
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1082
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:28