Describe the bug
For gap terrains MeshGapTerrainCfg or any terrains that do not have floor at the bottom, the height scanner reading treats it like a high obstacle.
It is because the ray hits values are inf, then after clipping, the final reading will be a negative value, which is equivalent to a high box.
def height_scan(env: ManagerBasedEnv, sensor_cfg: SceneEntityCfg, offset: float = 0.5) -> torch.Tensor:
"""Height scan from the given sensor w.r.t. the sensor's frame.
The provided offset (Defaults to 0.5) is subtracted from the returned values.
"""
# extract the used quantities (to enable type-hinting)
sensor: RayCaster = env.scene.sensors[sensor_cfg.name]
# height scan: height = sensor_height - hit_point_z - offset
return sensor.data.pos_w[:, 2].unsqueeze(1) - sensor.data.ray_hits_w[..., 2] - offset
Steps to reproduce
- Create a terrain with MeshGapTerrainCfg (or any terrain with no floor below gaps)
- Configure a RayCaster height scanner with mesh_prim_paths=["/World/ground"]
- Observe height_scan output for rays that pass through gaps
- If clip range is set to (-1.5, 1.5), the clipped values will be -1.5 (same as a high wall), not +1.5 (deep drop)
System Info
Describe the characteristic of your environment:
- Commit: f4aa17f
- Isaac Sim Version: 5.1
- OS: Ubuntu 22.04
- GPU: RTX 4090
- CUDA: 12.8
- GPU Driver: 580.126.09
Checklist
Describe the bug
For gap terrains
MeshGapTerrainCfgor any terrains that do not have floor at the bottom, the height scanner reading treats it like a high obstacle.It is because the ray hits values are
inf, then after clipping, the final reading will be a negative value, which is equivalent to a high box.Steps to reproduce
System Info
Describe the characteristic of your environment:
Checklist