6 #include "pinocchio/algorithm/joint-configuration.hpp" 32 Eigen::MatrixXd J0(Eigen::MatrixXd::Zero(model.
nv,model.
nv));
33 Eigen::MatrixXd J1(Eigen::MatrixXd::Zero(model.
nv,model.
nv));
38 return bp::make_tuple(J0,J1);
46 Eigen::MatrixXd
J(Eigen::MatrixXd::Zero(model.
nv,model.
nv));
57 Eigen::MatrixXd J0(Eigen::MatrixXd::Zero(model.
nv,model.
nv));
58 Eigen::MatrixXd J1(Eigen::MatrixXd::Zero(model.
nv,model.
nv));
63 return bp::make_tuple(J0,J1);
71 Eigen::MatrixXd
J(Eigen::MatrixXd::Zero(model.
nv,model.
nv));
80 using namespace Eigen;
83 &integrate<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd>,
85 "Integrate the joint configuration vector q with a tangent vector v during one unit time.\n" 86 "This is the canonical integrator of a Configuration Space composed of Lie groups, such as most robots.\n\n" 88 "\tmodel: model of the kinematic tree\n" 89 "\tq: the joint configuration vector (size model.nq)\n" 90 "\tv: the joint velocity vector (size model.nv)\n");
95 "Computes the partial derivatives of the integrate function with respect to the first " 96 "and the second argument, and returns the two Jacobians as a tuple.\n\n" 98 "\tmodel: model of the kinematic tree\n" 99 "\tq: the joint configuration vector (size model.nq)\n" 100 "\tv: the joint velocity vector (size model.nv)\n");
102 bp::def(
"dIntegrate",
104 bp::args(
"model",
"q",
"v",
"argument_position"),
105 "Computes the partial derivatives of the integrate function with respect to the first (arg == ARG0) " 106 "or the second argument (arg == ARG1).\n\n" 108 "\tmodel: model of the kinematic tree\n" 109 "\tq: the joint configuration vector (size model.nq)\n" 110 "\tv: the joint velocity vector (size model.nv)\n" 111 "\targument_position: either pinocchio.ArgumentPosition.ARG0 or pinocchio.ArgumentPosition.ARG1, depending on the desired Jacobian value.\n");
113 bp::def(
"interpolate",
114 &interpolate<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd>,
115 bp::args(
"model",
"q1",
"q2",
"alpha"),
116 "Interpolate between two given joint configuration vectors q1 and q2.\n\n" 118 "\tmodel: model of the kinematic tree\n" 119 "\tq1: the initial joint configuration vector (size model.nq)\n" 120 "\tq2: the terminal joint configuration vector (size model.nq)\n" 121 "\talpha: the interpolation coefficient in [0,1]\n");
123 bp::def(
"difference",
124 &difference<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd>,
126 "Difference between two joint configuration vectors, i.e. the tangent vector that must be integrated during one unit time" 127 "to go from q1 to q2.\n\n" 129 "\tmodel: model of the kinematic tree\n" 130 "\tq1: the initial joint configuration vector (size model.nq)\n" 131 "\tq2: the terminal joint configuration vector (size model.nq)\n");
133 bp::def(
"squaredDistance",
134 &squaredDistance<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd>,
136 "Squared distance vector between two joint configuration vectors.\n\n" 138 "\tmodel: model of the kinematic tree\n" 139 "\tq1: the initial joint configuration vector (size model.nq)\n" 140 "\tq2: the terminal joint configuration vector (size model.nq)\n");
143 &distance<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd>,
145 "Distance between two joint configuration vectors.\n\n" 147 "\tmodel: model of the kinematic tree\n" 148 "\tq1: the initial joint configuration vector (size model.nq)\n" 149 "\tq2: the terminal joint configuration vector (size model.nq)\n");
151 bp::def(
"dDifference",
154 "Computes the partial derivatives of the difference function with respect to the first " 155 "and the second argument, and returns the two Jacobians as a tuple.\n\n" 157 "\tmodel: model of the kinematic tree\n" 158 "\tq1: the initial joint configuration vector (size model.nq)\n" 159 "\tq2: the terminal joint configuration vector (size model.nq)\n");
161 bp::def(
"dDifference",
163 bp::args(
"model",
"q1",
"q2",
"argument_position"),
164 "Computes the partial derivatives of the difference function with respect to the first (arg == ARG0) " 165 "or the second argument (arg == ARG1).\n\n" 167 "\tmodel: model of the kinematic tree\n" 168 "\tq1: the initial joint configuration vector (size model.nq)\n" 169 "\tq2: the terminal joint configuration vector (size model.nq)\n" 170 "\targument_position: either pinocchio.ArgumentPosition.ARG0 or pinocchio.ArgumentPosition.ARG1, depending on the desired Jacobian value.\n");
172 bp::def(
"randomConfiguration",
175 "Generate a random configuration in the bounds given by the lower and upper limits contained in model.\n\n" 177 "\tmodel: model of the kinematic tree\n");
179 bp::def(
"randomConfiguration",
180 &randomConfiguration<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd>,
181 bp::args(
"model",
"lower_bound",
"upper_bound"),
182 "Generate a random configuration in the bounds given by the Joint lower and upper limits arguments.\n\n" 184 "\tmodel: model of the kinematic tree\n" 185 "\tlower_bound: the lower bound on the joint configuration vectors (size model.nq)\n" 186 "\tupper_bound: the upper bound on the joint configuration vectors (size model.nq)\n");
189 &neutral<double,0,JointCollectionDefaultTpl>,
191 "Returns the neutral configuration vector associated to the model.\n\n" 193 "\tmodel: model of the kinematic tree\n");
197 "Returns the configuration normalized.\n" 198 "For instance, when the configuration vectors contains some quaternion values, it must be required to renormalize these components to keep orthonormal rotation values.\n\n" 200 "\tmodel: model of the kinematic tree\n" 201 "\tq: a joint configuration vector to normalize (size model.nq)\n");
203 bp::def(
"isSameConfiguration",
204 &isSameConfiguration<double,0,JointCollectionDefaultTpl,VectorXd,VectorXd>,
206 "Return true if two configurations are equivalent within the given precision provided by prec.\n\n" 208 "\tmodel: model of the kinematic tree\n" 209 "\tq1: a joint configuration vector (size model.nq)\n" 210 "\tq2: a joint configuration vector (size model.nq)\n" 211 "\tprec: requested accuracy for the comparison\n");
213 bp::def(
"isNormalized",
214 &isNormalized<double,0,JointCollectionDefaultTpl,VectorXd>,
215 isNormalized_overload(
217 "Check whether a configuration vector is normalized within the given precision provided by prec.\n\n" 219 "\tmodel: model of the kinematic tree\n" 220 "\tq: a joint configuration vector (size model.nq)\n" 221 "\tprec: requested accuracy for the check\n"
ArgumentPosition
Argument position. Used as template parameter to refer to an argument.
bp::tuple dDifference_proxy(const Model &model, const Eigen::VectorXd &q1, const Eigen::VectorXd &q2)
void dDifference(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVector1 > &q0, const Eigen::MatrixBase< ConfigVector2 > &q1, const Eigen::MatrixBase< JacobianMatrix > &J, const ArgumentPosition arg)
Computes the Jacobian of a small variation of the configuration vector into the tangent space at iden...
bool isNormalized(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision())
Check whether a configuration vector is normalized within the given precision provided by prec...
BOOST_PYTHON_FUNCTION_OVERLOADS(computeKKTContactDynamicMatrixInverse_overload, computeKKTContactDynamicMatrixInverse_proxy, 4, 5) static const Eigen
void randomConfiguration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &lowerLimits, const Eigen::MatrixBase< ConfigVectorIn2 > &upperLimits, const Eigen::MatrixBase< ReturnType > &qout)
Generate a configuration vector uniformly sampled among provided limits.
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
void dIntegrate(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v, const Eigen::MatrixBase< JacobianMatrixType > &J, const ArgumentPosition arg, const AssignmentOperatorType op=SETTO)
Computes the Jacobian of a small variation of the configuration vector or the tangent vector into the...
static Eigen::VectorXd randomConfiguration_proxy(const Model &model)
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > const Eigen::MatrixBase< ConfigVectorIn2 > & q1
static Eigen::VectorXd normalize_proxy(const Model &model, const Eigen::VectorXd &config)
Eigen::MatrixXd dDifference_arg_proxy(const Model &model, const Eigen::VectorXd &q1, const Eigen::VectorXd &q2, const ArgumentPosition arg)
Main pinocchio namespace.
int nv
Dimension of the velocity vector space.
bp::tuple dIntegrate_proxy(const Model &model, const Eigen::VectorXd &q, const Eigen::VectorXd &v)
void normalize(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &qout)
Normalize a configuration vector.
Eigen::MatrixXd dIntegrate_arg_proxy(const Model &model, const Eigen::VectorXd &q, const Eigen::VectorXd &v, const ArgumentPosition arg)
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorXd
JointCollectionTpl & model