The Question and Answer and Support Forum for the 2017 Fall Virtual Workshop.
-
Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
Post
by Hide Kimpara » Wed Oct 25, 2017 5:11 pm
Hello Christopher,
Thank you for prompt response!
I tried to find it from MATLAB, unfortunately I cannot find it.
Here is the message from MATLAB:
Code: Select all
>> MS = osimModel.getMultibodySystem();
>> MS.getRigidBodyForces
Undefined function or variable 'getRigidBodyForces'.
I wish OpenSim team members can wrap methods of getGravityForce or getRigidBodyForces in soon, this would be great help for us.
Thank you and Best,
Hide
-
Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Post
by Ayman Habib » Wed Oct 25, 2017 6:22 pm
Hide,
There're many classes that live on simbody side that are not exposed, even in 4.0, either because they were never needed by our advanced users, or because a large group of them is coupled together that you need all of them exposed to be useful. Feels like class level may not be the best granularity in these cases. For example you don't need the fill MultibodySystem exposed here, it's only so that you can invoke a specific method.
One idea, to work around this granularity problem, is to introduce a facade class that lives on the OpenSim/Wrapping side and delegates the calls to the few methods that you need exposed. This could be a reasonable workaround for the short term until we get a handle on the scope of functionality you need from Simbody. If you're ineterested and the unwrapped classes are show stoppers for you then we can pursue this further.
Please let me know what you think,
-Ayman
-
Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
Post
by Hide Kimpara » Wed Oct 25, 2017 6:49 pm
Dear Ayman,
We need those methods because gravity force vector would be the key parameter for gravity compensation. We attempt to develop a framework of feedback controller without the gravity force, first. But this is a temporal version. We need the gravity compensation as soon as possible.
If you develop team placed this matter into your order line, we are very happy.
I am personally interested in a facade class on OpenSim 4.0 side. If this would become the solutions for gravity force as well as contact force of Elastic Foundation model, we'd like to know what the class and belonging methods can do for our matter. In addition, after we resolve issues of gravity force and contact forces, we'd like to get methods of joint reaction forces during run-time.
Thank you and Best,
Hide
-
Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Post
by Ayman Habib » Thu Oct 26, 2017 10:50 am
Hide,
Please provide one example "method" that you want o invoke that is not exposed from simbody and I'll get you started.
Best regards,
-Ayman
-
Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
Post
by Hide Kimpara » Thu Oct 26, 2017 11:19 am
Hello Ayman,
Thank you for your great proposal for us!
aymanh wrote:
Please provide one example "method" that you want o invoke that is not exposed from simbody and I'll get you started.
The example is same as code which Kenechukwu is working (Line# 62 of contactModeling2.cpp in TwoLinkModelController.zip) (
viewtopicPhpbb.php?f=1398&t=8328).
I'd like to express " _model->getGravityForce().getBodyForces(s)" in MATLAB.
Code: Select all
Vector PDController2::GravityVector(const State& s) const {
Vector g;
_model->getMatterSubsystem().multiplyBySystemJacobianTranspose(s, _model->getGravityForce().getBodyForces(s), g);
return g;
}
Thank you,
Hide