IK with weld constraints

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Pagnon David
Posts: 86
Joined: Mon Jan 06, 2014 3:13 am

IK with weld constraints

Post by Pagnon David » Tue Aug 02, 2022 9:43 pm

Dear all,

My problem is very similar to this issue, which hasn't been answered.

I am trying to perform inverse kinematics on a model that fuses a human being and his bike. This person is standing out of the saddle, however hands and feet are in contact with the bike. In order to avoid creating a closed loop, I duplicated hands and toes: one pair for the human being, the other for the bike (see picture). I created weld constraints between both pairs of hands and toes.

But IK is not working. I get this error:
Model unable to assemble: AssemblySolver::assemble() Failed: SimTK Exception thrown at Assembler.cpp:897:
Method Assembler::assemble() failed because:
Unable to achieve required assembly error tolerance.
Assembly error tolerance achieved: 8.3346833096719795e-09 required: 1e-10..Model relaxing constraints and trying again.
InverseKinematicsTool Failed: AssemblySolver::assemble() Failed: SimTK Exception thrown at Assembler.cpp:871:
Method Assembler::assemble() failed because:
Optimizer failed with message: SimTK Exception thrown at InteriorPointOptimizer.cpp:264:
Optimizer failed: Ipopt: Maximum iterations exceeded (status -1)
Assembly error tolerance achieved: 0.0011975930815799982 required: 1.0000000000000002e-06.
What am I doing wrong?

Image
  • When I deactivate the constraints, IK works fine (although this defeats the purpose). I'm pretty sure I scaled it right since in this case, model markers follow experimental ones closely.
  • I tried to unlock or unclamp more joint coordinates, which does not make a difference (if anything, it seems like it makes it worse.)
  • Also tried attributing less weight to the worst markers, without success.
Thanks!

Tags:

User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: IK with weld constraints

Post by Thomas Uchida » Wed Aug 03, 2022 6:22 am

The error message is informing you that the constraints you have specified could not be satisfied to the necessary tolerance. Because OpenSim models have fewer degrees of freedom than the human body, it is easy to define a set of constraints that seems very reasonable but is not easy for the skeleton (rigid-body mechanism) to satisfy. If it's appropriate for the movement you are simulating, you might consider allowing the toes and/or hands to rotate relative to the pedals (see PointConstraint, https://simtk.org/api_docs/opensim/api_ ... ml#details). Alternatively, you could attach the toes and/or hands to the bike via BushingForces (https://simtk.org/api_docs/opensim/api_ ... ml#details).

User avatar
Pagnon David
Posts: 86
Joined: Mon Jan 06, 2014 3:13 am

Re: IK with weld constraints

Post by Pagnon David » Wed Aug 03, 2022 9:55 am

Thank you, this is helpful!
I'll try it and get back to you as soon as possible (possibly not before next week, though)

POST REPLY