Page 1 of 2
Static Optimisation API Linux
Posted: Wed Nov 25, 2015 5:39 pm
by awil749
Hi all,
Does anybody have experience running Static Optimisation on Linux through either scripting or using the API?
Many thanks in advance!
Alex
Re: Static Optimisation API Linux
Posted: Sat Nov 28, 2015 10:15 am
by jimmy
Hi Alex,
There are some previous threads (
here) that have dealt with static optimization through scripting.
Do you have any specific questions?
-james
Re: Static Optimisation API Linux
Posted: Sun Nov 29, 2015 1:51 pm
by awil749
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?
Re: Static Optimisation API Linux
Posted: Sun Nov 29, 2015 4:28 pm
by aymanh
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
Re: Static Optimisation API Linux
Posted: Mon Nov 30, 2015 11:28 am
by chrisdembia
Alex:
I use the OpenSim API almost exclusively on Ubuntu 14.04 (and I also use the analyze tool). There should be no issues.
Re: Static Optimisation API Linux
Posted: Tue Dec 01, 2015 12:57 pm
by awil749
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.
Re: Static Optimisation API Linux
Posted: Tue Dec 01, 2015 4:16 pm
by chrisdembia
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.
Re: Static Optimisation API Linux
Posted: Tue Dec 01, 2015 4:30 pm
by awil749
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
Re: Static Optimisation API Linux
Posted: Tue Dec 01, 2015 4:56 pm
by chrisdembia
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.
Re: Static Optimisation API Linux
Posted: Tue Dec 01, 2015 4:57 pm
by chrisdembia
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.