Search found 12 matches
- Tue May 21, 2019 9:32 am
- Forum: OpenSim
- Topic: getting the vector of gravitational forces from SimbodyMatterSubsystem
- Replies: 15
- Views: 2401
Re: getting the vector of gravitational forces from SimbodyMatterSubsystem
For a few reasons, I ended up writing code in Matlab to get the gravity vectors without using the MEX interface. This way I don't need to have separate parallel instantiations of the model in C++ and Matlab. I have included the Matlab code below. I compared it to the output of my MEX interface code ...
- Mon Apr 15, 2019 8:36 am
- Forum: OpenSim
- Topic: Understanding coupler coordinate constraints in the OpenSim neck model
- Replies: 3
- Views: 601
Re: Understanding coupler coordinate constraints in the OpenSim neck model
Hi Sherm, Thank you for your response! The coupling that occurs physiologically is probably a combination of muscle coordination and ligaments/passive components. I imagine that the coupler constraints would be more representative of these passive components. However, I am specifically interested in...
- Sun Apr 14, 2019 2:55 pm
- Forum: OpenSim
- Topic: Understanding coupler coordinate constraints in the OpenSim neck model
- Replies: 3
- Views: 601
Understanding coupler coordinate constraints in the OpenSim neck model
I am working with the OpenSim neck model through the Matlab API. The neck model has 24 mobilities (8 joints, each with 3 rotational DOF). There are 18 coordinate coupler constraints, leaving 6 generalized coordinates (lower c-spine pitch2, roll2, yaw2; upper c-spine pitch1, roll1, yaw1). I am trying...
- Fri Apr 05, 2019 8:26 am
- Forum: OpenSim
- Topic: Determining wrench at end of a kinematic chain
- Replies: 5
- Views: 458
Re: Determining wrench at end of a kinematic chain
Hi Peter, I'm wondering if you had any success with this? I am attempting to do something similar with the neck model. I want to determine the wrench at the forehead when a particular muscle activation pattern is applied. However, the Jacobian is not invertible because is both not full rank and not ...
- Thu Feb 14, 2019 9:27 am
- Forum: OpenSim
- Topic: getting the vector of gravitational forces from SimbodyMatterSubsystem
- Replies: 15
- Views: 2401
Re: getting the vector of gravitational forces from SimbodyMatterSubsystem
In case it is helpful to anyone, I was able to create the mex interface for Matlab to get the gravity term in the equations of motion. I have attached my c++ code "GravityEngine.cpp". Thank you for your help, Dimitar. I was able to base the structure off of your example code. It requires the mexplus...
- Wed Jan 02, 2019 11:42 am
- Forum: OpenSim
- Topic: Accessing functions of parent templatized class (specifically BushingForce to TwoFrameLinker<Force, PhysicalFrame>)
- Replies: 2
- Views: 301
Re: Accessing functions of parent templatized class (specifically BushingForce to TwoFrameLinker<Force, PhysicalFrame>)
Ah thank you Dimitar!
I will just create my own function to implement that functionality. Thanks for your help.
I will just create my own function to implement that functionality. Thanks for your help.
- Fri Dec 21, 2018 2:51 pm
- Forum: OpenSim
- Topic: Accessing functions of parent templatized class (specifically BushingForce to TwoFrameLinker<Force, PhysicalFrame>)
- Replies: 2
- Views: 301
Accessing functions of parent templatized class (specifically BushingForce to TwoFrameLinker<Force, PhysicalFrame>)
I am working with a version of the OpenSim neck model that has a BushingForce between each vertebral body. I need to populate a vector of the torques from the bushings to add to my equation of motion. The parent class of BushingForce is a templatized class TwoFrameLinker<Force, PhysicalFrame>. I am ...
- Tue Dec 11, 2018 10:59 am
- Forum: OpenSim
- Topic: getting the vector of gravitational forces from SimbodyMatterSubsystem
- Replies: 15
- Views: 2401
Re: getting the vector of gravitational forces from SimbodyMatterSubsystem
Hi Dimitar, Thank you for your response. That is helpful and keeps me from wasting time trying to get a pointer to work. I have another question for you. I am using a model (the neck model available on OpenSim) that has 6 independent coordinates (roll, pitch, yaw of 2 joints) and 15 coordinates that...
- Mon Dec 10, 2018 1:24 pm
- Forum: OpenSim
- Topic: getting the vector of gravitational forces from SimbodyMatterSubsystem
- Replies: 15
- Views: 2401
Re: getting the vector of gravitational forces from SimbodyMatterSubsystem
Hi Dimitar, I have created a MEX interface to read in the gravity term for the equations of motion. I have some more work to do on it but I am getting a return value into matlab that makes sense. I currently am loading the model separately into Matlab and the MEX C++ function, so I have to do everyt...
- Fri Nov 30, 2018 11:22 am
- Forum: OpenSim
- Topic: getting the vector of gravitational forces from SimbodyMatterSubsystem
- Replies: 15
- Views: 2401
Re: getting the vector of gravitational forces from SimbodyMatterSubsystem
I am just interested in the gravity term to update the equations of motion based on state (only realized to position stage). All I really need is that getGravityForce().getBodyForces(state) call so that I can put it into model.getMatterSubsystem().multiplyBySystemJacobianTranspose(). I've been playi...