Page 1 of 1

Adding/modifying/deleting pathpoints to a muscle using python/MATLAB

Posted: Mon Feb 18, 2019 3:04 pm
by yokhesh
Hi everyone,

I have just started using opensim and i have built a fully functional arm with all the joint motion for my research.
My application requires me to change the length of the bones frequently. Therefore, i need to change the muscle path point as well.
I am trying to modify the muscle path point using python but i am getting some errors. I was able to change other features like isometric force using the following commands.
triceps =model.getMuscles().get("Triceps_Brachii_long")
triceps.set_max_isometric_force(799.02)
I went through a link where it was mentioned that it is possible to modify path points using Java/C++. But, is it possible to do the same using python and if so, could please point me towards an example or let me know how. I have pasted the link below. Please let me know.
https://simtk.org/api_docs/opensim/api_ ... yPath.html
Also please mention any link that has the repository of all the python commands relating to opensim. I found one for java but could find one for python.
Thank you,
Yokhesh

Re: Adding/modifying/deleting pathpoints to a muscle using python/MATLAB

Posted: Sun Feb 24, 2019 10:56 am
by mitkof6
Maybe this example could guide you:

https://github.com/opensim-org/opensim- ... m_model.py

Re: Adding/modifying/deleting pathpoints to a muscle using python/MATLAB

Posted: Thu Feb 28, 2019 2:12 pm
by yokhesh
Hi,

Thank you for your response.
I was able to figure out the way to add path points through python..