GaitUniMiami

Hi,
I’m currently trying to import a new gait file into the GaitUniMiami file through following the instructions at the top of the model script. I have managed to get up to step 12, where GaitApplication2 is executed – but when I run the application it keeps failing by saying that it cannot open the RTHI.txt file. I checked the marker file and it is in the right file extension and seems to open ok to other applications, so wondered if anybody has had similar problems or has any advice. Unfortunalty, I can’t upload the model as the marker position files are failry large (as in the GaitUniMiami model) so the overal model exceeds the size allowed for a zip. attachment.
I would be grateful of any advice anyone may be able to provide.
Thanks
Pete

Hi Pete

Is this marker listed as the first marker in the markerlist of the inputfile ModelGait.txt ?

If so it could be there there is a general problem with all the files…

I think i would try to run the MarkerStudy again exporting the marker trajectories onces more, just to make sure. Personally i have often forgot to outcomment the section in the MarkerMover.any file producing the trajectories so if you run any of the studies again and stop it halfway through, the marker trajectory files gets ruined.

Best regards
Søren

Hi,

Thanks for the reply. I checked the MarkerMover file again and I had forgotten to out comment the section producing the trajectories, so I had altered the file and rerun the model. Unfortunately, the same error is occurring in the GaitApplication2 in reading the RTHI marker – this is the first marker in the ModelGait.txt file. I have tried alter the .any files to .txt files to reduce the file size, but unfortunately the model is still too big to upload (compared to the 97KB .zip allowance) – is there any other way to upload it?

Thanks for the help
Pete

Hi Pete,

Sounds strange with these files, it could be a bad character in the file but if you just recreated them then I do not get it.

Anyway i have increased the maximum file size for zip files to be 10MB i hope this will allow you to share the model.

Best regards
Søren

Hi,

Thanks for increasing the upload limit. Here is the model. I would be very greatful of any advice anyone may have.

Thanks again
Pete

Hey Pete,

I just had a look at the files you uploaded. In the folder, you have not included the GaitApplication2.exe. The .exe file has to be in the same folder as the .txt marker files. This is simply an implementation limitation of the application. Maybe this is the cause of your problem?

Could I ask you to put the GaitApplication2.exe file in the same folder as your Application model and run it from there?

I tried doing that and then it successfully finds the RTHI file, but fails with an error saying:“ERROR: failed to read desired sample in marker file: time: 2.691700, filename: RTHI.txt,
Failed to find the desired sample
ERROR(0) : Failed to solve position analysis
The analysis failed”

This means that the analysis time is not specified correctly in the StudyGait.txt file. If you look in your marker files (e.g. RTHI), then you have data from 3.1 seconds until 4.0 seconds. However, in StudyGait.txt you specify analysis from start time: 2.6917 seconds to 4.8333 seconds with 158 steps. This is of course impossible. So if you adjust the StudyGait.txt to reflect the data available, it should run.

Best regards
Michael Skipper Andersen
AnyBody technology A/S

Regards
Michael

Hi,
Thanks for the advice – the GaitApplication2 runs fine now. However, I just wondered – when you ran GaitApplication2, did the analysis complete successfully. When the application runs I get the following message at the end:-
Error (86) ; The analysis failed
Ekasoed tine : 5.750000
Finshed the study
Writing the output-par file
Although the analysis fails, it returns the output-euler and output-par file. When I changed the StudyGait file to STUDYTYPE POSONLY, the same error is shown but the additional files of output-pos and output-obj are returned. When I run these files back into the model, the kinematic study in the OptStudy failures and the man does not follow the gait correctly.
I have tried running the application with the marker files of the GaitUniMiami model and still get the same error.
Is there something I am doing wrong in executing the application or are there any improvements I can make to the marker files that will help to overcome this error.
Many thanks
Pete

Hey Pete,

No, it failed at the same time step for me. The reason for this is usually a poor initial guess on the size of the man (segment lengths) and the location of the markers. If you look at the objective function values that GaitApplication2 writes out, then you’ll notice the rather large values. This means that there is a large mismatch between the marker trajectories and the assumed model.

I would recommend that you load the model in AnyBody and see if you can figure out which markers or which segment lengths should be changed until the model runs. In these situations, I always start with the largest error and make that one smaller, then re-run GaitApplication2 and see if it gets all way through. If it still fails, locate largest error again and so forth.

Please notice that when GaitApplication2 has successfully solved the analysis for the first step, you should be able to load the AnyBody model and SetInitialConditions in the OptStudy such that you directly can see the results.

I hope this helps.

Best regards
Michael Skipper Andersen
AnyBody Technology A/S

Hey Pete,

