Add mjContact.solreffriction, mjModel.pair_solreffriction and related implementation, allowing contact reference acceleration to be different for normal and frictional contact directions. This is required for e.g. elastic frictional collisions.
PiperOrigin-RevId: 538513357 Change-Id: Id9eb910fe791cf898c712030cb2c0fc481389c91
This commit is contained in:
committed by
Copybara-Service
parent
83e70954d7
commit
d82f5ce5a4
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
<mujoco>
|
||||
<option cone="elliptic" timestep="1e-4" integrator="implicitfast"/>
|
||||
|
||||
<visual>
|
||||
<global elevation="0"/>
|
||||
</visual>
|
||||
|
||||
<asset>
|
||||
<texture name="grid" type="2d" builtin="checker" rgb1=".1 .2 .3" rgb2=".2 .3 .4" width="300" height="300"/>
|
||||
<material name="grid" texture="grid" texrepeat="8 8" reflectance=".2"/>
|
||||
<texture name="ball" type="cube" builtin="checker" rgb1=".3 .3 .3" rgb2="1 1 1" width="300" height="300"/>
|
||||
<material name="ball" texture="ball" texrepeat="8 8"/>
|
||||
</asset>
|
||||
|
||||
<worldbody>
|
||||
<geom name="floor" size=".2 .2 .01" type="plane" material="grid"/>
|
||||
<geom name="wall" size=".2 .2 .01" type="plane" material="grid" pos=".2 0 .2" zaxis="-1 0 0"/>
|
||||
<light pos="0 0 .6"/>
|
||||
<light pos="-.6 0 .6" dir="1 0 -1"/>
|
||||
<body name="ball" pos="-.1 0 .2">
|
||||
<freejoint/>
|
||||
<geom name="ball" type="sphere" size=".02" material="ball" mass=".001"/>
|
||||
<body name="ballast">
|
||||
<joint type="ball" stiffness="0.1" damping=".0001"/>
|
||||
<geom name="ballast" type="sphere" size=".02" contype="0" conaffinity="0" mass=".01" group="3"/>
|
||||
</body>
|
||||
</body>
|
||||
</worldbody>
|
||||
|
||||
<default>
|
||||
<pair solref="-100000 0" solreffriction="0 -10000"/>
|
||||
</default>
|
||||
|
||||
<contact>
|
||||
<pair geom1="floor" geom2="ball"/>
|
||||
<pair geom1="wall" geom2="ball"/>
|
||||
</contact>
|
||||
|
||||
<keyframe>
|
||||
<key name="throw" qvel="1.3 0 0 0 0 0 0 0 0"/>
|
||||
</keyframe>
|
||||
</mujoco>
|
||||
Reference in New Issue
Block a user