How to Calculate the contact orces and Individual Forces Experienced by Bodies with Parent-Child Relationships #2168
Unanswered
gaoning0109
asked this question in
Asking for Help
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Intro
Hi!
I am a researcher, I use MuJoCo for my research on contact forces.
My setup
mujoco 3.20
API (C )
My question
Hello, I'm attempting to use d->cfrc_ext to analyze external contact forces. My understanding is that this is the resultant external force acting on the geom within a body. However, if I embed another body within this body, the contact forces experienced by the new body will not be reflected in the d->cfrc_ext of its parent body. It seems that embedding a geom within a body works fine. I would like to know if there's any way to calculate the resultant forces experienced by bodies with a parent-child relationship and their individual forces.
Minimal model and/or code that explain my question
Model:
I'm not sure if I should add sensors to each child body and obtain the contact forces via d->cfrc_ext for the child bodies.
Code:
The index is the index of the body, and since I only have two bodies, they are indexed as 0 and 1.
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions