Scaling Error in Opensim 4.1

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Mritula Chandrasekaran
Posts: 94
Joined: Tue Dec 19, 2017 5:36 am

Scaling Error in Opensim 4.1

Post by Mritula Chandrasekaran » Fri May 29, 2020 2:31 am

Hi,
I am getting the following error when I am trying to scale from the command prompt:

Code: Select all

../Opensim/bin>>opensim-cmd run-tool Scale_Setup.xml

Error:The provided file Scale_Setup.xml does not define an OpenSim Tool. Did you intend to load a plugin? 


When I try from GUI, its just running Executing Scaling and doesnt complete.

The model gets loaded in both GUI and command prompt. The number of markers are same in both static file and the model.

Kindly let me know how to proceed.

Thanks
Mritula

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Scaling Error in Opensim 4.1

Post by Ayman Habib » Fri May 29, 2020 10:56 am

Hello,

What platform are you on? If windows you can use the "scale" executable located under the bin folder of the distribution instead of opensim-cmd, we're moving in the direction of using opensim-cmd to run tools.

Since you mentioned the setup file doesn't run from the GUI, it would be good to have more info regarding your model/data-files/setup. If you open a bug and attach these files we can take a look. Similar issue was reported when the scaling was successful but the GUI couldn't write output files due to permissions issues so please check that first.

Best regards,
-Ayman

User avatar
Mritula Chandrasekaran
Posts: 94
Joined: Tue Dec 19, 2017 5:36 am

Re: Scaling Error in Opensim 4.1

Post by Mritula Chandrasekaran » Fri May 29, 2020 3:36 pm

Hi Ayman,
Thanks for your reply. Im using Windows. When I tried using the scale application I get the following message
C:\OpenSim 4.1\bin>scale.exe -PS

THIS EXECUTABLE IS DEPRECATED AND WILL BE REMOVED IN A FUTURE RELEASE.

Use opensim-cmd instead, which can do everything that this executable can.

scale -S SetupFileName -> opensim-cmd run-tool SetupFileName
scale -PS -> opensim-cmd print-xml scale

Created file default_Setup_Scale.xml with default setup
Can you kindly let me know the syntax for using scale application from windows cmd prompt or direct me to a documentation page for the same.

Thanks,
Mritula

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Scaling Error in Opensim 4.1

Post by Ayman Habib » Fri May 29, 2020 4:21 pm

Hello,

As suggested by the help message you should use

Code: Select all

scale -S setupfile.xml
if your files live somewhere else (e.g. setup-and-data-files-folder) then you can invoke scale using

Code: Select all

C:\OpenSim 4.1\bin\scale.exe -S setupfile.xml
from the setup-and-data-files-folder or add "C:\OpenSim 4.1\bin" to your path first.

Indeed the application will be deprecated in some future version but it is assumed to work in version 4.1, please let us know what you find out.

Best regards,
-Ayman

User avatar
Mritula Chandrasekaran
Posts: 94
Joined: Tue Dec 19, 2017 5:36 am

Re: Scaling Error in Opensim 4.1

Post by Mritula Chandrasekaran » Sat May 30, 2020 1:11 pm

Hi Ayman,
My intention is to use the scaled model for Opensim Moco tool. Can you kindly clarify me whats the mistake in my command?

When I use Scale -S Setupfile.xml I get the below error even though I have specified (an opensim GUI) working model

Code: Select all


C:\OpenSim 4.1\bin>scale -S ScaleSetup_File.xml

    THIS EXECUTABLE IS DEPRECATED AND WILL BE REMOVED IN A FUTURE RELEASE.

    Use opensim-cmd instead, which can do everything that this executable can.

      scale -S SetupFileName -> opensim-cmd run-tool SetupFileName
      scale -PS              -> opensim-cmd print-xml scale

Processing subject walk_subject01
ScaleTool.createModel: WARNING- Unscaled model not specified (GenericModelMaker section missing from setup file).

Exception:
  scale: ERROR- No model specified.
  file= C:\projects\opensim-build-releases\opensim-core\OpenSim\Tools\ScaleTool.cpp
  line= 252

Whe I try using opensim-cmd run-tool I get the below error:

Code: Select all

C:\OpenSim 4.1\bin>opensim-cmd run-tool ScaleSetup_File.xml
Updating Model file from 30000 to latest format...
The provided file 'D:\Gait_Recognition_Mritula\Public_Dataset\WIP\Scaling\StaticFiles\TrcMot\WBDS01_110_ScaleSetup_File.xml' does not define an OpenSim Tool. Did you intend to load a plugin?

Even when I tried with Gait2354 and 2392 models from C:\OpenSim4pt1\Resources\Models\Gait2354_Simbody or \Gait2392_Simbody I am still getting error.

Thanks,
Mritula

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Scaling Error in Opensim 4.1

Post by Ayman Habib » Sun May 31, 2020 2:40 pm

Hello,

The command you used is fine, the only issue is that when using the setup file in the GUI the current model in the application is used, however when using the file outside the GUI you need to specify the model file name in XML under the tag

Code: Select all

<model_file>model_filename.osim</model_file>
. Please fix this and let us know if the scale executable and the opensim-cmd work for you.

Best regards,
-Ayman

User avatar
Mritula Chandrasekaran
Posts: 94
Joined: Tue Dec 19, 2017 5:36 am

Re: Scaling Error in Opensim 4.1

Post by Mritula Chandrasekaran » Sun May 31, 2020 10:34 pm

HI,
Thanks for your reply. I have given the model name within the model tag along with the path as below it still gives error
<model> C:\OpenSim4pt1\Resources\Models\Gait2392_Simbody\gait2392_simbody.osim</model>
When I navigate to the model existing directory and give the scale command and only the model name in the setup file, it works fine
<model>gait2392_simbody.osim</model>

C:\OpenSim4pt1\Resources\Models\Gait2392_Simbody> C:\OpenSim4pt1\bin\scale.exe -S\ScaleSetup_File.xml
Thanks
Mritula

POST REPLY