Page 1 of 1

Pose estimation for a closed model

Posted: Thu Jun 21, 2018 7:48 pm
by okvsh
Hi,

For my self-learning, I am trying to perform forward kinematic analysis using a simple cycling model recently uploaded on the web.
My first goal is to get the trajectries of hip and knee angles during a pedaling cycle (0 to360 degrees) by scripting (with GUI or MATLAB). The system has more than 2 DoFs, but it is fine so far.

When I set the value of the crank arm angle at 10 degrees, the angle was not set at 10 but slightly different value (e.g., 9.3, 9.5).
I verified that using GUI scripting and MATLAB.
The crank arm angle can be set at 10 degrees after running the command 4-5 times.
(e.g., 9.3 -> 9.6 -> 9.9 -> 10.0)

My questions are:

1. I was wondering why this improvement by iteration could happen because I thought that the model pose is determined by a least squres method like that used for IK. Is it a matter of initial conditions?

2. Regarding pose estimation error, I would like to know if there is a command to get the assembly error value for the current states.

Kind regards,
Yusuke

Re: Pose estimation for a closed model

Posted: Fri Jun 22, 2018 12:26 am
by tkuchida
I was wondering why this improvement by iteration could happen because I thought that the model pose is determined by a least squres method like that used for IK. Is it a matter of initial conditions?
I suspect that your model forms a kinematic loop and thus the coordinates are not all independent. If you specify a crank angle of 10 degrees, the assembler will project the coordinates onto the constraint manifold---that is, it will adjust the coordinates (including the crank angle) so that the mechanism satisfies the loop-closure constraints. Specifying a crank angle of 10 degrees a second time will result in a different projection because the starting pose is different. If you are using the Coordinate::setValue() method, you could try specifying false for the third argument, which should prevent the projection (until you have set all the coordinates, for example). See https://simtk.org/api_docs/opensim/api_ ... 0004213229.

Re: Pose estimation for a closed model

Posted: Tue Jun 26, 2018 10:18 pm
by okvsh
Yes, the coordinates are dependent in my model. I could verify the crank angle was set to the specified one by adding the third argument of Coordinate::setValue() method as you adviced, though I should keep an eye on other coordinates. Your advice gave me a better understanding of the assembler. Thank you. Yusuke