algorithm/model.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_algorithm_model_hpp__
6 #define __pinocchio_algorithm_model_hpp__
7 
10 
11 namespace pinocchio
12 {
27  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
28  void appendModel(
29  const ModelTpl<Scalar, Options, JointCollectionTpl> & modelA,
30  const ModelTpl<Scalar, Options, JointCollectionTpl> & modelB,
31  const FrameIndex frameInModelA,
32  const SE3Tpl<Scalar, Options> & aMb,
33  ModelTpl<Scalar, Options, JointCollectionTpl> & model);
34 
50  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
54  const FrameIndex frameInModelA,
55  const SE3Tpl<Scalar, Options> & aMb)
56  {
58  Model model;
59 
60  appendModel(modelA, modelB, frameInModelA, aMb, model);
61 
62  return model;
63  }
64 
77  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
78  void appendModel(
79  const ModelTpl<Scalar, Options, JointCollectionTpl> & modelA,
80  const ModelTpl<Scalar, Options, JointCollectionTpl> & modelB,
81  const GeometryModel & geomModelA,
82  const GeometryModel & geomModelB,
83  const FrameIndex frameInModelA,
84  const SE3Tpl<Scalar, Options> & aMb,
85  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
86  GeometryModel & geomModel);
87 
104  template<
105  typename Scalar,
106  int Options,
107  template<typename, int>
108  class JointCollectionTpl,
109  typename ConfigVectorType>
110  void buildReducedModel(
111  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
112  std::vector<JointIndex> list_of_joints_to_lock,
113  const Eigen::MatrixBase<ConfigVectorType> & reference_configuration,
114  ModelTpl<Scalar, Options, JointCollectionTpl> & reduced_model);
115 
130  template<
131  typename Scalar,
132  int Options,
133  template<typename, int>
134  class JointCollectionTpl,
135  typename ConfigVectorType>
138  const std::vector<JointIndex> & list_of_joints_to_lock,
139  const Eigen::MatrixBase<ConfigVectorType> & reference_configuration)
140  {
142  Model reduced_model;
143 
145 
146  return reduced_model;
147  }
148 
165  template<
166  typename Scalar,
167  int Options,
168  template<typename, int>
169  class JointCollectionTpl,
170  typename ConfigVectorType>
171  void buildReducedModel(
172  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
173  const GeometryModel & geom_model,
174  const std::vector<JointIndex> & list_of_joints_to_lock,
175  const Eigen::MatrixBase<ConfigVectorType> & reference_configuration,
176  ModelTpl<Scalar, Options, JointCollectionTpl> & reduced_model,
177  GeometryModel & reduced_geom_model);
178 
195  template<
196  typename Scalar,
197  int Options,
198  template<typename, int>
199  class JointCollectionTpl,
200  typename GeometryModelAllocator,
201  typename ConfigVectorType>
202  void buildReducedModel(
203  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
204  const std::vector<GeometryModel, GeometryModelAllocator> & list_of_geom_models,
205  const std::vector<JointIndex> & list_of_joints_to_lock,
206  const Eigen::MatrixBase<ConfigVectorType> & reference_configuration,
207  ModelTpl<Scalar, Options, JointCollectionTpl> & reduced_model,
208  std::vector<GeometryModel, GeometryModelAllocator> & list_of_reduced_geom_models);
209 
221  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
223  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
226  size_t & index_ancestor_in_support1,
227  size_t & index_ancestor_in_support2);
228 
229 } // namespace pinocchio
230 
231 #include "pinocchio/algorithm/model.hxx"
232 
233 #if PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
234  #include "pinocchio/algorithm/model.txx"
235 #endif // PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
236 
237 #endif // ifndef __pinocchio_algorithm_model_hpp__
pinocchio::FrameIndex
Index FrameIndex
Definition: multibody/fwd.hpp:28
pinocchio::Options
Options
Definition: joint-configuration.hpp:1116
pinocchio::SE3Tpl< Scalar, Options >
model.hpp
build-reduced-model.list_of_joints_to_lock
list_of_joints_to_lock
Definition: build-reduced-model.py:59
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::buildReducedModel
void buildReducedModel(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, std::vector< JointIndex > list_of_joints_to_lock, const Eigen::MatrixBase< ConfigVectorType > &reference_configuration, ModelTpl< Scalar, Options, JointCollectionTpl > &reduced_model)
Build a reduced model from a given input model and a list of joint to lock.
pinocchio::appendModel
void appendModel(const ModelTpl< Scalar, Options, JointCollectionTpl > &modelA, const ModelTpl< Scalar, Options, JointCollectionTpl > &modelB, const FrameIndex frameInModelA, const SE3Tpl< Scalar, Options > &aMb, ModelTpl< Scalar, Options, JointCollectionTpl > &model)
Append a child model into a parent model, after a specific frame given by its index.
pinocchio::findCommonAncestor
JointIndex findCommonAncestor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, JointIndex joint1_id, JointIndex joint2_id, size_t &index_ancestor_in_support1, size_t &index_ancestor_in_support2)
Computes the common ancestor between two joints belonging to the same kinematic tree.
geometry.hpp
append-urdf-model-with-another-model.geom_model
geom_model
Definition: append-urdf-model-with-another-model.py:26
simulation-closed-kinematic-chains.joint1_id
joint1_id
Definition: simulation-closed-kinematic-chains.py:56
simulation-closed-kinematic-chains.joint2_id
joint2_id
Definition: simulation-closed-kinematic-chains.py:66
build-reduced-model.reference_configuration
reference_configuration
Definition: build-reduced-model.py:60
pinocchio::JointIndex
Index JointIndex
Definition: multibody/fwd.hpp:26
pinocchio::ModelTpl
Definition: context/generic.hpp:20
pinocchio::Model
ModelTpl< context::Scalar, context::Options > Model
Definition: multibody/fwd.hpp:33
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1116
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27
build-reduced-model.list_of_geom_models
list_of_geom_models
Definition: build-reduced-model.py:58


pinocchio
Author(s):
autogenerated on Sat Jun 22 2024 02:41:49