Free Joint in Opensim

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Sanchana Krishnakumar
Posts: 11
Joined: Thu Feb 06, 2020 7:38 am

Free Joint in Opensim

Post by Sanchana Krishnakumar » Wed Jun 17, 2020 3:07 am

I am trying to model an interaction between a human and an external box for a lifting task (Lift a cubical box with two hands together). I am using the lower full-body model (LFB model). In this model, the ground is defined at the pelvis of the model and is validated for lifting tasks already. The idea is to add the box as a new object and define the interactions of the box. I have markers of the box already. I want to incorporate the box in this OpenSim model and model the torques at the L5-S1 joint in the spine

Currently, in order to get the torques since the box being lifted is not the part of the model, The weight of the box multiplied by the gravity is given as an external force to the hand for ID computation. The results are very acceptable. Our only concern is that it does not account for rotations and inertia of the box. To improve this we wanted to add the box to the model to make the torques more realistic.
opensim_snapshot2.png
opensim_snapshot2.png (81.23 KiB) Viewed 1050 times
I am now working on creating the free joint between the box and the ground and I have achieved it. The box is attached to the ground with an offset to mimic how the box was placed in real life. I ran the inverse kinematics and the results are really good. However, when I run inverse dynamics, I get a lot of noise and distorted torques. The motion of the model is random as well at the end of the computation. I want to know if this is because of the fact that the model's ground is at the pelvis and since this free joint is with the ground and I am measuring the torque at the L5-S1 joint. These factors are causing the noisy torque as the box applies constant weight on the ground(pelvis in my case) even when the box is not in the hands?.

Questions
1. If this is the case, is there an option of making a virtual ground or something similar? to define the box and the free joint?

2. Is there a better approach for achieving the same other than using the free joint?. I have considered the weld joint option but that will create a closed-loop. Would adding a weld constraint between the box and hand solve this issue? Thanks in advance.

Regards,
Sanchana

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Free Joint in Opensim

Post by Dimitar Stanev » Sun Jun 21, 2020 11:01 pm

Hi Sanchana,

I was curious if there is a particular reason not to couple one of the hand and the box with a WeldJoint and the other hand and the box with a WeldConstraint. Please note that we use a WeldConstraint instread of a joint, because we want to avoid a closed kinematic chain. In this way you will be able to model the interaction of the musculoskeletal model and the box.

From your description it is hard to tell what is the cause of this problem. If IK works fine, then it does not make sense that the box has a random position. Although, it is normal to get noisy torques, because the torques computed by ID are sensitive to the kinematics, which must be smooth and twice differentiable. In other words, try looking at the kinematic curves of the box and check if the acceleration (you can perform Kinematics analysis in the Analyze tool) contains a lot of noise.

User avatar
Sanchana Krishnakumar
Posts: 11
Joined: Thu Feb 06, 2020 7:38 am

Re: Free Joint in Opensim

Post by Sanchana Krishnakumar » Wed Jul 29, 2020 4:26 pm

Hi Dimitir,

Sorry for the late reply. I did try weld constraint and I got the following error. What can be done to avoid this?. Is it possible to change the required tolerance level?. And another thing I face is that I am only able to weld to the physical frame hand(but in my case, it is at the wrist). The palm and the fingers are added as geometries). Is there also way to add it directly to the palm as that will be more realistic.

Model unable to assemble: AssemblySolver::assemble() Failed: SimTK Exception thrown at assembler.cpp:897:
Method Assembler::assemble() failed because:
Unable to achieve required assembly error tolerance.
Assembly error tolerance achieved: 6.2633514485987973e-09 required: 1.0000000000000001e-09.
Model relaxing constraints and trying again.

Thanks in advance.

Regards,
Sanchana

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Free Joint in Opensim

Post by Dimitar Stanev » Mon Aug 03, 2020 12:13 am

Hi Sanchana,

In newer versions of OpenSim (>4.0), you can set the assembly tolerance of the model. This you can also change in the GUI from the property window by clicking on the model. Make the assembly tolerance larger (e.g., 1e-6).

POST REPLY