yxyang/cajun

go1.urdf

Closed this issue · 3 comments

Hi Yuxiang,

Thanks a lot for opening source the wonderful project.

When I run src.controllers.centroidal_body_controller_example, I find that the vision and collision futures of the feet are unaligned. As shown here:
r_2

If I change the radius of the foot's sphere geometry to 0.04m, it seems that the contact point becomes correct as this figure shows:
r_4

But I can't still figure out the alignment problem of the visual geometry and the collision geometry. Could you please provide some potential solutions? Thanks a lot for your time~

yxyang commented

Hi, I'm aware of this alignment problem. I believe this issue is more or less related to the contact solver adopted in IsaacGym, which is (unfortunately) under-documented. I could be wrong, but most physics simulators I used in the past allow some form of soft penetration in contact solving. The relevant configuration is here. You can further check the IsaacGym documentations for more details.

For sim-to-real, I find that this misalignment in simulation is not causing significant problems for real robot transfer, especially given that the real robot has deformable feet as well.

Hi there,

I believe this behavior is due to the use_penetrating_contact flag in get_config() func in sim_config.py.
Does the reason behind this setup is to generate more precise contacts? @yxyang

The default values of these params and their description from isaac's doc are listed below:

# shapes whose distance is less than the sum of their contactOffset values will generate contacts
sim_params.physx.contact_offset = 0.02 # 0.02
# two shapes will come to rest at a distance equal to the sum of their restOffset values
sim_params.physx.rest_offset = 0.0

where they are set to 0.0 and -0.01 when use_penetrating_contact flag is set.

Thanks in advance!

@silvery107 I tuned the penetrating contact to better align simulation and real-world measurements. More specifically, when placing the robot at a fixed joint angle, I observe the robot to be a bit (~2cm) lower in the real world than in simulation. That was my initial rationale for penetrating contact.

This might not be the best solution for real-to-sim though, as the height measurement of the real robot depends on many things (e.g. state estimation). So I would recommend you to inspect further if you want a more precise real-to-sim alignment.