Page 1 of 1

RRA Tool Exception ExternalForce_1 has an invalid value

Posted: Thu Jun 25, 2020 3:08 pm
by scadi271429
Good Afternoon

I request some guidance. I am working with the RRA tool and am having trouble getting it to run. I have been told by my colleague that RRA is no longer considered a required input for computed muscle control. My questions are:
Is this correct?
Where is this documented?
If it is correct, what file should be used in place of the subject01_walk1_RRA_Kinematics_q.sto file when performing Computed Muscle Control.

If this is not true, I need help on getting RRA analysis to work. My difficulties are described as follows:

I am working with the
FullBodyModel_SimpleArms_Hamner2010_Markers_v2.osim - which is based on the gait2392 model

My goal is to run scaling, inverse kinematics, inverse dynamics, reduced residual analysis (RRA), computed muscle control (CMC), and forward dynamics on the FullBodyModel_SimpleArms_Hamner2010_Markers_v2.osim, hereafter referred to as the "HamnerModel" for brevity.
FIRST ATTEMPT: I loaded the GUI using the subject02_Setup_RRA_cycle02.xml file. It failed to load file and gave me the error, "Object: ERR- Could not open file subject02_running.mot. It may not exist or you don't have permission to read it".

I looked for file subject02_running.mot and found it callout in the external_loads_file line. I also looked for this file in the directory. The closest file I found was called subject02_running_grf.mot. I changed this reference in the setup file and reran. Now I get a this message (in the Messages window)

Adding force object set from /Users/ruthann/Documents/OpenSim/4.1/Models/RahulData/RunningSimulation_simTK/RRA/gait2392_RRA_Actuators.xml
Running tool subject02_running_RRA.
Error: failed to construct ExternalLoads from file /Users/ruthann/Documents/OpenSim/4.1/Models/RahulData/RunningSimulation_simTK/RRA/subject02_running_grf.xml. Please make sure the file exists and that it contains an ExternalLoadsobject or create a fresh one.

Exception:
Property 'ExternalForce_1' has an invalid value.
(details: ExternalForce:: no force or torque identified.).

In Object 'ExternalForce_1' of type ExternalForce.
Thrown at ExternalForce.cpp:135 in extendFinalizeFromProperties().
line= 0

SECOND ATTEMPT: I checked the subject02_running_grf.xml file. The entire thing is a <ExternalLoads> object. It calls out two other files. One is subject02_running_grf.mot. It is the ground forces file and it does not have a heading entitled 'ExternalForce_1'. The other file called out is the subject02_running_arms_ik.mot file. It also does not have a heading called 'ExternalForce_1'.

So I decided to look at the equivalent files associated with the Gait2392 model. As you can see, the only difference in the files called out in the two setup files (subject02_Setup_RRA_cycle02.xml file and were subject01_Setup_RRA.xml) were the '_ <external_loads_file> subject02_running_grf.mot </external_loads_file> t' versus '<external_loads_file> subject01_walk1_grf.xml </external_loads_file>' files.

I changed the subject02_Setup_RRA_cycle02.xml file to call out the subject02_running_grf.xml for the External Loads file.

I reran the RRA analysis and got the same previous error.

THIRD ATTEMPT: I then compared the subject01_walk1_grf.xml and subject02_running_grf.xml. I found this code in the subject01_walk1_grf.xml file

Code: Select all


<force_expressed_in_body> ground </force_expressed_in_body>
<!--Name of the body the point is expressed in (default is ground).-->
<point_expressed_in_body> ground </point_expressed_in_body>
<!--Identifier (string) to locate the force to be applied in the data
source.-->
<force_identifier> ground_force_v </force_identifier>
<!--Identifier (string) to locate the point to be applied in the data
source.-->
<point_identifier> ground_force_p </point_identifier>
<!--Identifier (string) to locate the torque to be applied in the data
source.-->
<torque_identifier> ground_torque_ </torque_identifier>
<!--Name of the data source (Storage) that will supply the force data.-->
<data_source_name> Unassigned </data_source_name>
It was not in subject02_running_grf.xml file. I added it to the file and reran the Hamner model
And I still get the same error.

FOURTH ATTEMPT: I searched on the forum for "ExternalForce:: no force or torque identified". I found an entry by Zheqi Hu (2016). He was advised to provide absolute paths to all files in the setup file. I modified the setup file to provide absolute paths to the RAA tasks file, RRA constraints file, RRA actuators file and reran the analysis. I still get this error:

Error: failed to construct ExternalLoads from file /Users/ruthann/Documents/OpenSim/4.1/Models/RahulData/RunningSimulation_simTK/RRA/subject02_running_grf.xml. Please make sure the file exists and that it contains an ExternalLoadsobject or create a fresh one.

Exception:
Property 'ExternalForce_1' has an invalid value.
(details: ExternalForce:: no force or torque identified.).

In Object 'ExternalForce_1' of type ExternalForce.
Thrown at ExternalForce.cpp:135 in extendFinalizeFromProperties().
line= 0


I am at a loss as to how to fix the problem. Any guidance you could give me would be greatly appreciated. Thank you.