robotology / idyntree

Multibody Dynamics Library designed for Free Floating Robots
BSD 3-Clause "New" or "Revised" License
172 stars 67 forks source link

Ensure ExtWrenchesAndJointTorquesEstimator::computeSubModelMatrixRelatingFTSensorsMeasuresAndKinematics can be called by bindings #1102

Closed traversaro closed 1 year ago

traversaro commented 1 year ago

See https://github.com/robotology/idyntree/pull/1091#issuecomment-1702355239 . I am afraid that to do so, probably we need to add in https://github.com/robotology/idyntree/blob/244e5357f9d5c50e23be974462aacd0a24997253/bindings/iDynTree.i#L19 also the following lines:

// Wrap the std::vector<iDynTree::MatrixDynSize> arguments
%template(MatrixDynSizeVector) std::vector<iDynTree::MatrixDynSize>;

// Wrap the std::vector<iDynTree::VectorDynSize> arguments
%template(VectorDynSizeVector) std::vector<iDynTree::VectorDynSize>;

// Wrap the std::vector<size_t> arguments
%template(SizeVector) std::vector<size_t>;

// Wrap the std::vector<iDynTree::LinkIndex>, std::vector<iDynTree::JointIndex>
// as all indexes are typedef to std::ptrdiff_t
%template(IndexVector) std::vector<[size_t](std::ptrdiff_t)>;

Actually we could think of changing std::vector<size_t>& subModelID (https://github.com/robotology/idyntree/blob/31e9840f7840e28bf35409549ca4c94dcd9aa7f8/src/estimation/include/iDynTree/Estimation/ExtWrenchesAndJointTorquesEstimator.h#L299) to std::vector& subModelID` for consistencies with other indeces arguments.

traversaro commented 1 year ago

cc @HosameldinMohamed

traversaro commented 1 year ago

See also https://github.com/robotology/idyntree/blob/master/doc/generating-idyntree-matlab-bindings.md .