Calling Foward tool function in Dynamic walker starter

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Jan Thomas
Posts: 23
Joined: Mon Aug 10, 2015 8:39 am

Calling Foward tool function in Dynamic walker starter

Post by Jan Thomas » Sat Feb 18, 2017 3:00 pm

Hi all,
I am trying to run the following function from the dynamic walking starter
status = CallForwardTool(modelDirectory, ...
modelFile, resultsDirectory, initialStatesFile). I get the following error on running it. Could you please suggest any help!
thanks!

best,
jan
Attachments
Callforward.JPG
Callforward.JPG (75.5 KiB) Viewed 566 times

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

Re: Calling Foward tool function in Dynamic walker starter

Post by Ayman Habib » Sat Feb 18, 2017 3:34 pm

Hi Jan,

The likely culprit is using full/absolute pathname in the xml file where a relative path name is expected. Usually you don'tneed to specify full path if all the files are in the same folder as the setup file.

Hope this helps,
-Ayman

User avatar
Jan Thomas
Posts: 23
Joined: Mon Aug 10, 2015 8:39 am

Re: Calling Foward tool function in Dynamic walker starter

Post by Jan Thomas » Sun Feb 19, 2017 1:23 am

Dear Ayman,
Thanks for the quick reply, I tried using the filenames instead of the absolute path but I still get the error as below.
Thanks again!


Best,
Jan
Attachments
forwardcall.JPG
forwardcall.JPG (66.59 KiB) Viewed 546 times
ferror.JPG
ferror.JPG (128.9 KiB) Viewed 546 times

User avatar
Thomas Uchida
Posts: 1804
Joined: Wed May 16, 2012 11:40 am

Re: Calling Foward tool function in Dynamic walker starter

Post by Thomas Uchida » Sun Feb 19, 2017 3:47 am

The error message indicates that you are attempting to open a file called "UserFunctionsarm26.osim". The line armModel = Model([modelDirectory, modelFile]); concatenates the strings you provide as the modelDirectory and modelFile arguments, so assuming you have a directory named "UserFunctions" under the directory from which you're calling this function, you probably just need to add a "/" at the end of the first argument:
status = CallForwardTool('UserFunctions/', 'arm26.osim', etc.

User avatar
Jan Thomas
Posts: 23
Joined: Mon Aug 10, 2015 8:39 am

Re: Calling Foward tool function in Dynamic walker starter

Post by Jan Thomas » Sun Feb 19, 2017 7:21 am

Dear Tom,
I used the absolute path path the 1,3 input argument and followed your advice, its working now! Thanks for the help! :)

Best,
Jan

POST REPLY