Static Optimisation API Linux

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Alex Wilson
Posts: 7
Joined: Mon Mar 02, 2015 3:28 pm

Static Optimisation API Linux

Post by Alex Wilson » Wed Nov 25, 2015 5:39 pm

Hi all,

Does anybody have experience running Static Optimisation on Linux through either scripting or using the API?

Many thanks in advance!

Alex

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Static Optimisation API Linux

Post by jimmy d » Sat Nov 28, 2015 10:15 am

Hi Alex,

There are some previous threads (here) that have dealt with static optimization through scripting.

Do you have any specific questions?

-james

User avatar
Alex Wilson
Posts: 7
Joined: Mon Mar 02, 2015 3:28 pm

Re: Static Optimisation API Linux

Post by Alex Wilson » Sun Nov 29, 2015 1:51 pm

In the linked thread, how are all the relative filepaths defined? That is currently my issue when previously trying to use the API.

Also, will the analyze tool work in Linux?

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

Re: Static Optimisation API Linux

Post by Ayman Habib » Sun Nov 29, 2015 4:28 pm

Hi Alex,

We build from source and run tests on Linux, Mac and Windows for the development environment as well as the code that gets posted in source releases so there's no reason to doubt that any part of the API would work on linux.

It's possible that some example files (that run from the GUI) have platform specific paths but it should be possible to convert these to be cross platform.

Please let us know what you find or if you run into a specific problem.

Best regards,
-Ayman

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Static Optimisation API Linux

Post by Christopher Dembia » Mon Nov 30, 2015 11:28 am

Alex:

I use the OpenSim API almost exclusively on Ubuntu 14.04 (and I also use the analyze tool). There should be no issues.

User avatar
Alex Wilson
Posts: 7
Joined: Mon Mar 02, 2015 3:28 pm

Re: Static Optimisation API Linux

Post by Alex Wilson » Tue Dec 01, 2015 12:57 pm

Hi Christopher,

I have tried using the analyze tool on my windows machine but with no success.

On your Ubuntu 14.04, what scripts do you use for the API? My issue seems to be around the external loads files and relative filepathing.

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Static Optimisation API Linux

Post by Christopher Dembia » Tue Dec 01, 2015 4:16 pm

The command line analyze tool works on Windows, Linux/Ubuntu, and OSX. Your issue must be a problem specific to your setup/input files, and perhaps is a bug. But, in general, the analyze tool works.

As for path names, there is a known bug with relative pathnames and the external loads file. The bug is described at https://github.com/opensim-org/opensim-core/issues/118. The workaround is to place your external loads file in the same directory as the tool's setup file (and then use the correct relative paths). Alternatively, you might be able to specify paths in the external loads file that are relative to the setup file instead of the external loads file.

User avatar
Alex Wilson
Posts: 7
Joined: Mon Mar 02, 2015 3:28 pm

Re: Static Optimisation API Linux

Post by Alex Wilson » Tue Dec 01, 2015 4:30 pm

Hi Chris,

Currently all my files are local to the trial, and are all located in the same directory. I have attached my ExternalLoads and setup files, can you see a bug or why the filenames are incorrect?

Alex
Attachments
ExternalLoads.xml
(2.96 KiB) Downloaded 128 times
StaticOptimisation.xml
(5.15 KiB) Downloaded 184 times

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Static Optimisation API Linux

Post by Christopher Dembia » Tue Dec 01, 2015 4:56 pm

It appears that these files would work fine. There is an absolute path for your datafile in ExternalForces.xml. Did you send the correct file?

I doubt this would make a difference but try using forward slashes for the absolute path to the datafile.

Also, you should be able to use a relative path to the datafile, especially if the datafile is in the same directory as StaticOptimization.xml.

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Static Optimisation API Linux

Post by Christopher Dembia » Tue Dec 01, 2015 4:57 pm

There could also be an issue with having multiple hard drives. Each drive on windows has its own current directory...I'm not sure if that's part of the issue.

POST REPLY