Max Marker Error and GUI Visualizer Discrepancies (Scaling)

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Elizabeth Schmida
Posts: 5
Joined: Fri May 22, 2020 12:09 pm

Max Marker Error and GUI Visualizer Discrepancies (Scaling)

Post by Elizabeth Schmida » Tue Mar 02, 2021 3:06 pm

Hello all,
I am working to scale several subjects using the GUI and I keep running into two issues regarding the max marker error. I have reviewed the scaling documentation, tutorials, and dug through previous forum posts, but have thus far had no luck finding an explanation. I am hoping to get clarification on the following discrepancies between the max marker error in the messages pane and the experimental and virtual marker offsets in the visualizer window:

(1) Of the 8 subjects I have scaled, all have a max marker error around 10cm, however, when I overlay the virtual and experimental markers in the visualizer window the markers are a good match (screenshot below). I think this may be a unit problem, but both the .osim file and .trc files specify the units as meters (sample files attached). Is there some other place units are specified, or something else I missed that would explain such a high marker error compared to what I am seeing visually? If not, which should I believe, the visual or the max marker error output in the messages pane?
Scaling_Shank_MarkerError.PNG
Overlaid Markers
Scaling_Shank_MarkerError.PNG (295.65 KiB) Viewed 732 times
Messages Output: total squared error = 0.128967, marker error: RMS=0.056085, max=0.107094 (L.SH1)

(2) During scaling, regardless of the max marker error value, sometimes the identified marker doesn't seem to be the "poorest" match. For instance, if the messages pane identifies a left shank marker as having the max marker error, when I overlay the virtual and experimental markers and look at the whole model, the right shoulder markers look to have a greater offset. Similar to my first question, which should I trust, the output in the messages pane, or what I'm seeing in the visualizer window?

Any insight/suggestions into these discrepancies and how to proceed would be immensely appreciated! Thank you in advance for all the help!
Scaling_Sample_Files.zip
Scaling files (setup XML, static TRC, osim model)
(107.39 KiB) Downloaded 40 times

Tags:

User avatar
Elizabeth Schmida
Posts: 5
Joined: Fri May 22, 2020 12:09 pm

Re: Max Marker Error and GUI Visualizer Discrepancies (Scaling)

Post by Elizabeth Schmida » Fri Mar 12, 2021 12:41 pm

As a follow up to my previous questions, what location is the marker error computed with respect to? Confluence states "marker error is the distance between an experimental marker and the corresponding marker on the model when it is positioned using the generalized coordinates computed by the IK solver." In this extreme example (below), the GUI outputs massive errors (which make sense based on the contortion of the model), however, the virtual and experimental markers match very well...Which should I believe and is there a way to resolve this discrepancy?
Modified_Model_Scaling.png
Extreme Example of Error Discrepancy
Modified_Model_Scaling.png (245.71 KiB) Viewed 666 times

User avatar
Chiho Ng
Posts: 19
Joined: Mon Aug 03, 2020 7:48 pm

Re: Max Marker Error and GUI Visualizer Discrepancies (Scaling)

Post by Chiho Ng » Tue Mar 16, 2021 7:22 pm

Hello Elizabeth,

Your question is really inspired. I have tried the scale process you provided on your model and get the same result as you did, which is confusing. Then to the scaled model, I applied this scale setup again. Surprisingly, the error eliminated while the markers didn't seem to move a lot.

When matching the model markers and experimental markers, scale tool may use the IK solver, which would change both the model pose and marker position.(Maybe you can get some clues from the source code. I have read part of it, but still been blurred about it.)

According to this result and the maker placement of scale process, I think the errors showed by scale process, are calculated by comparing the location of model markers after pose change and the final marker location, which is always correspondant to the experimental markers.

These are my speculations. I am stuck in the scale step recently as well. BTW, the webina video about scaling (https://www.bilibili.com/video/BV1rW411Y7HE?p=3) would be helpful, I think.

Bet wishes.

Chiho
2021.3.17

User avatar
Nicos Haralabidis
Posts: 196
Joined: Tue Aug 16, 2016 1:46 am

Re: Max Marker Error and GUI Visualizer Discrepancies (Scaling)

Post by Nicos Haralabidis » Wed Mar 17, 2021 3:18 am

Hello Elizabeth and Chiho,

I believe the reason why you notice your experimental markers are coincident with your model's virtual markers is that following the inverse kinematics step you are enabling the experimental markers to move. You can explore this by selecting 'Preview static pose (no marker movement)' whilst 'Adjust Model Markers' is selected in the Scale Tool from the GUI. You should then be able to visually notice that the largest marker error difference from running the Scale Tool matches the output reported in the messages window. If you don't want a particular marker to move at all, remain fixed following the scaling step (instead of simply previewing it), in the Markers list each Marker has a property called 'fixed', if you want the virtual marker to remain in the position you placed it change the 'fixed' tag to 'true'.

I hope that helps!

Nicos

POST REPLY