range-sensor-layer

Configure Nav2 RangeSensorLayer to integrate ultrasonic, IR, and ToF range sensors into costmaps.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/three1324/yeonjinautomotive --skill range-sensor-layer-three1324
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: range-sensor-layer
Source: https://github.com/three1324/yeonjinautomotive/tree/main/.claude/skills/range-sensor-layer
Command: npx skills add https://github.com/three1324/yeonjinautomotive --skill range-sensor-layer-three1324

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Lidar-based costmaps miss obstacles like glass panels, low objects below the lidar plane, and very close objects inside the lidar's minimum range. This Skill provides the configuration knowledge to integrate short-range sensors publishing sensor_msgs/Range messages into the Nav2 costmap so these obstacles are detected and marked. ## Core Features & Use Cases - Range Sensor Integration: Configure the nav2_costmap_2d::RangeSensorLayer plugin with topics, phi cone angles, and probabilistic mark/clear thresholds for VL53L0X, VL53L1X, HC-SR04, and Sharp IR sensors. - Parameter Tuning Guidance: Explains phi, inflate_cone, clear_threshold, mark_threshold, clear_on_max_reading, and no_readings_timeout with per-sensor recommended values. - Layer Combination Safety: Enforces combination_method: 1 (Maximum) so lidar raytracing does not erase range sensor obstacle marks. - Use Case: Detect a glass door that lidar passes through by placing a VL53L0X ToF sensor at glass height and adding a range_sensor_layer to the local costmap. ## Quick Start Configure a Nav2 range sensor layer for my three VL53L0X sensors publishing on /range/front_left, /range/front_right, and /range/rear.

Frequently Asked Questions about range-sensor-layer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add ultrasonic or ToF sensors to a Nav2 costmap?

Add the nav2_costmap_2d::RangeSensorLayer plugin to your costmap plugins list, set the topics array to your sensor_msgs/Range topics, and configure phi to match each sensor's beam width. Set combination_method to 1 so lidar data does not overwrite range marks.

What phi value should I use for VL53L0X range sensors?

Use phi of 0.087 radians (5 degrees) or narrower for VL53L0X time-of-flight sensors, since they have a very narrow beam. Setting phi too wide creates false-positive obstacle wedges in the costmap.

Why does lidar clear obstacles detected by my range sensors?

This happens when the lidar layer's raytracing passes through the range sensor's marked obstacle. Place range_sensor_layer after the voxel layer in the plugins list and set combination_method to 1 (Maximum) so range marks persist.

Can range sensors detect glass doors that lidar misses?

Yes. ToF and ultrasonic sensors detect glass that lidar beams pass through. Place the sensor at the glass panel height, enable clear_on_max_reading, and the range layer marks the glass as an obstacle in the local costmap.

Why do my range sensor obstacles never clear from the costmap?

Check that clear_on_max_reading is set to true and verify the sensor actually publishes its max_range value when nothing is detected. Also confirm the clear_threshold is not set so low that clearing requires unrealistically strong evidence.