6 #include "pinocchio/algorithm/frames-derivatives.hpp" 8 #include <boost/python/tuple.hpp> 23 Matrix6x partial_dq(Matrix6x::Zero(6,model.
nv));
24 Matrix6x partial_dv(Matrix6x::Zero(6,model.
nv));
27 partial_dq,partial_dv);
29 return bp::make_tuple(partial_dq,partial_dv);
39 Matrix6x v_partial_dq(Matrix6x::Zero(6,model.
nv));
40 Matrix6x a_partial_dq(Matrix6x::Zero(6,model.
nv));
41 Matrix6x a_partial_dv(Matrix6x::Zero(6,model.
nv));
42 Matrix6x a_partial_da(Matrix6x::Zero(6,model.
nv));
45 v_partial_dq,a_partial_dq,
46 a_partial_dv,a_partial_da);
48 return bp::make_tuple(v_partial_dq,a_partial_dq,a_partial_dv,a_partial_da);
53 using namespace Eigen;
55 bp::def(
"getFrameVelocityDerivatives",
57 bp::args(
"model",
"data",
"frame_id",
"reference_frame"),
58 "Computes the partial derivatives of the spatial velocity of a given frame with respect to\n" 59 "the joint configuration and velocity and returns them as a tuple.\n" 60 "The Jacobians can be either expressed in the LOCAL frame of the joint, in the LOCAL_WORLD_ALIGNED frame or in the WORLD coordinate frame depending on the value of reference_frame.\n" 61 "You must first call computeForwardKinematicsDerivatives before calling this function.\n\n" 63 "\tmodel: model of the kinematic tree\n" 64 "\tdata: data related to the model\n" 65 "\tframe_id: index of the frame\n" 66 "\treference_frame: reference frame in which the resulting derivatives are expressed\n");
68 bp::def(
"getFrameAccelerationDerivatives",
70 bp::args(
"model",
"data",
"frame_id",
"reference_frame"),
71 "Computes the partial derivatives of the spatial acceleration of a given frame with respect to\n" 72 "the joint configuration, velocity and acceleration and returns them as a tuple.\n" 73 "The Jacobians can be either expressed in the LOCAL frame of the joint, in the LOCAL_WORLD_ALIGNED frame or in the WORLD coordinate frame depending on the value of reference_frame.\n" 74 "You must first call computeForwardKinematicsDerivatives before calling this function.\n\n" 76 "\tmodel: model of the kinematic tree\n" 77 "\tdata: data related to the model\n" 78 "\tframe_id: index of the frame\n" 79 "\treference_frame: reference frame in which the resulting derivatives are expressed\n");
ReferenceFrame
List of Reference Frames supported by Pinocchio.
bp::tuple getFrameVelocityDerivatives_proxy(const Model &model, Data &data, const Model::FrameIndex frame_id, ReferenceFrame rf)
pinocchio::FrameIndex FrameIndex
Eigen::Matrix< double, 6, Eigen::Dynamic > Matrix6x
void exposeFramesDerivatives()
void getFrameAccelerationDerivatives(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const FrameIndex frame_id, const ReferenceFrame rf, const Eigen::MatrixBase< Matrix6xOut1 > &v_partial_dq, const Eigen::MatrixBase< Matrix6xOut2 > &a_partial_dq, const Eigen::MatrixBase< Matrix6xOut3 > &a_partial_dv, const Eigen::MatrixBase< Matrix6xOut4 > &a_partial_da)
Computes the partial derivatives of the frame acceleration quantity with respect to q...
bp::tuple getFrameAccelerationDerivatives_proxy(const Model &model, Data &data, const Model::FrameIndex frame_id, ReferenceFrame rf)
Main pinocchio namespace.
void getFrameVelocityDerivatives(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const FrameIndex frame_id, const ReferenceFrame rf, const Eigen::MatrixBase< Matrix6xOut1 > &v_partial_dq, const Eigen::MatrixBase< Matrix6xOut2 > &v_partial_dv)
Computes the partial derivatives of the frame velocity quantity with respect to q and v...
int nv
Dimension of the velocity vector space.
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > Matrix6x
The 6d jacobian type (temporary)
JointCollectionTpl & model