mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

Force direction detected by sensor

Open zichunxx opened this issue 1 year ago • 3 comments

Hi!

I've been confused about the force direction detected by the force sensor for a while and made a MWE.zip to illustrated my confusion with the impedance controller made by @kevinzakka.

First of all, I found that creating a dummy body is a great way to gather force information from here.

Second, as illustrated in the document, the detected force is expressed in the site frame and points from the child body to the parent body.

For the above MWE, I create a dummy body containing a sensor site on the tip of the peg and simulate a process of moving vertically downward toward the ground and hitting the ground. Running the python script in the MWE can reproduce the process directly without any tuning.

Here is the force information in the z-direction:

For my example, I think the force is negative because the z-axis of the sensor site frame points downward, and the force points from the dummy body to the box_eef body, which is upward. You can also find body labels in the above figure.

  1. But why the detected force is positive?

  2. I also found the dummy body should be in the right position but the position of the sensor site does not matter, why?

I have found some related issues but they didn't solve my confusion. Here is the list:

  • https://github.com/google-deepmind/mujoco/issues/1249
  • https://github.com/google-deepmind/mujoco/issues/399
  • https://github.com/google-deepmind/mujoco/issues/997

Thanks in advance for your precious time in checking the MWE. Any comment would be appreciated.

zichunxx avatar Feb 24 '24 09:02 zichunxx

Hi @zichunxx, I'm looking into this and will get back to you soon.

kevinzakka avatar Mar 07 '24 20:03 kevinzakka

Hi @zichunxx, I'm looking into this and will get back to you soon.

Thanks in advance for your generous help.

zichunxx avatar Mar 08 '24 01:03 zichunxx

Hi! @kevinzakka Sorry for the interruption. Did you find anything wrong?

zichunxx avatar Apr 27 '24 13:04 zichunxx