Search found 43 matches

by Musa Audu
Fri Mar 22, 2019 1:21 pm
Forum: OpenSim
Topic: Hunt-Crossley Force Effects:
Replies: 1
Views: 194

Hunt-Crossley Force Effects:

I want to understand better the mechanism of the Hunt-Crossley sphere forces when used to support the body at the feet. Are the forces bidirectional or uni-directional? I ask because when I apply hip flexion moment to the model standing and supported by Hunt-Crossley forces at the two feet, it has d...
by Musa Audu
Tue Dec 18, 2018 11:26 am
Forum: OpenSim
Topic: center of mass positions of bodies using findStationLocationInGround()::
Replies: 4
Views: 423

Re: center of mass positions of bodies using findStationLocationInGround()::

Hi Nicos, I followed your idea with the following code snippet that worked to get the CoM position: BodySet bd = osimModel.getBodySet(); int Indx = bd.getIndex("calcn_r"); const auto& lfoot = bd[Indx]; Vec3 FmassCenter = lfoot.getMassCenter(); osimModel.updMultibodySystem().realize(si, Stage::Positi...
by Musa Audu
Tue Dec 18, 2018 10:51 am
Forum: OpenSim
Topic: center of mass positions of bodies using findStationLocationInGround()::
Replies: 4
Views: 423

Re: center of mass positions of bodies using findStationLocationInGround()::

Hi Nicos, Thank you very much for your help. I am exploring it; even though the first line: int mbi_calcR = myModel.getBodySet().get("calcn_r").getIndex(); results in the error message; "class "OpenSim::Body" has no member "getIndex"" I am exploring why this is so. Did you use this in OpenSim 4.0 AP...
by Musa Audu
Tue Dec 18, 2018 10:12 am
Forum: OpenSim
Topic: center of mass positions of bodies using findStationLocationInGround()::
Replies: 4
Views: 423

center of mass positions of bodies using findStationLocationInGround()::

Hi, I am having difficulty using "findStationLocationInGround()" to output the location of the center of mass of a body segment. Below is a snippet of my code: snippet.c I also tried another version as: snippe2.c In both cases, even though the body calcn_r reference frame moved far from the ground c...
by Musa Audu
Fri Nov 23, 2018 5:55 am
Forum: OpenSim
Topic: Loading Motion File to OpenSim 4.0 GUI:
Replies: 2
Views: 274

Re: Loading Motion File to OpenSim 4.0 GUI:

Thanks Ayman. That works. Cheers.
Musa
by Musa Audu
Thu Nov 22, 2018 7:02 pm
Forum: OpenSim
Topic: Loading Motion File to OpenSim 4.0 GUI:
Replies: 2
Views: 274

Loading Motion File to OpenSim 4.0 GUI:

I use the following snippet of C++ code to save my state variables after an integration/simulation: Storage statesDegrees(manager.getStateStorage()); osimModel.updSimbodyEngine().convertRadiansToDegrees(statesDegrees); statesDegrees.print("forward_states.sto"); The resulting file saves the names of ...
by Musa Audu
Mon Nov 12, 2018 11:17 am
Forum: OpenSim
Topic: AssemblySolver instantiation:
Replies: 2
Views: 174

Re: AssemblySolver instantiation:

Yes. You are right Dimitar. I was mistakenly using the CoordinateSet in the second argument of the method instead of the CoordinateReference. Thanks for the pointer.
Musa
by Musa Audu
Sat Nov 10, 2018 7:46 pm
Forum: OpenSim
Topic: AssemblySolver instantiation:
Replies: 2
Views: 174

AssemblySolver instantiation:

Declaring assemblysolver object: I read an open-link model from an XML file (skeleton_file.osim). I then added bodies to it so that it will become a closed chain body system after assembly. A snippet of my code is attached. snippet_code.cpp 'weights' vector is to ensure that some of the joint angles...
by Musa Audu
Wed Nov 07, 2018 10:18 am
Forum: OpenSim
Topic: Constraint Ball Joint
Replies: 2
Views: 216

Constraint Ball Joint

In the C++ code of ExampleClosedTopologyMechanism of Simbody, a ball constraint was defined using the form: "Constraint::Ball(linker1, Vec3(linkerHalfDims[0],0,0), rocker1, Vec3(0,-rockerHalfDims[1],0));" When I used the same form in my code as: SimTK::Constraint::Ball(parent_body, loc_p, child_body...
by Musa Audu
Mon Nov 05, 2018 2:26 pm
Forum: OpenSim
Topic: Model will not open in 4.0 API:
Replies: 0
Views: 170

Model will not open in 4.0 API:

Hi, My model file works well in 3.3. However, when I tried to run a simulation with it in 4.0 C++ API, it threw an exception with the following message: --------------------------------------------------------------------------------------- Updating Model file from 30516 to latest format... Loaded m...