Hi,
I am comparing joint moments/muscle forces of different strength training exercises. For some exercises, the subject held a barbell in the hands, and the barbell contained three markers (on the center and at each end). Initially, I made one body representing the barbell and tried to connect it with joints to two hands, but this caused an error. I therefore now modeled the barbell by making two bodies that I attached to each hand with a joint and each body represents half the barbell mass.
I would like to use the markers on the barbell in the IK. To this purpose I have attached markers to just one of the barbell bodies (as I presume adding the markers with the same names to different bodies would lead to errors?). This means one body can be tracked with IK, but the other body is not as it has no markers attached to it. Therefore I was thinking about adding a constraint to make sure the body without markers follows the motion of the tracked body. Since the barbell is a rigid segment, there should not be any rotations between the bodies. However, the subjects did not always grip the barbell at the same width. Therefore, I am thinking that I should allow translations.
Any suggestions on how to implement such a constraint by modifying the model code in notepad++ and any examples of similar constraints would be highly appreciated as I do not have experience with making constraints.
Kind Regards,
Bas Van Hooren
Making a constraint to align two bodies (representing a barbell)
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
- Carmichael Ong
- Posts: 383
- Joined: Fri Feb 24, 2012 11:50 am
Re: Making a constraint to align two bodies (representing a barbell)
The XML Browser could be helpful to give you the XML tags needed to add constraints to your model file. You can find it in the GUI at "Help --> XML Browser".
Check out the "WeldConstraint" which would lock all orientations and translations. I think for your case (correct me if I'm wrong) that your translations should change per individual and not during a simulation, so you could adjust each model file to represent a different individual. More info about WeldConstraint's can be found at https://simtk.org/api_docs/opensim/api_ ... raint.html
Check out the "WeldConstraint" which would lock all orientations and translations. I think for your case (correct me if I'm wrong) that your translations should change per individual and not during a simulation, so you could adjust each model file to represent a different individual. More info about WeldConstraint's can be found at https://simtk.org/api_docs/opensim/api_ ... raint.html