Page 1 of 2

Basic Questions about the Functionality

Posted: Mon Apr 08, 2013 10:49 am
by ichbindochnichttum
Hi,

I am an absolute newbie to both OpenSim and this board, but I hope there's someone out there willing to answer some basic questions.

I want to conduct research in the area of human walking in combination with different kinds of mounted springs and therefore I need a software with the following functionality:

1) Output the load in every muscle over a walking cycle
2) Alter this data in an automatic way
3) Use altered data as Input for simulation
4) Add elements like springs and dampers to different joints
5) Automatically start an energy minimization study with a set of specific parameters and gather the results

Does OpenSim offer this functionality, or is it rather easy to extend it with this functionality?
Also: What would be the best way to enhance functionality? I already have Matlab installed but I'm also willing to dig into C++.

Any reply is highly appreciated, thank you for your time!

Fabian

Re: Basic Questions about the Functionality

Posted: Tue Apr 09, 2013 7:20 pm
by saxbyd
Hi Fabian,

I can comment on what I know OpenSim can do through my own experience, but I think generally you will find most of your goals can be satisfied by OpenSim in theory.

1) Yes you can solve for muscle forces in OpenSim through static optimization and/or CMC. Or potentially by creating your own plugin for a custom muscle force solver.

2) I'm not sure what you mean by automated other than that a computer does it for you :D . You can certainly change the solution from SO or CMC by altering the muscles in the model (max isometric force, geometry, etc...) or by changing the model's kinematics in some way. You would naturally need a rationale for making these modification other than to test the solver's response to perturbations of the model components/states.

3) Yes you can drive a forward simulation with an arbitrary set of forces. You might get funny results if your system is not dynamically consistent though.

4) Now this is where my personal experience stops, but people in my research group have some experience in this area. Yes damping is possible, and different forms of contact between bodies can be modeled.

5) If I recall is now a metabolic plugin. http://simtk-confluence.stanford.edu:80 ... yzeDevices. I've never used it, but it is published. I think basically you need some measure of muscle activation and it works out metabolic cost from that.

I can't program worth beans in C++, so I use Matlab. With the new scripting tools in OpenSim you can access the entire hierarchy of C++ constructs with a Matlab wrapper around so you can call the API directly. I don't know if the scripting will be extended deeper into the core, SimTK, Simbody, SimMath, etc...If the scripting is advanced it will only strengthen the flexibility of OpenSim.

The scripting tools have proved robust and efficient when dealing with my large data set, and when automation is needed.

Hope that helps,

David

Re: Basic Questions about the Functionality

Posted: Wed Apr 10, 2013 12:59 pm
by ichbindochnichttum
Hi David,

thank you for your answer, that's a lot of useful information!
Seems like I still got a lot of reading to do, but at least I know the directions now (:

Thank you again,
Fabian

Re: Basic Questions about the Functionality

Posted: Fri Apr 12, 2013 3:20 pm
by ichbindochnichttum
Hello everybody,

and the struggle continues:
I'm currently trying to reproduce the tug-of-war example in its most simple form, just creating a model and naming it.
I'm getting strange errors like "buffer overrun", "access violation" etc.
I'm using Visual Studio 2012 Ultimate (free for me), might this be the problem?
I've also tried Visual Studio 2010 Express, but here CMake aborts due to the "C Compiler not able to build a simple program" error. What can I do to find out, what I'm doing wrong?

Any reply is appreciated, thank you for your time.
Fabian

Re: Basic Questions about the Functionality

Posted: Mon Apr 15, 2013 10:18 am
by aymanh
Hi Fabian,

Sorry to hear that you're running into problems.

We had many users on various incarnations of VisualStudio 2010, but very few on 2012 (either Professional, Express or Ultimate). Your best bet would be to build from sources to avoid potential compatibility issues and also so it's easier to debug. Please consult the page below for instructions on building from source
http://simtk-confluence.stanford.edu:80 ... rom+Source

If you want to continue using an installed version of OpenSim, please send us the name of the specific version/installer and we'll figure out if it's a compatibility issue or something else on our side.

Best regards,
-Ayman

Re: Basic Questions about the Functionality

Posted: Mon Apr 15, 2013 10:28 am
by ichbindochnichttum
Hello Ayman,

that's ok, errors always force a better understanding of the process, which is not a bad thing at all.
Thank you for your fast reply.

I will try building from source then, hopefully that resolves my problems.
If not, I will inquire this board again.

Thank you for your help,
Fabian

Re: Basic Questions about the Functionality

Posted: Mon Apr 15, 2013 12:15 pm
by ichbindochnichttum
Hi,

so I tried building Simbody from Source two times, but it's not building properly. I appended a screenshot of my Cmake configuration and the build output of visual studio for further informations.

To sum up my problem: I want to be able to add functionality to OpenSim in any way. Whether it's a plug in, a standalone executable or all built from source, just anything that works.

Being a student, I can get every possible version of Visual Studio (Currently I have VS2012 Ultimate and VS2010 Pro installed), but unfortunately I did not find a combination of IDE and OpenSim application that works ...

Re: Basic Questions about the Functionality

Posted: Mon Apr 15, 2013 12:27 pm
by ichbindochnichttum
Hi,

I also tried installing OpenSim 3.0 and building the tugOfWar example again, but it's not building properly either.
I appended the corresponding screenshots. I'm probably just missing something. Thank you for your time.

Best Regards,
Fabian

Re: Basic Questions about the Functionality

Posted: Mon Apr 15, 2013 12:37 pm
by aymanh
Hi Fabian,

If you have both VS 2010 and 2012, I'd stay with 2010 as a more traveled route unless you're building from source. I'm suspecting the two installations of VisualStudio on your machine are confusing CMake so it ends up not knowing whether to build 64bit or 32bit. The libraries provided are all 32bit. Can you verify that this is the configuration you're building?

Thanks,
-Ayman

Re: Basic Questions about the Functionality

Posted: Mon Apr 15, 2013 1:41 pm
by sherm
Hi, Fabian and Ayman. On my Windows 7 machine I have Visual Studio 2008, 2010, and 2012 (all Pro) installed and I successfully build both 32 and 64 bit binaries. So I don't think there is any problem mixing the various versions. I am not so confident about mixing Express and Professional versions, though -- I don't think those can be mixed successfully.

In any case, VS 2012 has bugs that prevent it from building Simbody successfully. I reported them to Microsoft, they confirmed the bugs and said the fixes will be in the next update (the are not in update 2 that just came out). So Fabian, you will have to use VS 2010. If you have 2010 Pro, that matches the OpenSim 3.0.1 binary posted on Simtk.org so you wouldn't need to build from source if you are just making a plugin. Otherwise, you should be able to build from source without much trouble since that is the same compiler we used.

I couldn't tell from your screenshots what if anything is wrong. One reminder -- you need to delete the cache in CMake for any changes to take effect. If in doubt, delete the whole build directory and start again.

Regards,
Sherm