google-deepmind / mujoco

Multi-Joint dynamics with Contact. A general purpose physics simulator.
https://mujoco.org
Apache License 2.0
7.47k stars 734 forks source link

More help needed on how to specify the parameters for the contact model, or how to use customized contact model #1741

Open ghweili opened 1 week ago

ghweili commented 1 week ago

This issue is related to my previous question in #1739, which was closed yesterday. This new issue is opened because my questions raised in #1739 haven't been fully addressed. Below are the new comments I recently added to #1739 (subject to some revisions to facilitate reading), which is reproduced below for quick reference:

  1. Is there a formula or some general (rough) rules on how to specify the parameters within solimp and solref based on those physical properties with clear units---stiffness (N/m), damping (Ns/m), and penetration depth (m) ?

    From my experience, stiffness (N/m), damping (Ns/m), and penetration depth (m) are used in most cases and are often available in the literature. Moreover, these parameters should be generally sufficient to characterize the collision process, because these parameters are used by many software, including ADAMS. As a result, offering a way to convert these physical quantities to the parameters within solimp and solref would be quite useful, especially in the preliminary stage of a design job.

    Currently, I have no clue on how to set the parameters of solimp and solref, even if I have the aforementioned physical quantities at hand---stiffness (N/m), damping (Ns/m), and penetration depth (m) .

  2. I learnt from various sources that "MuJoCo normalizes by the contact inertia (inertia projected into the contact frame), so different masses have no effect on contact kinematics.". I suspect that the contact inertia would change when the robot configuration changes, right? If so, does this mean that one has to update the parameters for solimp and solref manually? If so, how can the users determine their values? If not, it seems that one still can't directly specify the two parameters of solref as the physical properties stiffness (N/m) and damping (Ns/m) directly; otherwise, cubes with different masses falling onto the ground from the same height would behave the same, which contradicts reality. So what can we do if we want to achieve realistic behavior?

    Please be advised that we have conducted several tests using ADAMS and Mathematica, which indicates that the collision process should indeed be affected by mass---see the explanation and figures in #1739 for more details.

  3. I was suggested by @yuvaltassa to get the parameters for solref and solimp based on system identification. However, it seems that one has to develop a physical prototype first in this case. If so, this would be quite inconvenient when one is doing optimal design in Mujoco, as no physical prototypes are available yet. It is even more inconvenient for my case, because the contact parameters are also something that I want to optimize after conducting numerous simulations in Mujoco. Such a dmand is probably needed in other scenarios where the robot's performance highly depends on the contact parameters, and one may want to optimize these parameters (such as hopping robots, throwable robots, moon landers, grasping hand, and robotic machining/assembling operations).

  4. If one has no choice but to do system identification to get a rough value for the parameters for solimp and solref, what parameters are to be identified, and how? Are there any references for this?

  5. Personally, I think that offering an approach to use user defined models for the contact would be the most convenient and advantageous way to solve all the issues mentioned above.