Page 2 of 2

Re: Cannot find the objectiveFunction of InverseKinematics

Posted: Tue Jun 27, 2017 12:19 pm
by tkuchida
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.

Re: Cannot find the objectiveFunction of InverseKinematics

Posted: Tue Jun 27, 2017 12:37 pm
by yyuan
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

Re: Cannot find the objectiveFunction of InverseKinematics

Posted: Tue Jun 27, 2017 5:14 pm
by tkuchida
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.

Re: Cannot find the objectiveFunction of InverseKinematics

Posted: Wed Jun 28, 2017 12:12 am
by yyuan
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

Re: Cannot find the objectiveFunction of InverseKinematics

Posted: Wed Jun 28, 2017 7:33 pm
by tkuchida
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.