Repository navigation
Replies: 2 comments
|
And I also set patch_radius = 0.8, but some sampled points still appear inside obstacles. From the visualization, you can clearly see yellow points located on top of obstacles. I tried adjusting this value to 0.9, 1.0, and so on, but none of these settings solved the issue. Unfortunately, I am unable to inspect the internal implementation of the flat_patch_sampling function to understand how its sampling logic works. This problem has been troubling me for quite a while. |
|
Both effects come from how Points on top of obstacles. A patch is accepted when its ring of query points is flat ( The fix is to restrict the height to the ground level. For this terrain the sub-terrain origin has z = 0, and "target": FlatPatchSamplingCfg(
num_patches=20000,
patch_radius=[0.2, 0.5, 0.8], # several rings, so the inside of the patch is checked as well
max_height_diff=0.05,
z_range=(-0.05, 0.05), # only the ground, not obstacle tops
),The ring is only checked on its circumference (10 points per radius, and the center is never probed), so a list of radii also catches thin obstacles that would otherwise fit between two ring points. Uneven density. The sampler is plain rejection sampling: every rejected patch is redrawn uniformly over the whole x/y range (L193-L194). The accepted points are therefore uniform over the valid area, and the valid area is the ground at least ~ I haven't run this exact config in Isaac Sim, but the behaviour follows directly from the code above. If this solves it, please mark it as the answer so others with the same problem can find it. |
Uh oh!
There was an error while loading. Please reload this page.
I am using flat_patch_sampling to collect obstacle-free points as initial positions for my robots. However, when visualizing these points in yellow, I found that their distribution across the map is extremely uneven—some areas contain a large number of points, while others have very few. This uneven distribution undermines my goal of having robots spawn randomly and uniformly across the terrain. Since I am using only a single sub-terrain, I am not sure what is causing the issue. Below is the code I used to generate the terrain. Any help or insight would be greatly appreciated!
All reactions