Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use anisotropic friction coefficients in some body frame? #67

Closed
vmanoj1996 opened this issue Nov 19, 2021 · 1 comment
Closed
Assignees
Labels
question Request for help or information

Comments

@vmanoj1996
Copy link

Friction section in mjcf modelling page does not convey the direction over which anisotropic friction force is exerted.

I am trying something similar to ice skating. Some experimentation reveals that it is acting along world frame's x, y axis.

Is there a way to get around this?

@saran-t saran-t added the question Request for help or information label Nov 23, 2021
@yuvaltassa
Copy link
Collaborator

Hi,

Anisotropic friction is tightly coupled to the specific collider used, as the collider determines the orientation of the contact frame. One usable collider for this purpose is capsule-plane, since the contact frame is always oriented along the capsule. Below is a minimal "ice skating" example:

ice_skate

<mujoco model="ice skate">
  <asset>
    <texture name="grid" type="2d" builtin="checker" rgb1=".1 .2 .3" rgb2=".2 .3 .4" width="512" height="512"/>
    <material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
  </asset>

  <worldbody>
    <geom name="floor" pos="0 0 0" size="5 5 .05" type="plane" material="grid"/>
    <body name="leg" pos="0 0 .3">
      <joint type="slide" axis="1 0 0"/>
      <joint type="slide" axis="0 1 0"/>
      <joint type="slide" axis="0 0 1"/>
      <joint type="hinge" axis="0 0 1"/>
      <light pos="0 0 2"/>
      <geom name="shin" type="box" size=".03 .02 .2"/>
      <geom name="skate" type="capsule" fromto=".02 0 -.25 .1 0 -.25" size=".02"/>
    </body>
  </worldbody>

  <contact>
    <pair name="non-isotropic" geom1="floor" geom2="skate" condim="3" friction="0.1 1"/>
  </contact>
</mujoco>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Request for help or information
Projects
None yet
Development

No branches or pull requests

3 participants