Tutorial may conflict with opensim 4.5

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Tianchi Chen
Posts: 1
Joined: Sun Jul 04, 2021 10:01 pm

Tutorial may conflict with opensim 4.5

Post by Tianchi Chen » Sun Mar 09, 2025 9:07 am

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.
Attachments
Total Metabolic Energy.jpg
Total Metabolic Energy.jpg (680.42 KiB) Viewed 165 times

Tags:

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

Re: Tutorial may conflict with opensim 4.5

Post by Thomas Uchida » Sun Mar 09, 2025 12:53 pm

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.

POST REPLY