Seeking help for processing error

Upload mocap files and get an optimally scaled OpenSim model and IK back in minutes. Share your data with the community. Browse and download biomechanics data. Hosted by Stanford University.

Available at https://addbiomechanics.org
POST REPLY
User avatar
Wenye He
Posts: 5
Joined: Mon Oct 16, 2017 7:46 pm

Seeking help for processing error

Post by Wenye He » Fri Feb 23, 2024 1:07 pm

Hello,
I am running the demo in https://github.com/MarilynKeller/SMPL2AddBiomechanics.
It contains a step to process in AddBiomechanics
I encounter the following error.

Code: Select all

ERROR: Unwrapped joint pose is out of bounds at timestep 1214 of 2000. This means that we are trying to lowpass filter a joint angle that has wrapped around (for example, from 2PI back to 0, or from PI to -PI), and in "unwrapping" the joint angle to be continuous with the previous angle has caused it to go past the bound. Error joints are ['pelvis_tilt']
Writing OpenSim results
Writing the OpenSim result files...
Adjusting marker locations on scaled OpenSim file
Scaling OpenSim files: cd /tmp/tmpm8j60d9t/ && opensim-cmd run-tool /tmp/tmpm8j60d9t/rescaling_setup.xml
[info] Preparing to run ScaleTool.
[info] Processing subject optimized_scale_and_markers...
[info] Step 1: Loading generic model
[info] Updating Model file from 40000 to latest format...
[info] Loaded model FullBodyModel_MuscleActuatedLowerLimb_TorqueActuatedUpperBody from file /tmp/tmpm8j60d9t/unscaled_but_with_optimized_markers.osim
[warning] Couldn't find file 'sacrum.vtp'.
[warning] Couldn't find file 'r_femur.vtp'.
[warning] Couldn't find file 'r_fibula.vtp'.
[warning] Couldn't find file 'r_patella.vtp'.
[warning] Couldn't find file 'r_talus.vtp'.
[warning] Couldn't find file 'r_foot.vtp'.
[warning] Couldn't find file 'r_bofoot.vtp'.
[warning] Couldn't find file 'l_femur.vtp'.
[warning] Couldn't find file 'l_fibula.vtp'.
[warning] Couldn't find file 'l_patella.vtp'.
[warning] Couldn't find file 'l_talus.vtp'.
[warning] Couldn't find file 'l_foot.vtp'.
[warning] Couldn't find file 'l_bofoot.vtp'.
[warning] Couldn't find file 'cervical_spine.vtp'.
[warning] Couldn't find file 'lumbar_spine.vtp'.
[warning] Couldn't find file 'thorax.vtp'.
[warning] Couldn't find file 'scapula.vtp'.
[warning] Couldn't find file 'scapula_l.vtp'.
[warning] Couldn't find file 'humerus.vtp'.
[warning] Couldn't find file 'humerus_l.vtp'.
[warning] Couldn't find file 'ulna.vtp'.
[warning] Couldn't find file 'ulna_l.vtp'.
[warning] Couldn't find file 'radius.vtp'.
[warning] Couldn't find file 'radius_l.vtp'.
[warning] Couldn't find file 'lunate.vtp'.
[warning] Couldn't find file 'lunate.vtp'.
[warning] Couldn't find file 'lunate_l.vtp'.
[error] Failed to connect Socket 'parent_frame' of type PhysicalFrame (details: Component 'BLTI' could not find 'tibia_l' of type PhysicalFrame. Make sure a component exists at this path and that it is of the correct type.
	Thrown at Component.h:770 in getComponent().).
	In Object 'BLTI' of type Marker.
	Thrown at Component.cpp:310 in finalizeConnections().
[error] Unable to load the generic model or marker set file.
[error] ScaleTool: No model specified.
[error] ScaleTool: No model specified.
Traceback (most recent call last):
  File "/app/src/../../engine/src/engine.py", line 105, in <module>
    main()
  File "/app/src/../../engine/src/engine.py", line 84, in main
    subject.write_opensim_results(path + output_name,
  File "/engine/src/subject.py", line 1017, in write_opensim_results
    self.scale_osim(
  File "/engine/src/subject.py", line 978, in scale_osim
    shutil.copyfile(tmpdirname + 'optimized_scale_and_markers.osim',
  File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpm8j60d9t/optimized_scale_and_markers.osim'
exit: 1
I want to upload the files, but they are too large to attached...

User avatar
Nicholas Bianco
Posts: 1041
Joined: Thu Oct 04, 2012 8:09 pm

Re: Seeking help for processing error

Post by Nicholas Bianco » Sat Feb 24, 2024 10:13 am

Hi Wenye,

If you prepend the Socket parent frame paths with "/bodyset/" for each Marker in the model, it should work.

So instead of:

Code: Select all

<socket_parent_frame>tibia_l</socket_parent_frame>


it should look like:

Code: Select all

<socket_parent_frame>/bodyset/tibia_l</socket_parent_frame>
Best,
Nick

User avatar
Wenye He
Posts: 5
Joined: Mon Oct 16, 2017 7:46 pm

Re: Seeking help for processing error

Post by Wenye He » Sun Feb 25, 2024 12:04 pm

nbianco wrote:
Sat Feb 24, 2024 10:13 am
Hi Wenye,

If you prepend the Socket parent frame paths with "/bodyset/" for each Marker in the model, it should work.

So instead of:

Code: Select all

<socket_parent_frame>tibia_l</socket_parent_frame>


it should look like:

Code: Select all

<socket_parent_frame>/bodyset/tibia_l</socket_parent_frame>
Best,
Nick
It works! Thanks a lot!

POST REPLY