You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good point. This is a nasty effect of the fact that .FromPython method is a function that returns a new instance of the type, instead of populating the instance on which it is called (as .fromMatlab does). I am not sure why this happened back in time, but the quickest solution for your use case is to add a FromMatlab overload for JointPosDoubleArray, as done for example in #959 for iDynTree::Position.
An alternative may be to define a .FromPythonInPlace method for iDynTree::VectorDynSize (better name suggestions are welcome) that populate the existing vector instead of returning a new one (a bit like .fromMatlab do), and then use this new method in JointPosDoubleArray.
Here an example. If I run this code:
x_idyn
becomes aVectorDynSize
object. Maybe, this happens because theFromPython
function that is actually called is the one defined inidyntree/bindings/python/python.i
Line 184 in 163cff7
The text was updated successfully, but these errors were encountered: