Page 1 of 1

Tutorial may conflict with opensim 4.5

Posted: Sun Mar 09, 2025 9:07 am
by andychen
In the tutorial: Simulation-Based Design to Reduce Metabolic Cost, I found the following conflicts with opensim 4.5:
Problem 1:
After I input

Code: Select all

pathSpring.set_GeometryPath(gastroc.getGeometryPath())
, an error will be reported:

Code: Select all

Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'org.opensim.modeling.PathSpring' object has no attribute 'set_GeometryPath'
Problem 2:
I followed the steps in the tutorial to compare the Total Metabolic Energy of Unassisted, Pathspring, and PathActuator, but the results do not look correct. As shown in the figure, Unassisted, Pathspring, and PathActuator are red, blue, and green, respectively.
In addition, I also directly used Scripts to print out the results of Total Metabolic Energy that comes with the model folder of opensim, and the results are the same.
Do you know where the problem is? Because this affects the implementation of the tutorial. Thank you very much.

Re: Tutorial may conflict with opensim 4.5

Posted: Sun Mar 09, 2025 12:53 pm
by tkuchida
Regarding "Problem 1", please see the highlighted box labelled "API Change" on the "What's New in OpenSim 4.5?" page in the documentation (https://opensimconfluence.atlassian.net ... penSim+4.5). "set_GeometryPath" should be replaced with "updGeometryPath". The tutorial should be updated to reflect this API change.