I just had an other look at the model inside Anybody. Then I noticed that you have specified that the markers are quite far away from the body. For instance, all markers are more than 1.5 meters away from the body.

I think you have to take an other look at the definition of the local coordinates of the markers.

The easiest way to see this is to load the model in AnyBody and SetInitialConditions in the OptStudy (This is possible since GaitApplication2 successfully finds the solution at the first time step).

Best regards
Michael Skipper Andersen
AnyBody Technology A/S

Hi,
Thanks for looking at the model again – all the help is very much appreciated. I’m not quite sure how the markers have ended up in that position. To load the model initially I had to alter the AnyForce3D sections the in environment.any – the original model read the FPDZ1 (for example) data from the analog file, whereas the c3d file I used had A001, A002 etc. After I changed the environment file, the model loaded successfully, but the markers are quite far away from the origin and the force plates. Could this be a possible reason for this? I had hoped that although the force plate data may not be correctly inputted, it would not affect the kinematics.
As a result, when I aligned the markers in the localMarkerCoordinatesAndSize folder, to those in the c3d file, they have ended up far from the body. Is there any way to realign the markers in the c3d so that they are close to the body?
Thanks again
Pete

Hey Pete,

The idea with the LocalCoordinatesAndSize file is to specify where on the human body the markers attach. So in this file, you should put the markers such that they are as close as possible to the locations where they were on the body in the experiment. If you start off doing that, then it might be that GaitApplication2 can solve the kinematics and then move the man close to the markers that you measured (and hence make the model replicate the experiment). In case it still fails, then you can move the man closer to the markers by changing the values in the Mannequin.any file - this is the initial guess on where the man is in space.

Since it can be difficult to put these markers accurately on the model, when GaitApplication2 is executed with the SCALE solver option, it will attempt to scale the segments and move the markers such that they follow the markers as well as possible over the whole trial. However, not all of these coordinates can be optimized and are therefore excluded from the optimization problem. If you look in the ModelGait.txt file that you save (or directly in the DataForConfigFile.any) then you will see some “on” and “off” settings for the markers. These specify if a given marker direction is optimized or not.

If you have put in new markers on your model, I would highly recommend that you try to understand what is optimized for the model and what is not as it is rather easy to pose an ill-posed optimization problem.

I hope this helps else write again.

Best regards
Michael Skipper Andersen
AnyBody Technology A/S

HI

Thanks for the advice - I think I understand things a little better now. I have restarted the process of altering the initial condition of the human body in the mannequin.any file to fit the data. Hopefully, although with altering the segment lengths, this might solve the problem. I just have one quick futher question regarding aligning the markers. The inputted new markers locations are displayed as grey and inidicate the posture the human body should take - but, is it the red or blue markers which should be aligned to the greys ones when altering the posture?

Thanks again
Pete

Hey Pete,

The easiest way to see which markers have which color is to look in the files where their color is defined. If you open the MarkerPlacementModel.any then just above the include statement for MarkerTopology.any, there is an RGB object statement. This setting specifies that all markers attached to the model are red. Additionally, if you open the MarkerMover.any file then you will see a draw object for the floating markers. In there, it uses the default colour for an AnyRefNode, which is gray.

I hope that answered your question.

Best regards
Michael Skipper Andersen
AnyBody Technology A/S

Hi,
Thanks for the last reply. At the moment we are still struggling to get the application to work within our research. To overcome the Error(86) which happen before within GaitApplication2, I took your suggestion and realigned the human body to the location and posture of the markers, along with altering the segment lengths. The coordinates in the LocalMarkerCoordinateandSize file were then altered to match the markers, but unfortuanley the GaitApplication2 still failed with Error(0). As this does not work, I was starting to wonder if the gait data we are using is unsuitable. Will the GaitApplication complete successfully if the RASI marker is missing in the first frame, and there is a degree of marker jumping half way through the cycle.
To see if it is the market set that we have incorporated, I have additionally being trying to get GaitApplication2 to complete successfully using the file from the original GaitUniMiami model, but with little success. Should the original Mannequin and LocalMarkerCoordinateandSize files successfully execute in GaitApplication2? Or does the postioning need altering?
Many thanks for the help
Pete

Hey Pete,

It will certainly not work if a marker is missing in the first frame. However, if there are enough markers to drive the mechanism even though this marker is missing, then you can set its weight to zero in the corresponding weight file. Please have a look in the manual for GaitApplication2 for how to do that. Also, when a marker (or more) is missing later in the trial, you have to assign them weight zero there also.

However, as a test, I would recommend that you simply start your analysis a couple of frames later where the ASIS marker is visible again to see if this is issue.

If you still cannot figure it out, then please upload your model and I will have a look.

Best regards
Michael Skipper Andersen
AnyBody Technology A/S