5 #ifndef __pinocchio_algorithm_model_hpp__
6 #define __pinocchio_algorithm_model_hpp__
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/geometry.hpp"
27 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
31 const FrameIndex frameInModelA,
50 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
54 const FrameIndex frameInModelA,
60 appendModel(modelA, modelB, frameInModelA, aMb, model);
77 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
83 const FrameIndex frameInModelA,
107 template<
typename,
int>
class JointCollectionTpl,
108 typename ConfigVectorType>
111 std::vector<JointIndex> list_of_joints_to_lock,
112 const Eigen::MatrixBase<ConfigVectorType> & reference_configuration,
132 template<
typename,
int>
class JointCollectionTpl,
133 typename ConfigVectorType>
136 const std::vector<JointIndex> & list_of_joints_to_lock,
137 const Eigen::MatrixBase<ConfigVectorType> & reference_configuration)
142 buildReducedModel(model, list_of_joints_to_lock, reference_configuration, reduced_model);
144 return reduced_model;
166 template<
typename,
int>
class JointCollectionTpl,
167 typename ConfigVectorType>
171 const std::vector<JointIndex> & list_of_joints_to_lock,
172 const Eigen::MatrixBase<ConfigVectorType> & reference_configuration,
195 template<
typename,
int>
class JointCollectionTpl,
196 typename GeometryModelAllocator,
197 typename ConfigVectorType>
200 const std::vector<GeometryModel, GeometryModelAllocator> & list_of_geom_models,
201 const std::vector<JointIndex> & list_of_joints_to_lock,
202 const Eigen::MatrixBase<ConfigVectorType> & reference_configuration,
204 std::vector<GeometryModel, GeometryModelAllocator> & list_of_reduced_geom_models);
217 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
220 JointIndex joint1_id,
221 JointIndex joint2_id,
222 size_t & index_ancestor_in_support1,
223 size_t & index_ancestor_in_support2);
227 #include "pinocchio/algorithm/model.hxx"
229 #if PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
230 #include "pinocchio/algorithm/model.txx"
Main pinocchio namespace.
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.
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.
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.