Skip to content

5. Perception: the sector scans ​

lidar_sector_node (navigation host, on Deep Robotics’ own LiDAR driver there) turns every LiDAR cloud into two sector scans: the range of the nearest obstacle in each angular sector around the robot.

ScanSectorsRead by
perception/safety_scan72 over 360°, 0.1 m–4 mthe protective field and the follower’s guard
perception/sector_scan32 over 180° ahead, 0.1 m–8 mreactive avoidance

5.1 Which points are obstacles ​

Each cloud goes through four filters before it is binned:

  1. Noise: Livox tags every point with its confidence. Adhesion points (bits 0–1, the glue of two surfaces) and particle points (bits 2–3: rain, dust) at the confidence of noise_level are dropped.

  2. Self: points inside the footprint grown by self_margin are the robot.

  3. Levelling: the cloud is rotated by the base’s roll and pitch (from odom, TF), so heights count from the floor even while the body pitches in its gait. Without a recent roll and pitch (tilt_max_age) every sector is BLOCKED: an unlevelled cloud could put the floor in the band.

  4. Height band: only points between height_min (0.10 m) and height_max (1.60 m) above the floor are obstacles. With ground_segmentation the floor height is estimated per ground_cell first, for ramps and uneven yards.

5.1.1 Binning ​

A sector’s range is its k-th nearest point (k = 2): one stray return never blocks a sector, and a sector needs k points to count. Beyond range_max a sector is free; a non-finite or blocked range is treated by every consumer as an obstacle at the robot.

5.2 A blind LiDAR ​

A covered window, a failed sensor or heavy rain empties the cloud. Fewer than min_points (100) valid points in a cloud, or with regions and min_region_points fewer than the minimum in any azimuth region, make the cloud blind: every sector BLOCKED, the field in its BLIND state (Section 4.3). No cloud for timeout_sec does the same.

A partly covered sensor

min_region_points catches what the total count misses: a bag on one side of the robot leaves enough points overall. To find the normal count, set min_region_points very high for a moment at the site: the warning scans BLOCKED ... N points in region k names the weakest region’s count. Then set the minimum at a third of it (a start-only parameter: restart).

5.3 The near-field blind zone ​

A LiDAR sees nothing below its lowest beam. With the sensor at height H above the floor and its steepest beam δ below the horizontal, an object of height h disappears from the cloud once it is closer than

(5.1)r(h)=H−htan⁡δ

The robot walking toward a low obstacle sees it from afar, then loses it right where it matters. The obstacle memory keeps every obstacle cell in the odom frame for memory_sec (10 s) and adds it back to the scans while it is below the view, within radius. The model takes H from base_height and the LiDAR’s mount (lidar_pose), and δ from lower_fov_deg and the mount’s tilt.

blind radius r(h) for an object of height
Lowest beam δ0.10 m0.20 m0.30 m
7° (Mid-360, level)3.1 m2.3 m1.5 m
30°0.66 m0.48 m0.31 m

(H=0.48m, the sensor at base_link height.) The X30’s downward LiDARs see much closer than a level sensor: set lower_fov_deg to the steepest beam of the cloud the node reads, and check with a box of the height of height_min that the scan keeps it while the robot walks up to it.

The memory forgets on a jump

An odometry jump larger than the motion (max_jump) clears the memory: remembered cells would land in the wrong place. A restarted odometry does the same.

5.4 Motion smear ​

The Livox accumulates a cloud over T=0.1s while the robot moves. The cloud is read as it arrives, so a point measured at the start of the sweep is off by up to

(5.2)Δ≈vT+ωTr

for a point at range r: 7.5 cm straight ahead at 0.75 m/s, 14 cm at 2 m while walking at 0.5 m/s and turning at 0.45 rad/s. The protective field’s margin and the guard’s lateral_margin must cover it. To remove it instead, read FAST-LIO’s undistorted cloud (input.type: pointcloud2, input.pointcloud_topic: /cloud_registered_body) with its frame in TF; it arrives one LIO step later.

5.5 Tuning the band ​

  • height_min above the floor’s unevenness and the gravel, below the lowest thing that can trip the robot. Points of a slope rise into the band: enable ground_segmentation on ramps rather than raise the bottom.
  • height_max above the highest part of the robot with its payload (the PTZ camera on its mast): anything lower that hangs over the route must be seen.
  • range_max (safety) at least the field’s distance at full speed plus the footprint: 1.62 m + 0.50 m for the X30; 4 m leaves room.
  • num_sectors 72 gives 5° sectors: at 2 m a sector is 17 cm wide. More sectors resolve a narrow gap better and need more points each.