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

[SDFormat->MJCF] Support //collision/surface #12

Open
azeey opened this issue May 4, 2022 · 5 comments
Open

[SDFormat->MJCF] Support //collision/surface #12

azeey opened this issue May 4, 2022 · 5 comments
Assignees

Comments

@azeey
Copy link
Collaborator

azeey commented May 4, 2022

We should be able to convert a subset of //collision/surface, such as friction and restitution properties. We should also document which elements are not supported.

@azeey azeey changed the title [SDFormat->MJCF] Support conversion for //colliison/surface [SDFormat->MJCF] Support //colliison/surface May 4, 2022
@scpeters
Copy link
Member

from mujoco documentation:

Recall that contacts can have up to 5 friction coefficients: two tangential, one torsional, two rolling. Each contact in mjData.contact actually has all 5 of them, even if condim is less than 6 and not all coefficients are used. In contrast, geoms have only 3 friction coefficients: tangential (same for both axes), torsional, rolling (same for both axes). Each of these 3D vectors of friction coefficients is expanded into a 5D vector of friction coefficients by replicating the tangetial and rolling components.

from SDFormat spec:

//collision/surface/friction parameters

  • //friction/ode/mu
  • //friction/ode/mu2
  • //friction/ode/fdir1
  • //friction/ode/fdir1/@ignition:expressed_in
  • //friction/ode/slip1
  • //friction/ode/slip2
  • //friction/torsional/coefficient

Most of the parameters in //friction are hidden in the //ode element and assume a friction pyramid with 2 friction directions. There is a long-standing issue to move the friction parameters out of that element: gazebosim/sdformat#31.

The torsional coefficient does have a reasonable specification, so it wouldn't need to change, and we could follow its pattern for rolling friction:

  • //friction/rolling/coefficient

We would eventually want to allow for anisotropic parameters for rolling friction (for example when used with a pyramid friction model), but that is not urgent for purposes of this project because MuJoCo does not support specifying anisotropic friction parameters for geometric shapes.

Another reference is the ODE API and Dartsim API.

@azeey azeey changed the title [SDFormat->MJCF] Support //colliison/surface [SDFormat->MJCF] Support //collision/surface May 10, 2022
@scpeters
Copy link
Member

So to summarize, in the short term we could do the following:

  • use existing friction parameters:
    • //friction/ode/mu
    • //friction/torsional/coefficient
  • add a new parameter:
    • //friction/rolling/coefficient

@scpeters
Copy link
Member

I've committed scpeters/sdformat@deccd47 to a branch with two competing parameters for rolling friction (pick one to use):

  • //surface/friction/rolling/deformation_length: units of length
  • //surface/friction/rolling/coefficient: non-dimensional, scaled by the size of the object

@scpeters
Copy link
Member

scpeters commented Jun 2, 2022

adding python bindings for sdf::Friction and sdf::ODE in gazebosim/sdformat#1036

@scpeters
Copy link
Member

scpeters commented Jun 9, 2022

setting sliding friction in #70

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

No branches or pull requests

2 participants