pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
delassus.hpp
1//
2// Copyright (c) 2020-2024 INRIA
3// Copyright (c) 2023 KU Leuven
4//
5
6#pragma once
7
8// IWYU pragma: begin_keep
9#include <cassert>
10#include <algorithm>
11#include <vector>
12#include <cstddef>
13#include <limits>
14
15#include <Eigen/Core>
16#include <boost/fusion/container/vector.hpp>
17
18#include "pinocchio/macros.hpp"
19#include "pinocchio/unsupported.hpp"
20
21#include "pinocchio/multibody.hpp"
22#include "pinocchio/multibody/joint.hpp"
23
24#include "pinocchio/math.hpp"
25
26#include "pinocchio/utils/check.hpp"
27
28#include "pinocchio/algorithm/check.hpp"
29#include "pinocchio/constraints.hpp"
30#include "pinocchio/algorithm/model.hpp"
31// IWYU pragma: end_keep
32
33namespace pinocchio
34{
35
36 template<
37 typename Scalar,
38 int Options,
39 template<typename, int> class JointCollectionTpl,
40 class Allocator>
41 PINOCCHIO_UNSUPPORTED_MESSAGE("The API will change towards more flexibility")
42 inline void initPvDelassus(
43 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
44 DataTpl<Scalar, Options, JointCollectionTpl> & data,
45 const std::vector<RigidConstraintModelTpl<Scalar, Options>, Allocator> & contact_models);
46
63 template<
64 typename Scalar,
65 int Options,
66 template<typename, int> class JointCollectionTpl,
67 typename ConfigVectorType,
68 class ModelAllocator,
69 class DataAllocator,
70 typename MatrixType>
71 PINOCCHIO_UNSUPPORTED_MESSAGE("The API will change towards more flexibility")
73 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
74 DataTpl<Scalar, Options, JointCollectionTpl> & data,
75 const Eigen::MatrixBase<ConfigVectorType> & q,
76 const std::vector<RigidConstraintModelTpl<Scalar, Options>, ModelAllocator> & contact_models,
77 std::vector<RigidConstraintDataTpl<Scalar, Options>, DataAllocator> & contact_data,
78 const Eigen::MatrixBase<MatrixType> & delassus,
79 const Scalar mu = 0);
80
102 template<
103 typename Scalar,
104 int Options,
105 template<typename, int> class JointCollectionTpl,
106 typename ConfigVectorType,
107 class ModelAllocator,
108 class DataAllocator,
109 typename MatrixType>
110 PINOCCHIO_UNSUPPORTED_MESSAGE("The API will change towards more flexibility")
112 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
113 DataTpl<Scalar, Options, JointCollectionTpl> & data,
114 const Eigen::MatrixBase<ConfigVectorType> & q,
115 const std::vector<RigidConstraintModelTpl<Scalar, Options>, ModelAllocator> & contact_models,
116 std::vector<RigidConstraintDataTpl<Scalar, Options>, DataAllocator> & contact_data,
117 const Eigen::MatrixBase<MatrixType> & damped_delassus_inverse,
118 const Scalar mu,
119 const bool scaled = false,
120 const bool Pv = true);
121
122} // namespace pinocchio
123
124// IWYU pragma: begin_exports
125#include "pinocchio/src/algorithm/delassus.hxx"
126// IWYU pragma: end_exports
Main pinocchio namespace.
Definition treeview.dox:11
void computeDampedDelassusMatrixInverse(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const std::vector< RigidConstraintModelTpl< Scalar, Options >, ModelAllocator > &contact_models, std::vector< RigidConstraintDataTpl< Scalar, Options >, DataAllocator > &contact_data, const Eigen::MatrixBase< MatrixType > &damped_delassus_inverse, const Scalar mu, const bool scaled=false, const bool Pv=true)
Computes the inverse of the Delassus matrix associated to a set of given constraints.
void computeDelassusMatrix(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const std::vector< RigidConstraintModelTpl< Scalar, Options >, ModelAllocator > &contact_models, std::vector< RigidConstraintDataTpl< Scalar, Options >, DataAllocator > &contact_data, const Eigen::MatrixBase< MatrixType > &delassus, const Scalar mu=0)
Computes the Delassus matrix associated to a set of given constraints.