Is there a bug in the simulation when updating net_contact_force_tensor?

When I set “Substeps” to 4, the simulation environment sometimes can’t detect contact force, even if a contact has happened. I have refreshed the net contact_force_tensor every step and checked it out carefully. As long as I set “Substeps” to 1, the contact force can be detected normally, but it can’t fulfill my requirement.

2 Likes

Hi,

Please check your setting for contact collection mode, which should be CC_ALL_SUBSTEPS to collect forces for all substeps.

1 Like

Thank you!

Actually i faced this problem too, I’m using the contact force on the root body as a termination criteria, when the training starts it can detect contact forces correctly but after a 10 iterations it can’t detect contact forces correctly anymore, while all the robots in the sim are is obviously touching the floor no contact force is detected, I have tested most of the parameters including CC_ALL_SUBSTEPS:
contact_offset = 0.001 # [m]
rest_offset = 0.0 # [m]
bounce_threshold_velocity = 0.5 #0.5 [m/s]
max_depenetration_velocity = 1.0
max_gpu_contact_pairs = 223 #224 → needed for 8000 envs and more
default_buffer_size_multiplier = 5
contact_collection = 2 # 0: never, 1: last sub-step, 2: all sub-steps (default=2)
I there any other parameter involved in contact force detection?

Thanks