How to add weights to the coordinates of a model using C++ API
Posted: Thu Sep 03, 2020 7:20 am
Hi,
I am using the C++ API to build and solve a model.
I would like to assign weights to the coordinates of my model.
I saw that it is possible when I look at the detailed description section of the InverseKinematicsSolver class (https://simtk.org/api_docs/opensim/api_ ... olver.html). I can see W_qj which contains the weights for the coordinates.
Unfortunately, I did not find a proper way to do it as compared with marker weights (there is a method to update the marker weights in the InverseKinematicsSolver class).
I found that one can create a CoordinateReference and set weights to it and include it as a third input argument of the InverseKinematicsSolver class (https://simtk.org/api_docs/opensim/api_ ... rence.html). However, one has to specify a Function for the desired value of this CoordinateReference which is not what I want because I do not know what the value should be (this is what I am trying to find actually by using the InverseKinematicsSolver class).
So I am a bit confused and any help to clarify how i can set weights to the coordinates of my model will be appreciated.
Thank you
Vincent
I am using the C++ API to build and solve a model.
I would like to assign weights to the coordinates of my model.
I saw that it is possible when I look at the detailed description section of the InverseKinematicsSolver class (https://simtk.org/api_docs/opensim/api_ ... olver.html). I can see W_qj which contains the weights for the coordinates.
Unfortunately, I did not find a proper way to do it as compared with marker weights (there is a method to update the marker weights in the InverseKinematicsSolver class).
I found that one can create a CoordinateReference and set weights to it and include it as a third input argument of the InverseKinematicsSolver class (https://simtk.org/api_docs/opensim/api_ ... rence.html). However, one has to specify a Function for the desired value of this CoordinateReference which is not what I want because I do not know what the value should be (this is what I am trying to find actually by using the InverseKinematicsSolver class).
So I am a bit confused and any help to clarify how i can set weights to the coordinates of my model will be appreciated.
Thank you
Vincent