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.I want to add a constraint that the distance between 2 specific markers should be constant
Cannot find the objectiveFunction of InverseKinematics
- Thomas Uchida
- Posts: 1790
- Joined: Wed May 16, 2012 11:40 am
Re: Cannot find the objectiveFunction of InverseKinematics
Re: Cannot find the objectiveFunction of InverseKinematics
Hi Tom,tkuchida wrote: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.I want to add a constraint that the distance between 2 specific markers should be constant
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
- Thomas Uchida
- Posts: 1790
- Joined: Wed May 16, 2012 11:40 am
Re: Cannot find the objectiveFunction of InverseKinematics
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.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 ?
Re: Cannot find the objectiveFunction of InverseKinematics
Thank you!tkuchida wrote: compute a fictitious experimental marker that you can track during IK like any other marker
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
- Thomas Uchida
- Posts: 1790
- Joined: Wed May 16, 2012 11:40 am
Re: Cannot find the objectiveFunction of InverseKinematics
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.do you have more detailed tutorials?