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 {
23  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
24  void
25  appendModel(const ModelTpl<Scalar,Options,JointCollectionTpl> & modelA,
26  const ModelTpl<Scalar,Options,JointCollectionTpl> & modelB,
27  const FrameIndex frameInModelA,
28  const SE3Tpl<Scalar,Options> & aMb,
29  ModelTpl<Scalar,Options,JointCollectionTpl> & model);
30 
42  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
43  ModelTpl<Scalar,Options,JointCollectionTpl>
46  const FrameIndex frameInModelA,
47  const SE3Tpl<Scalar,Options> & aMb)
48  {
50  Model model;
51 
52  appendModel(modelA,modelB,frameInModelA,aMb,model);
53 
54  return model;
55  }
56 
64  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
65  void
66  appendModel(const ModelTpl<Scalar,Options,JointCollectionTpl> & modelA,
67  const ModelTpl<Scalar,Options,JointCollectionTpl> & modelB,
68  const GeometryModel & geomModelA,
69  const GeometryModel & geomModelB,
70  const FrameIndex frameInModelA,
71  const SE3Tpl<Scalar,Options> & aMb,
72  ModelTpl<Scalar,Options,JointCollectionTpl> & model,
73  GeometryModel & geomModel);
74 
90  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
91  void
92  buildReducedModel(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
93  std::vector<JointIndex> list_of_joints_to_lock,
94  const Eigen::MatrixBase<ConfigVectorType> & reference_configuration,
95  ModelTpl<Scalar,Options,JointCollectionTpl> & reduced_model);
96 
110  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
111  ModelTpl<Scalar,Options,JointCollectionTpl>
113  const std::vector<JointIndex> & list_of_joints_to_lock,
114  const Eigen::MatrixBase<ConfigVectorType> & reference_configuration)
115  {
117  Model reduced_model;
118 
120 
121  return reduced_model;
122  }
123 
138  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
139  void
140  buildReducedModel(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
141  const GeometryModel & geom_model,
142  const std::vector<JointIndex> & list_of_joints_to_lock,
143  const Eigen::MatrixBase<ConfigVectorType> & reference_configuration,
144  ModelTpl<Scalar,Options,JointCollectionTpl> & reduced_model,
145  GeometryModel & reduced_geom_model);
146 
161  template <typename Scalar, int Options,
162  template <typename, int> class JointCollectionTpl,
163  typename GeometryModelAllocator,
164  typename ConfigVectorType>
165  void buildReducedModel(
166  const ModelTpl<Scalar, Options, JointCollectionTpl> &model,
167  const std::vector<GeometryModel,GeometryModelAllocator> &list_of_geom_models,
168  const std::vector<JointIndex> &list_of_joints_to_lock,
169  const Eigen::MatrixBase<ConfigVectorType> &reference_configuration,
170  ModelTpl<Scalar, Options, JointCollectionTpl> &reduced_model,
171  std::vector<GeometryModel,GeometryModelAllocator> &list_of_reduced_geom_models);
172 
173 } // namespace pinocchio
174 
175 #include "pinocchio/algorithm/model.hxx"
176 
177 #endif // ifndef __pinocchio_algorithm_model_hpp__
pinocchio::FrameIndex
Index FrameIndex
Definition: multibody/fwd.hpp:30
pinocchio::Options
Options
Definition: joint-configuration.hpp:746
pinocchio::SE3Tpl< Scalar, Options >
model.hpp
build-reduced-model.list_of_joints_to_lock
list_of_joints_to_lock
Definition: build-reduced-model.py:50
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::python::Scalar
SE3::Scalar Scalar
Definition: conversions.cpp:15
geometry.hpp
append-urdf-model-with-another-model.geom_model
geom_model
Definition: append-urdf-model-with-another-model.py:25
pinocchio::Model
ModelTpl< double > Model
Definition: multibody/fwd.hpp:35
build-reduced-model.reference_configuration
reference_configuration
Definition: build-reduced-model.py:51
pinocchio::ModelTpl< Scalar, Options, JointCollectionTpl >
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:746
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:28
build-reduced-model.list_of_geom_models
list_of_geom_models
Definition: build-reduced-model.py:49


pinocchio
Author(s):
autogenerated on Tue Feb 13 2024 03:43:59