Cannot find the objectiveFunction of InverseKinematics

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Thomas Uchida
Posts: 1777
Joined: Wed May 16, 2012 11:40 am

Re: Cannot find the objectiveFunction of InverseKinematics

Post by Thomas Uchida » Tue Jun 27, 2017 12:19 pm

I want to add a constraint that the distance between 2 specific markers should be constant
You can add a ConstantDistanceConstraint (https://simtk.org/api_docs/opensim/api_ ... raint.html) to the model. The constraint will maintain a constant distance between a point fixed on one body and a point fixed on a second body.

User avatar
YUAN Ye
Posts: 17
Joined: Wed Jan 25, 2017 9:19 am

Re: Cannot find the objectiveFunction of InverseKinematics

Post by YUAN Ye » Tue Jun 27, 2017 12:37 pm

tkuchida wrote:
I want to add a constraint that the distance between 2 specific markers should be constant
You can add a ConstantDistanceConstraint (https://simtk.org/api_docs/opensim/api_ ... raint.html) to the model. The constraint will maintain a constant distance between a point fixed on one body and a point fixed on a second body.
Hi Tom,

Thank you for your answer, in fact I need to ensure that while doing a normal inverse kinematics, the distance between these 2 markers should be as small as possible, but not necessarily constant. Is there any functions for this ?

Ye YUAN

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

Re: Cannot find the objectiveFunction of InverseKinematics

Post by Thomas Uchida » Tue Jun 27, 2017 5:14 pm

in fact I need to ensure that while doing a normal inverse kinematics, the distance between these 2 markers should be as small as possible, but not necessarily constant. Is there any functions for this ?
It isn't clear what you're trying to accomplish. Depending on the details of your situation, you might be able to compute a fictitious experimental marker that you can track during IK like any other marker. Another possibility is that you have degrees of freedom that cannot be tracked during IK (e.g., because you don't have any experimental data for these body segments). If so, you could lock these coordinates, perform IK, then run a forward dynamic simulation where you (1) prescribe the coordinates that were unlocked during IK, (2) unlock the "extra" coordinates, and (3) attach springs between the points you want to be close.

User avatar
YUAN Ye
Posts: 17
Joined: Wed Jan 25, 2017 9:19 am

Re: Cannot find the objectiveFunction of InverseKinematics

Post by YUAN Ye » Wed Jun 28, 2017 12:12 am

tkuchida wrote: compute a fictitious experimental marker that you can track during IK like any other marker
Thank you!

I think this is what I'm trying to do, but for the moment being, whatever constraints I give to these fictitious experimental markers does not change the result of inverse kinematics, do you have more detailed tutorials?

Ye YUAN

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

Re: Cannot find the objectiveFunction of InverseKinematics

Post by Thomas Uchida » Wed Jun 28, 2017 7:33 pm

do you have more detailed tutorials?
You can find examples in the Models directory of your OpenSim installation. The Inverse Kinematics Tool is described in the Confluence documentation (http://simtk-confluence.stanford.edu:80 ... Kinematics). There are examples and tutorials here: http://simtk-confluence.stanford.edu:80 ... +Tutorials (see, for example, "Tutorial 3 - Scaling, Inverse Kinematics, and Inverse Dynamics"). You might also consider using a very simple model to get a better feel for the algorithm before proceeding with a more complicated model.

POST REPLY