8 #include "pinocchio/algorithm/model.hpp" 17 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
29 appendModel(modelA,modelB,geomModelA,geomModelB,frameInModelA,aMb,model,geom_model);
31 return bp::make_tuple(model,geom_model);
34 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl,
typename ConfigVectorType>
45 reference_configuration,reduced_model,reduced_geom_model);
47 return bp::make_tuple(reduced_model,reduced_geom_model);
51 template <
typename,
int>
class JointCollectionTpl,
52 typename ConfigVectorType>
59 std::vector<GeometryModel,Eigen::aligned_allocator<GeometryModel> > reduced_geom_models;
62 reference_configuration, reduced_model,
64 return bp::make_tuple(reduced_model, reduced_geom_models);
69 using namespace Eigen;
71 typedef std::vector<GeometryModel,Eigen::aligned_allocator<GeometryModel> > GeometryModelVector;
74 bp::def(
"appendModel",
76 bp::args(
"modelA",
"modelB",
"frame_in_modelA",
"aMb"),
77 "Append a child model into a parent model, after a specific frame given by its index.\n\n" 79 "\tmodelA: the parent model\n" 80 "\tmodelB: the child model\n" 81 "\tframeInModelA: index of the frame of modelA where to append modelB\n" 82 "\taMb: pose of modelB universe joint (index 0) in frameInModelA\n");
84 bp::def(
"appendModel",
85 &appendModel_proxy<double,0,JointCollectionDefaultTpl>,
86 bp::args(
"modelA",
"modelB",
"frame_in_modelA",
"aMb"),
87 "Append a child (geometry) model into a parent (geometry) model, after a specific frame given by its index.\n\n" 89 "\tmodelA: the parent model\n" 90 "\tmodelB: the child model\n" 91 "\tgeomModelA: the parent geometry model\n" 92 "\tgeomModelB: the child geometry model\n" 93 "\tframeInModelA: index of the frame of modelA where to append modelB\n" 94 "\taMb: pose of modelB universe joint (index 0) in frameInModelA\n");
96 bp::def(
"buildReducedModel",
97 (
Model (*)(
const Model &,
const std::vector<JointIndex> &,
const Eigen::MatrixBase<VectorXd> &))
98 &pinocchio::buildReducedModel<double,0,JointCollectionDefaultTpl,VectorXd>,
100 "list_of_joints_to_lock",
101 "reference_configuration"),
102 "Build a reduce model from a given input model and a list of joint to lock.\n\n" 104 "\tmodel: input kinematic modell to reduce\n" 105 "\tlist_of_joints_to_lock: list of joint indexes to lock\n" 106 "\treference_configuration: reference configuration to compute the placement of the lock joints\n");
108 bp::def(
"buildReducedModel",
109 (bp::tuple (*)(
const Model &,
111 const std::vector<JointIndex> &,
112 const Eigen::MatrixBase<VectorXd> &))
113 &buildReducedModel<double,0,JointCollectionDefaultTpl,VectorXd>,
116 "list_of_joints_to_lock",
117 "reference_configuration"),
118 "Build a reduced model and a reduced geometry model from a given input model," 119 "an input geometry model and a list of joints to lock.\n\n" 121 "\tmodel: input kinematic model to reduce\n" 122 "\tgeom_model: input geometry model to reduce\n" 123 "\tlist_of_joints_to_lock: list of joint indexes to lock\n" 124 "\treference_configuration: reference configuration to compute the placement of the locked joints\n");
126 bp::def(
"buildReducedModel",
127 (bp::tuple(*)(
const Model &,
128 const std::vector<
GeometryModel,Eigen::aligned_allocator<GeometryModel> > &,
129 const std::vector<JointIndex> &,
130 const Eigen::MatrixBase<VectorXd> &))
131 buildReducedModel<double, 0, JointCollectionDefaultTpl, VectorXd>,
132 bp::args(
"model",
"list_of_geom_models",
"list_of_joints_to_lock",
133 "reference_configuration"),
134 "Build a reduced model and the related reduced geometry models from a given " 136 "a list of input geometry models and a list of joints to lock.\n\n" 138 "\tmodel: input kinematic model to reduce\n" 139 "\tlist_of_geom_models: input geometry models to reduce\n" 140 "\tlist_of_joints_to_lock: list of joint indexes to lock\n" 141 "\treference_configuration: reference configuration to compute the " 142 "placement of the locked joints\n");
bp::tuple appendModel_proxy(const ModelTpl< Scalar, Options, JointCollectionTpl > &modelA, const ModelTpl< Scalar, Options, JointCollectionTpl > &modelB, const GeometryModel &geomModelA, const GeometryModel &geomModelB, const FrameIndex frameInModelA, const SE3Tpl< Scalar, Options > &aMb)
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.
static::boost::python::class_< vector_type > expose(const std::string &class_name, const std::string &doc_string="")
bp::tuple buildReducedModel(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const GeometryModel &geom_model, const std::vector< JointIndex > &list_of_joints_to_lock, const Eigen::MatrixBase< ConfigVectorType > &reference_configuration)
Main pinocchio namespace.
JointCollectionTpl & model