Want to implement a muscle path approximation plugin

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Marc Carmichael
Posts: 45
Joined: Thu Jul 16, 2009 2:50 am

Want to implement a muscle path approximation plugin

Post by Marc Carmichael » Fri Nov 13, 2015 10:55 pm

I am looking to implement a plugin that allows the paths of muscles to be approximated, with the hope of speeding up computations. Basically this plugin would provide quick calculation of muscle-tendon lengths and moment arms (e.g. look up tables), and allow existing tools (ID, FD etc) to run without any modification.

I have played around with this a little bit but I can't seem to decide on a nice, scalable method to implement it. I tried creating a derived class of a muscle (e.g. Thelen2003Muscle) and re-implementing functions such getLength(), but found that this didn't work. My intuition is that tools are getting the muscle-tendon lengths by referencing the GeometryPath inside of PathActuator and obtaining it from there, hence bypassing my derived class's function.

Based on this I want to try a new approach but seek your comments/ideas beforehand.

My Approach
Create a derived "GeometryPath" class that reimplements the getLength(), getLengtheningSpeed(), addInEquivalentForces(), computeMomentArm() functions using the approximation methods. Then, replace the GeometryPath object in the muscle with this new derived one.

Questions
  • Will this work? I have little experience with polymorphism and I assume it falls into this category.
  • Are there any other functions I would need to reimplement to make OpenSim tools such ID, FD, MomentArmSolver agnostic to this plugin?
  • If my approach wont work, is a solution to develop a new derived GeometryPath, then a new derived PathActuator that makes use of the derived GeometryPath, then a new derived Muscle that makes use of ..... all the way up to the specific actuator of interest? This seems very tedious, any ideas on how this could be simplified?
Answering these questions or providing any ideas would really help me out. Thanks

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Want to implement a muscle path approximation plugin

Post by jimmy d » Sat Nov 14, 2015 11:12 am

Hi Marc,

Really cool idea. That sounds very similar to this paper. I would suggest that the firs thing you do is reach out to the first author and ask what are the best ways to implement your idea and if there is some publicly available code that you could work from.

It's not clear to me why you have to build you own custom path class. Generating a lookup table will be a process of (i) posing the model (ii) asking for the path length and moment arms values(iii) insert values in a lookup.

You won't really be able to use the tools without modification. They are pre-canned convenience tools that the GUI and command line can use. How are you going to tell CMC not to compute the muscle properties? When people have done this before, they had to build custom tools to get it to work.

Hope that helps,
-James

POST REPLY