Yes, you can apply the assistance specifically to flexion/extension of hip joint. Instead of using the joint reference, you can use the HipFlexion reference in the Interface folder.
So, you can replace the k1 pointer like this:
I have another question related to this code : AnyKinMeasure &k1 = Main.HumanModel.BodyModel.Interface.Right.HipFlexion;
I applied above ideal hip assistance code for both legs during few activities. Hip muscle activity levels were compared with and without assistance. We expected the muscle activity levels of main hip flexor muscles to decrease noticeably. However, Psoas major muscle, which is a main hip flexor muscle as per many sources, does not show any significant reduction of muscle activity during any activity after the assistance is applied. (i.e activity level is almost same with and without assistance).
Please let me know if you have any idea about this observation.
That's an interesting observation. I am guessing that these muscles are needed for some other function as well during the activities you are simulating. For example, psoas major is also used in stabilizing the spine or lateral bending of the trunk.
Perhaps, you can first use an AnyReacForce on the hip flexion measure to provide some reaction torque on hip flexion to ideally support the activities you are simulating. This will give you the best shot at assisting hip flexion. Then, you can study the value of the reaction torque and see if any muscles are actually benefitting from such an idealized assistance.
Yea, the code looks alright for applying the AnyReacForce. But, I am a little bit confused now that you mentioned you are applying the ideal assistance "already". Were you applying AnyReacForce and your external assistance (from your first post) in the same model?
I am so sorry, I forgot where I started the post. Yes, I am applying spring assistance and ideal assistance in different simulations for the same activity.
The issue was that we did not observe any good Psoas major muscle activity reduction even when the ideal assistance is applied. Actually, there is only a very small reduction compared to the reduction of other hip flexor muscles such as Iliacus, Rectus femoris and Sartorius.
On one hand Psoas major is a major hip flexor. On the other hand, it can be supporting other functions as you mentioned. Just wanted to confirm before proceeding.