Hello,
Right know, I am working with a double pendulum and I am trying to control each joint of it with the following control law:
where U(\theta,t) is my control law ( The angular accelerations are computed there taking into account the error generated by the position of the joint). My question is:
How can I obtain the M(\theta) with the OpenSim API. I think there is a method called SimTK::SimbodyMatterSubsystem::calcM() but not sure if what I am looking for.
Thanks!
How to compute general mass matrix in c++?
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: How to compute general mass matrix in c++?
Almost every calculation related to the EOM is accessed in:
https://simtk.org/api_docs/simbody/3.5/ ... ystem.html
I suggest you read the Dox carefully in order to understand Simbody's convention. Yes can use, but first you need to realize the model to position stage because M(q) is a function of the positions (q).
Best
https://simtk.org/api_docs/simbody/3.5/ ... ystem.html
I suggest you read the Dox carefully in order to understand Simbody's convention. Yes can use
Code: Select all
calcM()
Best
- Dídac Coll
- Posts: 8
- Joined: Tue Jan 31, 2017 6:59 pm
Re: How to compute general mass matrix in c++?
Thanks for the answer Dimitar.
Best regards
Best regards
- Sarah Roelker
- Posts: 7
- Joined: Mon Sep 24, 2012 10:09 am
Re: How to compute general mass matrix in c++?
Is it possible to use an analogous call to compute the mass matrix in Matlab?
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: How to compute general mass matrix in c++?
Yes, but you must use the latest version of OpenSim (v4.0).
- Sarah Roelker
- Posts: 7
- Joined: Mon Sep 24, 2012 10:09 am
Re: How to compute general mass matrix in c++?
Okay thank you!