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
Pose estimation for a closed model
- Yusuke Okita
- Posts: 44
- Joined: Sun Nov 21, 2010 11:25 pm
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: Pose estimation for a closed model
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.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?
- Yusuke Okita
- Posts: 44
- Joined: Sun Nov 21, 2010 11:25 pm
Re: Pose estimation for a closed model
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