Treadmill gait plug-in

Hi everyone.
I have some C3D files for treadmill and I need to create a gait plug-in simulation in AnyBody for that. I have already found the code in github for running on treadmill but I can not open the libdef file. When I want to load the model (Main.any file), I get this error ERROR(SCR.SCN1):Main.any(2) :Cannot open file: libdef.any: Model loading skipped. Any idea how I can fix this issue?

Hi

Have you copied the code correctly from github? You should normally clone the repository. There will be a libdef file in the upper-level folders. There, you may need to update the path in the main file to the libdef file in your AMMR folder.

For example, if you have made a demo AMMR through the AnyBody assistant dialog box, the path will typically be:

C:\Users\<WRITE YOUR WINDOWS USER NAME HERE>\Documents\AnyBody.8.0.x\AMMR.v3.0.4-Demo\libdef.any"

Best regards,
Dave

Hi Dave,
Thanks for your response!
Please, could you tell me how I can change the directories (paths) in the main file? I need to change some others paths in the main files. For example, I have to change the output path, labspecific path, etc.

Hi

Normally in the main file of your model, the first line tries to include a libdef file:
image

The ../ indicates a relative path to the folder that is one level up compared to folder containing the main file.
In case of mocap models, if you double click the circled line, it will open a libdef.any file from one level up which will probably have the path to another libdef file one more level up. Basically, this is to allow you to make some configurations at different levels (subject specific level, etc.)

You want to find the libdef.any file in your topmost folder for the model (that is where you will have labspecificdata.any, bodymodelconfig.any, etc.) and change the line to point to the libdef in your demo AMMR like I mentioned before.

You would normally not need to do any of this if you have downloaded all the model from github correctly as it defaults to point to the libdef in your AnyBody installation directory if nothing else can be found. Likewise, all the other path statements will work just fine and you don't need to change anything. I suspect you have downloaded the model partially. I would suggest you download the code again from here: GitHub - AnyBody/vicon-mocap-examples: AnyBody models, using Vicon Nexus Sample Data. If you are not familiar with GitHub, then just click on the button that says Code and then click on Download Zip. Once you have downloaded and extracted the entire model, you can find the treadmill example in there and work with it.

Best regards,
Dave