Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KinDynComputations::inverseDynamics segfaults on inputs with wrong shape #1118

Open
traversaro opened this issue Sep 28, 2023 · 2 comments
Open

Comments

@traversaro
Copy link
Member

@fils99 was affected by this.

@traversaro
Copy link
Member Author

traversaro commented Sep 28, 2023

He was using code like:

baseForceAndJointTorques = iDynTree.FreeFloatingGeneralizedTorques()
    # baseForceAndJointTorques = iDynTree.MatrixDynSize(6+dofs, 1);
    ok = dynComp.inverseDynamics(baseAcc, accelerations_joints[:, time_instant], linkExtForces, baseForceAndJointTorques);

@fils99
Copy link

fils99 commented Sep 28, 2023

My error was due to the fact I was using iDynTree.FreeFloatingGeneralizedTorques() and iDynTree.LinkWrenches() without giving them the model I was using.
The correct use of these classes is:

baseForceAndJointTorques = iDynTree.FreeFloatingGeneralizedTorques(dynComp.model())
linkExtForces = iDynTree.LinkWrenches(dynComp.model())

Thanks for the help, @traversaro !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants