Skip to content

Ground Filtering (GNC)

Cone returns sit a few tens of centimetres above the track. A fixed world-zz threshold fails when the car pitches or rolls, or when ground height changes with range. Grace & Conrad (GnC) estimates a local ground line in each angular wedge from the LiDAR data alone (no IMU).

Points for one completed angular segment live in a range-binned buffer. For that wedge:

  1. In each non-empty range bin, take the minimum-zz return as a ground sample along that ray.
  2. Fit least squares of those zminz_{\min} values versus horizontal radius rr. Slope and intercept are the local ground line.
  3. Keep returns whose height zz lies in a band above that line:
zlow(r)=sloper+intercept+hlowzhigh(r)=sloper+intercept+hhigh\begin{aligned} z_{\text{low}}(r) &= \text{slope}\cdot r + \text{intercept} + h_{\text{low}} \\ z_{\text{high}}(r) &= \text{slope}\cdot r + \text{intercept} + h_{\text{high}} \end{aligned}

with hlow=h_{\text{low}} = height_threshold, hhigh=h_{\text{high}} = upper_height_threshold (mm inside the node; YAML is metres).

Below the band is treated as ground; above as non-cone structure (walls, people, noise). Filtering lags by two segments so an active wedge is not cut mid-fill. Remaining segments flush before DBSCAN at publish time.

ParameterTypical defaultNotes
height_threshold100 mmFloor of the keep-band above the fitted line
upper_height_threshold500 mmCeiling; should clear a cone (~325 mm)
NsegmentsN_{\text{segments}}, NbinsN_{\text{bins}}compile-timeHow local the ground fit is

Defaults live in driver params and compile-time grid constants.

SymptomLikely cause
/lidar/ground_filtered looks like raw groundBand too wide or fit failing (empty bins)
Cones missing at close range, far range okheight_threshold can clip cone bases nearby (FIXME in code)
Structure kept, cones goneupper_height_threshold too low, or cutoffs upstream

stream_processor.cpp::filter_out_ground. Related historical path: pcl_pipeline_cpp GraceAndConrad.

Next stage: DBSCAN. Driver overview: LiDAR driver.