Controller Error

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Marta Carrilho
Posts: 13
Joined: Mon Oct 10, 2016 1:13 am

Controller Error

Post by Marta Carrilho » Wed Jun 14, 2017 4:19 am

Hello everyone,

I'm trying to build a controller. I'm using xml, so from the XML browser, I took this example:

Code: Select all

<PrescribedController>
 <!--Flag (true or false) indicating whether or not the controller is disabled.-->
 <isDisabled>false</isDisabled>
 <!--The list of model actuators that this controller will control.The keyword ALL indicates the controller will controll all the acuators in the model-->
 <actuator_list></actuator_list>
 <!--Functions (one per control) describing the controls for actuatorsspecified for this controller.-->
 <FunctionSet name="ControlFunctions">
 <objects />
 <groups />
 </FunctionSet>
 <!--Controls storage (.sto) file containing controls for individual actuators in the model. Column labels must match actuator names.-->
 <controls_file></controls_file>
 <!--Interpolate the controls file data using piecewise: '0-constant', '1-linear', '3-cubic' or '5-quintic' functions.-->
 <interpolation_method></interpolation_method>
 </PrescribedController>
 
I deleted the FuncitonSet because I pretend to use a storage file, and the code is the following:

Code: Select all

<PrescribedController>
			 <!--Flag (true or false) indicating whether or not the controller is disabled.-->
			 <isDisabled>false</isDisabled>
			 <!--The list of model actuators that this controller will control.The keyword ALL indicates the controller will controll all the acuators in the model-->
			 <actuator_list>HipAct</actuator_list>
			<!--Controls storage (.sto) file containing controls for individual actuators in the model. Column labels must match actuator names.-->
			 <controls_file>controls.sto</controls_file>
			 <!--Interpolate the controls file data using piecewise: '0-constant', '1-linear', '3-cubic' or '5-quintic' functions.-->
			 <interpolation_method>1</interpolation_method>

			 </PrescribedController>

My problem is when I open the model in OpenSim GUI I got a message:
Could not construct a model from C:\Users\Robotics\Desktop\THE ONE\torque1.osim. Possible reasons: syntax error or unsupported format.

Details: Storage: ERROR- failed to open file controls.sto
I already tried with other .sto files from OpenSim example models in order to check if the problem was from my file, but the same message was presented.

Any idea?

Thank you,

Marta

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

Re: Controller Error

Post by Thomas Uchida » Wed Jun 14, 2017 9:03 pm

It looks like this error is thrown by the Storage class when the file is not found. Does the error still appear if you specify the full path for the controls_file?

User avatar
Marta Carrilho
Posts: 13
Joined: Mon Oct 10, 2016 1:13 am

Re: Controller Error

Post by Marta Carrilho » Thu Jun 15, 2017 1:08 am

I tried and the same error appeared.
The directory I was using had a space in its name, I changed the name and it worked with the full path.
Now, I think it's solved.

POST REPLY