I would like to add RefNodes to the Body Model of the MoCapModel to create contact with a handle in the environment. Therefore I need a contact node at the 3rd metacarpal near the metacarpophalangeal joint.
Where can I add these Nodes? (In which file?) And where should I create the joint between the Hand and the environment? Also in the Environment-folder?
Thank you very much,
Max
I created those Nodes like you recommended. Afterwards, I linked the model (hand) with the environment (handle) with a AnyUniversalJoint. Now, I would like to drive the environment with the model, which is driven by c3d.
Therefore I commented the environment drivers, I created to see if motion is right. Running the RunMotionAndParameterOptimizationSequenz, i got an error message that the study fails at the initial conditions.
When I remove the comment from the drivers, the kinemtic analysis works, but the environment moves from the drivers and is not connected to the body model.
Do you have an idea what is going wrong?
Tough to say anything without seeing the implementation.
If it doesn’t solve initial condition, it usually means that the driver positions are not correct. Is the loading posture and position of the environment close to the start of the motion?
finally, I got my handbike environment connected with my MoCap-body model. The kinematics are working fine and motion of the model and the environment looks right.
Now I have the problem, that I have 9 unsolvable constraints.
I read in another thread that I should delete other constraints to make the system determined. Do you have an idea which constraints I can delete without damaging the body model?
The environment is connected with a RefNode placed at the hand segment via a spherical joint and fixes by a driver.
You write that the kinematics and motion looks fine, but on the other hand you write that the model has 9 unresolved constraints, i am sorry but i do not understand how both can be possible?
Is it the mocap model alone with no connection to the environment which run?
Please explain in more detail which analysis is running correct and which analysis is having errors?
Concerning which dof to remove to obtain a kinematic determined system there exist no golden answer to this, it entirely depends on the model configuration. Normally i would make a small sketch displaying the dof in the model and human and then find a combination of drivers that is not redundant and at the same time describes all dof in the model.
As an example, if you have a mocap model with drivers on all joints and then on top of this makes a connection between hand and a driven segment with a spherical joint, you end up having a model with three unresolved constraints.
In such a case i would remove drivers for elbow flexion, gh abduction, and gh flexion, since these would be covered nicely by the connection in the hand.
I will try to explain better:
-)The model is the MoCapModel of a handbiker, driven by markers.
-)The environment represents the handbike (Consists of a crank and two handles connected with RevoulteJoints) The handbike is connected with the RefFrame and should be driven by the BodyModel
-)When I activate the MotionAndParameterOptimizationModel, the complete analysis works and the handbike is driven by the BodyModel
-)When I activate the InverseDynamicModel, I get the error message:
ERROR(OBJ.MCH.KIN2) : C:/U…s/User/D…p/A…3/A…n/E…s/M…5/M…l/InverseDynamics.any(29) : InverseDynamicStudy : Model is kinematically over-constrained : Position analysis failed : 9 unsolvable constraint(s) found
-)The MotionAndParameterOptimizationModel doesn’t have any muscles, the InverseDynamicModel includes the Simple_muscle type…
-)Is it possible that the inclusion of muscles induce the error message?
When running the MotionAndParameterOptimizationModel the model is using the markers and the overdetermined kinematic solver.
When running the inverse analysis all joint angles are read in and driven to the values obtained from the MotionAndParameterOptimizationModel, this model runs a kinematic solver which does not handle overdeterminancy.
So you effectively you have model which is overconstrained because of the revolute joints in the hands.
Here is a the count of dof:
[ul]
Entire human model is driven all joint angles+ pelvic position
Revolute joints in hands 2 x 5 constraints
Crank/pedal segment 6 dof
Crank joint revolute joint 5 constraints
[/ul]
This means you add 15 constraints and 6 dof in terms of a rigid body so you have a problem which has 9 constraints too many.
I would add a driver for the crank motion so you would have 10 constraints to many,
You will need to remove joint angle drivers on certain joints to accomplish this, from the top of my head i would remove these:
[ul]
GH drivers all of them 3 dof for each side = 6
Elbow flexion foe each side =2
Pronation forearm each side =2
[/ul]
thank you very much! That totally makes sense to me.
I had a first try with a roughly estimated driver and the inverse dynamics made it at least till time step 29…
I think with a bit of improvement of the environment model I can do it for the whole sequence.
I have another question.
When I add an AnyForce to a revolutejoint with a simpledriver, does this force automatically point tangential to the rotation (Like the torque of a crank)?
And if so, does it always point in direction of movement with positiv sign and against movement with negativ sign?
now another question came to my mind.
For the inverse dynamic analysis, i need to add a driver to the crank joint, otherwise the system is indetermined.
At the MotionAndParameterOptimizationModel I can let out the driver because the model is driven by the motion of the body model with c3d file.
What is the best method to drive the crank joint in the inverse dynamic model?
I have a suggestion:
Can I read out the position of the crank joint during the MotionAndParameterOptimizationModel and use those values to drive the inverse dynamic model with a InterpolDriver?
I tried using just a simpledriver with the correct cadence but the motion is not constant enough throughout the whole cycle and I get an error message.
Posting #1:
If you use the AnyForce object and apply this to a linear measure it will apply a force, if you apply it to a rotational measure it will be a moment.
The the force/moment will be positive in the same direction as the measure.
Posting #2:
Yes using an interpolation driver is a good idea, if you then add the real joint to the pedal you can then remove a joint angle driver from one of the human joints so that the model ends up being kinematically determined (for each side)
Having the real joints in there will allow you to add a torque to the crank and have the load transmitted to the human.
My MotionAndParameterOptimizationModel works fine for the whole c3d file of 50 seconds.
Also the InterpolDriver of the crank Joint seems to be working fine in the Inverse Dynamics.
But now I got a new Error message in the inverse Dynamics after about 100 Frames (1 second).:
ERROR(OBJ1) : C:/U…s/User/D…p/A…3/Body/A…n/Arm/Muscle.any(2271) : Extensor_Pollicis_Longus.SPLine : Factorization of stiffness matrix for velecity analysis failed. Try to use a use a larger AugLagCoef value.
I already tried to increase the AugLagCoef up to 1000000 but it does not solve the problem.
Do you have an idea what I can do to solve it?
So try use the steps in the above link to visualize this one muscle and its wrapping surf, then my guess would be that making a cylinder longer may solve the problem.
I still have a question about the Force I applied in my MoCapModel.
I have a crank joint (revolute joint). This joint is driven by an InterpolDriver.
The InterpolDriver is a result from the position value of the crank joint in the Motionandparameteroptimization analysis. In this case rotation about the z-axis of the joint. The values start slightly positiv and decrease from then, gets negativ so it is monotonically decreasing.
I applied a force with an equation to load the joint with a crank moment wich should be the resistance against the movement. The equation gives the crank moment in Nm and i applied it with a negativ sign at the crank joint. Therefore, the crank moment is negativ.
Does this moment point against my movement like it should or is the negativ sign wrong and the moment helps the model cranking?
And is there a possibility to show the direction of the moment in the model view?
Sorry for this question but I’m confused about this.
If you apply the moment using the AnyForce object it will have a positive sign in the same way as the joint is defined.
If when pedaling forward your joint.pos value are negative your moment should be applied positive in my understanding.
If you display the axis of rotation of the crank i think you will see the axis of rotation points to the right side of the bike, so if you apply the right hand rule on this axis it will have a negative rotation if you pedal forward as you describe.
When applying the moment if you use the right hand rule again a positive moment would work against the motion from crank to pedal and a negative moment would help the rider.
Please also have a look in the bike model in the repository.
When in doubt about such definitions, it can be a good idea to make a small model with a few segments to ensure the signs are applied correctly.
thank you. You were right, I had to change the direction.
I have a question about comparing EMG data with the AnyBody muscle activity.
I know that it is not completly the same thing physiologically. But it is compareable like Pamela de Jong and Kenneth Meijer did for cycling.
My question is:
the biceps is divided into two parts in the model, but for the EMG measurement it is of course just one muscle. For pectoralis major or triceps there are even more parts.
How can I combine the muscle activites of those parts to get a sum signal that is compareable to EMG data?
thank you for your reply but that was not really the answer of my question. I will try to explain better.
The muscle activity should be a value between 0 and 1 in percent of the maximum muscle activity of this muscle…
When I want a combined signal of both biceps parts, can I just sum them or do I have to rescale them to 100% afterwards.
The thing is when both activites are about 0.8 and I sum them they will be 1.6 and 160% of maximum activity is not possible…
And the other thing is:
Is summing the correct operation or do I have to weight the parts of the muscle?
And what do you mean with “create the activity envelop of more muscles”? Do you mean for example sum all extensors of the forearm?
by the activity envelope i mean the activity curve which forms the max of the muscles in question, this can also be done with the outputfun so writing something like this
AnyOutputFun myfun ={
Val=max(mus1.activation, mus2.activation)
};
//not 100% sure on syntax here
If you look at the MaxMuscleActivity of the study this is what you have for all muscles in the model.
You can also do as you suggest and normalized with the max value.