Search found 13 matches

by hu hu
Mon Dec 23, 2024 7:01 pm
Forum: OpenSim
Topic: Discrepancy Between Calculated Muscle Forces and Static Optimization Results
Replies: 3
Views: 297

Re: Discrepancy Between Calculated Muscle Forces and Static Optimization Results

Thank you for your reply, but I found that after making this adjustment, there is no noticeable difference in the results. Here is the code snippet: for i in range(nCoords): coord = coord_set.get(i) coord_value = data.get(i * 2) coord_speed = data.get(i * 2 + 1) coord.setValue(state, coord_value, Fa...
by hu hu
Tue Dec 17, 2024 12:40 am
Forum: OpenSim
Topic: Discrepancy Between Calculated Muscle Forces and Static Optimization Results
Replies: 3
Views: 297

Discrepancy Between Calculated Muscle Forces and Static Optimization Results

After performing static optimization, I obtained two files: `HYOID_Scaled_StaticOptimization_activation.sto` and `HYOID_Scaled_StaticOptimization_force.sto`. I am now using the activations obtained from the static optimization to calculate muscle forces and comparing them to the forces from the stat...
by hu hu
Sat Dec 14, 2024 7:52 pm
Forum: OpenSim
Topic: "Millard.computeFiberEquilibrium(state, True) does not work."
Replies: 0
Views: 137

"Millard.computeFiberEquilibrium(state, True) does not work."

I am using the Millard muscle model. I have already configured the compliance of the tendon. After setting the values and velocities of the coordinates, I set the muscle activation and calculated the fiber length using `computeFiberEquilibrium`. However, I found that the results are the same in the ...
by hu hu
Sat Dec 14, 2024 3:54 am
Forum: OpenSim
Topic: Error "initialize class" on Matlab
Replies: 3
Views: 940

Re: Error "initialize class" on Matlab

I have been unable to call OpenSim through MATLAB. I have confirmed that OpenSim's environment variables are correctly set, and I can run OpenSim via the CMD command line. However, I cannot identify the reason for this issue. >> build_and_simulate_simple_arm >> build_and_simulate_simple_arm Failed t...
by hu hu
Tue Dec 10, 2024 4:10 am
Forum: OpenSim
Topic: Discrepancy in Acceleration Calculations Using Different Methods in OpenSim's Arm26 Model
Replies: 2
Views: 269

Re: Discrepancy in Acceleration Calculations Using Different Methods in OpenSim's Arm26 Model

Considering that the fiber length in CMC is obtained through integration, the fiber length calculated using the second method is very close to that of CMC but not exactly the same. However, while the muscle forces obtained by the two methods are quite similar, the accelerations differ significantly....
by hu hu
Mon Dec 09, 2024 11:49 pm
Forum: OpenSim
Topic: Discrepancy in Acceleration Calculations Using Different Methods in OpenSim's Arm26 Model
Replies: 2
Views: 269

Re: Discrepancy in Acceleration Calculations Using Different Methods in OpenSim's Arm26 Model

I compared again the fiber length calculated by the second method with the results from CMC and found that the numerical difference is very small. However, the accelerations obtained from the two methods differ significantly. How should this be interpreted? Additionally, I compared the muscle forces...
by hu hu
Sun Dec 08, 2024 7:16 pm
Forum: OpenSim
Topic: Discrepancy in Acceleration Calculations Using Different Methods in OpenSim's Arm26 Model
Replies: 2
Views: 269

Discrepancy in Acceleration Calculations Using Different Methods in OpenSim's Arm26 Model

I am using the arm26 model from the OpenSim model folder. After performing a CMC analysis, I obtained a states file "arm26_states.sto" and an accelerations file "arm26_Kinematics_dudt.sto". I did not set any reserve actuators. I am now using two methods to calculate accelerations at each time step b...
by hu hu
Sun Dec 08, 2024 6:32 pm
Forum: OpenSim
Topic: How to use the getCoordinatesInMultibodyTreeOrder() function in Python
Replies: 5
Views: 1139

Re: How to use the getCoordinatesInMultibodyTreeOrder() function in Python

Thank you very much, this solved my problem.
by hu hu
Sat Dec 07, 2024 6:28 pm
Forum: OpenSim
Topic: How to use the getCoordinatesInMultibodyTreeOrder() function in Python
Replies: 5
Views: 1139

Re: How to use the getCoordinatesInMultibodyTreeOrder() function in Python

Thank you for your reply, but it still doesn't seem to work. Please take a look at the following error. I am using OpenSim 4.5 installed via Conda. opensim 4.5 py311np123 opensim-org import opensim as osim model = osim.Model("arm26.osim") model.initSystem() coordNames = model.getCoordinateNamesInMul...
by hu hu
Sat Dec 07, 2024 6:31 am
Forum: OpenSim
Topic: How to use the getCoordinatesInMultibodyTreeOrder() function in Python
Replies: 5
Views: 1139

How to use the getCoordinatesInMultibodyTreeOrder() function in Python

I'm trying to get the coordinates in multibody tree order (not CoordinateSet order). coords = model.getCoordinatesInMultibodyTreeOrder() type(coords[0]) opensim.simulation.ReferencePtrCoordinate model.getCoordinateNamesInMultibodyTreeOrder() ----------------------------------------------------------...