Page 1 of 1

relative path in CMC setup

Posted: Tue Mar 10, 2015 12:44 pm
by resodad
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

Re: relative path in CMC setup

Posted: Tue Mar 10, 2015 1:35 pm
by aymanh
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

Re: relative path in CMC setup

Posted: Wed Mar 11, 2015 5:05 am
by resodad
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

Re: relative path in CMC setup

Posted: Wed Mar 11, 2015 8:55 am
by aymanh
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