relative path in CMC setup

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
John Rogers
Posts: 45
Joined: Fri Feb 24, 2012 11:47 am

relative path in CMC setup

Post by John Rogers » Tue Mar 10, 2015 12:44 pm

Hello,
I am trying to use relative paths in my CMC setup file (attached).
CMC seems to have difficulty finding the files it needs.
I am running CMC from Matlab (attached).

Matlab gets as far as searching for the GRF xml file.
Matlab output:

Running tool subject01_Run_20002_cycle1.
Error: failed to construct ExternalLoads from file ../../cmc_multipleSteps_v24_Tendon_040_Vmax_15_Passive_10_2X/CMC_Results_v240_Run_20002/subject01_Run_20002_cycle1_GRF_v240.xml. Please make sure the file exists and that it contains an ExternalLoadsobject or create a fresh one.

Exception:
Object: ERR- Could not open file
../../cmc_multipleSteps_v24_Tendon_040_Vmax_15_Passive_10_2X/CMC_Results_v240_Run_20002/subject01_Run_20002_cycle1_GRF_v240.xml.
It may not exist or you don't have permission to read it.
file= ..\..\..\..\src\OpenSim32\OpenSim\Common\Object.cpp
line= 114


>>

I believe the relative path is correct:
../../cmc_multipleSteps_v24_Tendon_040_Vmax_15_Passive_10_2X/CMC_Results_v240_Run_20002/subject01_Run_20002_cycle1_GRF_v240.xml


Can you help?
Thanks,
John
Attachments
CMC_runtest_rename_dot_m.txt
(485 Bytes) Downloaded 39 times
setupCMC_run2_relative_temp.xml
(6.84 KiB) Downloaded 63 times

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

Re: relative path in CMC setup

Post by Ayman Habib » Tue Mar 10, 2015 1:35 pm

Hi John,

I've seen related issues when the full path is very long (that's Windows problems rather than OpenSim specific). To make sure this is not a factor here, I'd move the files near top-level folder on your machine or use shorter names and see if that solves the problem.

Best regards,
-Ayman

User avatar
John Rogers
Posts: 45
Joined: Fri Feb 24, 2012 11:47 am

Re: relative path in CMC setup

Post by John Rogers » Wed Mar 11, 2015 5:05 am

Thanks Ayman, that IS the problem.
It's unfortunate--I wish there was a way to get windows to work around it.
Do you know if this is a problem n Linux?
John

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

Re: relative path in CMC setup

Post by Ayman Habib » Wed Mar 11, 2015 8:55 am

Hi John,

As far as I know the problem is windows specific and doesn't exist on non-windows machines (linux/Mac).
If you'll be using Unix you may need to make sure to use unix style slashes for path/file specification in files.

Best of luck,
-Ayman

POST REPLY