The most likely reason is that the force is not included in your study as you have defined the force in Main. Typically, the study contains pointers to folders that must be included in the study. There are several ways you can fix the issue that I think you are facing:
If you would define the force inside one of the folders already included in the study, then the force will be automatically included.
If you define the force in Main, you would also need to tell the study to include the force in the analysis. You will need to add pointers to your force inside the study
You could simply define the force within the study itself.
Thank you for your input. Now it works properly after I include the above codes under an existing study (e.g., InverseDynamicStudy).
I have an additional question below:
Let's assume that we have a bvh file recorded during a box-lifting trial. Then, we can estimate spinal forces (i.e., compression and AP shear forces at L5/S1) by applying
A. 'BVH_BoxLift' example (e.g., set box weight = 20kg), or
B. 'BVH_Xsens' example (e.g., add external vertical force = ~98N on each hand).
It seems that spinal forces estimated by A are ~10-15% higher than B. Can you please explain why there are such differences?
Great to know that you are able to see the effect of the force in your study.
For your question regarding using BoxLift example or the Xsens example, please note that the box lift example also includes the inertial properties of the box. These are defined in Main.ModelSetup.EnvironmentParameters. The Xsens model with adding an external vertical load on the hands will be a simplification where you do not consider the inertial properties of the box. I suppose this should explain why BoxLift example gives higher loads than the Xsens example but it's hard to say about the 10-15% part. This would depend on the inertial properties and the speed of the movement.