pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
pv.hpp
1//
2// Copyright (c) 2023-2024 Inria
3// Copyright (c) 2023 KU Leuven
4//
5
6#pragma once
7
8// IWYU pragma: begin_keep
9#include <cassert>
10#include <cstddef>
11#include <algorithm>
12#include <vector>
13
14#include <Eigen/Core>
15#include <Eigen/Cholesky>
16#include <boost/fusion/container/vector.hpp>
17
18#include "pinocchio/macros.hpp"
19
20#include "pinocchio/spatial.hpp"
21
22#include "pinocchio/utils/check.hpp"
23
24#include "pinocchio/multibody.hpp"
25#include "pinocchio/multibody/joint.hpp"
26
27#include "pinocchio/constraints.hpp"
28#include "pinocchio/algorithm/fwd.hpp"
29#include "pinocchio/algorithm/check.hpp"
30#include "pinocchio/algorithm/aba.hpp"
31// IWYU pragma: end_keep
32
33namespace pinocchio
34{
35
49 template<
50 typename Scalar,
51 int Options,
52 template<typename, int> class JointCollectionTpl,
53 class ConstraintModel,
54 class ConstraintModelAllocator>
55 inline void initPvSolver(
56 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
57 DataTpl<Scalar, Options, JointCollectionTpl> & data,
58 const std::vector<ConstraintModel, ConstraintModelAllocator> & contact_models);
59
86 template<
87 typename Scalar,
88 int Options,
89 template<typename, int> class JointCollectionTpl,
90 typename ConfigVectorType,
91 typename TangentVectorType1,
92 typename TangentVectorType2,
93 class ConstraintModel,
94 class ConstraintModelAllocator,
95 class ConstraintData,
96 class ConstraintDataAllocator>
97 inline const typename DataTpl<Scalar, Options, JointCollectionTpl>::TangentVectorType & pv(
98 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
99 DataTpl<Scalar, Options, JointCollectionTpl> & data,
100 const Eigen::MatrixBase<ConfigVectorType> & q,
101 const Eigen::MatrixBase<TangentVectorType1> & v,
102 const Eigen::MatrixBase<TangentVectorType2> & tau,
103 const std::vector<ConstraintModel, ConstraintModelAllocator> & contact_models,
104 std::vector<ConstraintData, ConstraintDataAllocator> & contact_datas,
105 ProximalSettingsTpl<Scalar> & settings);
106
134 template<
135 typename Scalar,
136 int Options,
137 template<typename, int> class JointCollectionTpl,
138 typename ConfigVectorType,
139 typename TangentVectorType1,
140 typename TangentVectorType2,
141 class ConstraintModel,
142 class ConstraintModelAllocator,
143 class ConstraintData,
144 class ConstraintDataAllocator>
145 inline const typename DataTpl<Scalar, Options, JointCollectionTpl>::TangentVectorType &
147 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
148 DataTpl<Scalar, Options, JointCollectionTpl> & data,
149 const Eigen::MatrixBase<ConfigVectorType> & q,
150 const Eigen::MatrixBase<TangentVectorType1> & v,
151 const Eigen::MatrixBase<TangentVectorType2> & tau,
152 const std::vector<ConstraintModel, ConstraintModelAllocator> & contact_models,
153 std::vector<ConstraintData, ConstraintDataAllocator> & contact_datas,
154 ProximalSettingsTpl<Scalar> & settings);
155
156} // namespace pinocchio
157
158// IWYU pragma: begin_exports
159#include "pinocchio/src/algorithm/pv.hxx"
160// IWYU pragma: end_exports
Main pinocchio namespace.
Definition treeview.dox:11
const DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & pv(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType1 > &v, const Eigen::MatrixBase< TangentVectorType2 > &tau, const std::vector< ConstraintModel, ConstraintModelAllocator > &contact_models, std::vector< ConstraintData, ConstraintDataAllocator > &contact_datas, ProximalSettingsTpl< Scalar > &settings)
The Popov-Vereshchagin algorithm. It computes constrained forward dynamics, aka the joint acceleratio...
void initPvSolver(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const std::vector< ConstraintModel, ConstraintModelAllocator > &contact_models)
Init the data according to the contact information contained in contact_models.
const DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & constrainedABA(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType1 > &v, const Eigen::MatrixBase< TangentVectorType2 > &tau, const std::vector< ConstraintModel, ConstraintModelAllocator > &contact_models, std::vector< ConstraintData, ConstraintDataAllocator > &contact_datas, ProximalSettingsTpl< Scalar > &settings)
The constrained Articulated Body Algorithm (constrainedABA). It computes constrained forward dynamics...