google-deepmind / mujoco

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

a question about abnormal and large fluctuations in contact force between ball and the jump #1620

Closed sanbens1234 closed 7 months ago

sanbens1234 commented 7 months ago

Hi,

I'm a student, tenghui wang. I'm trying to use MuJoCo for simulating a ball rolling on the slope and jumps.

I'm looking for some help with abnormal and large fluctuations in contact force between ball and the jump, see in fig. 2.

I have 2 questions. The first question is that at the junction of the geom “slope” and geom "jumps", the contact force is about 2000N(i.e. at the begining of the x-axis in fig.2), which is abnormally large. The secon question is that during the process of rolling on the jumps, the contact force varies largey( about ±200N, the gravity of ball about 670N). The second question might be caused by the discrete points of the hfiled, but i don't know how to improve it. Here is a model which explains my question:

minimal XML ```XML ```

since the file "generated_hfield.xml" is too long, i zip it as follows,

generated_hfield.zip

fig.1 the scene of the simulation 截图 2024-04-25 22-28-01

fig.2 the contact force Fz between geom"jumps" and geom "sph"

image
yuvaltassa commented 7 months ago

Not clear why you think they are "abnormally large". There is a corner at the beginning of your your slope geom, the ball hits the corner and you get a large force. In any case, looking at contact force magnitude in this situation is useless. This is a timestep-dependent quantity. You should be looking at the integral of the the impulse (force*dt). The actual size of the force is not something that can be judged to be small or large without knowing the time during which it was applied.