Page 1 of 1

Inverse Kinematics Time Range Problem

Posted: Mon Nov 25, 2019 5:55 pm
by oroud
So I am trying to run inverse kinematics and when I put in any time range (0 to 1.5), (0.0083 to 7.666) etc, it won't register that there is a final time and then fails since the final time (0) is before the start time. Even when I edited it in the text editor and wrote: <time_range> 0.008333 12.333333</time_range>, then loaded it into the IK tool it showed the final time was 0.

Re: Inverse Kinematics Time Range Problem

Posted: Mon Nov 25, 2019 6:09 pm
by tkuchida
When you select a TRC file in the "Marker data for trial" box, the "Time range" boxes are automatically populated to reflect the entire time range in the file. What values are automatically populated when you load your TRC file?

Re: Inverse Kinematics Time Range Problem

Posted: Tue Mar 23, 2021 5:10 am
by pwesberg
Hello,

I got a similar problem running opensim via python wrapping:

Code: Select all

Loaded model --model_name-- from file --path--
Running tool .
InverseKinematicsTool Failed: SimTK Exception thrown at InverseKinematicsTool.cpp:328:
  Internal bug detected: InverseKinematicsTool final time (-0.000000) is before start time (1616498308.775000).
  (Assertion 'final_time >= start_time' failed).
In the TRC file there is the time range from 1616498308.775 to 1616498309.947 with a 30 fps.
Maybe Simbody cant handle the EPOCH time in seconds? But in the opensim GUI it works.

When I open the exactly same model, IK_settings and TRC file in the opensim GUI there is no such problem running the IK tool. So my guess is a different in the opensim or simbody version.

opensim GUI 4.2 -> working

opensim core build with
- opensim 4.1 (commit 20d53d6c1145024d100af15acfd8609ee35a5b6a)
- simbody latest (commit 9daf0d26ea22551a5d10114bffd9b02fa51c53bc)

Would be nice to get some ideas. I could use other time, but than i have to store the timestamp somewhere to use it for later analysis.

kind regard,
Philippe

Re: Inverse Kinematics Time Range Problem

Posted: Tue Mar 23, 2021 7:04 am
by pwesberg
I just tried to use the last timestamp to set the end time in the ik tool instance

Code: Select all

ik_tool = osim.InverseKinematicsTool(path_to_ik_settings_xml)
ik_tool.setEndTime(time_final)
Unfortuanetely, when debugging my project with vscode it just aborts without any error after the setEndTime().