Skip to content

[Bug Report] Misleading height scanner reading on gap terrains (Missed rays read as tall obstacles) #5137

@Wang-Haitong

Description

@Wang-Haitong

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

  • I have checked that there is no similar issue in the repo (required)
  • I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions