idyntree icon indicating copy to clipboard operation
idyntree copied to clipboard

Update SWIG used to generate the Matlab bindings to SWIG 4

Open traversaro opened this issue 5 years ago • 3 comments

We have been using our own fork of SWIG to generate the MATLAB bindings from https://github.com/robotology-dependencies/swig for some time, but now upstream SWIG has been updated, and it would be great to use a SWIG fork with MATLAB support based on SWIG 4.

The fork at https://github.com/Alzathar/swig seems to be a good candidate (see the related PR: https://github.com/swig/swig/pull/1519), as it is based on SWIG 4 and it seems to do not include the PR https://github.com/jaeandersson/swig/pull/92 that created problems to us in the past.

Looking at the commit that we have in https://github.com/robotology-dependencies/swig, we should check if the fix https://github.com/robotology-dependencies/swig/pull/2 need to be ported on the top of the new SWIG 4 with MATLAB support, or it is not necessary anymore. Probably running the iDynTree testsuite is sufficient.

traversaro avatar May 01 '20 10:05 traversaro

cc @gabrielenava @fjandrad @nunoguedelha

traversaro avatar May 01 '20 10:05 traversaro

Actually now a good candidate seems https://github.com/KrisThielemans/swig/commit/f606f5323191f703ceec90d5a363c8526ae51493, from https://github.com/jaeandersson/swig/pull/96 .

This should permit use to use the std::shared_ptr support without excluding it in MATLAB, see https://github.com/robotology/idyntree/pull/1037 .

traversaro avatar Dec 13 '22 11:12 traversaro

Actually now a good candidate seems KrisThielemans/swig@f606f53, from jaeandersson/swig#96 .

This should permit use to use the std::shared_ptr support without excluding it in MATLAB, see #1037 .

Actually this is not true, as the shared_ptr support is missing in the matlab directory even in that commit.

traversaro avatar Dec 13 '22 11:12 traversaro