Your Cart

The Go-To Supermarket for Affordable LiDAR Sensors!

Email:info@lidarstar.com

Generic bench-mounted LiDAR observing a matte box in an empty test room

Nav2 Obstacles Remain After They Move: A LiDAR Clearing Diagnostic

If a Nav2 costmap still shows a LiDAR obstacle after the object moves away, first inspect the observation and clearing path. Marking a cell occupied and obtaining evidence to clear it are different operations. Enlarging the inflation radius changes surrounding costs; it does not supply a missing clearing observation.

Use a stationary platform and a controlled box-removal test. Compare the raw sensor stream, transformed observations, individual layers where available, and the final costmap over the same interval. This separates a stale input, an unsuitable clearing ray, and a cell retained by another layer before you change several parameters together.

The broader robotics integration guide addresses frames and operating environments. Here the objective is narrower: prove which stage leaves the old obstacle in the map. Keep the robot immobilized according to its test procedure while investigating costmap behavior.

Generic LiDAR on a stable bench facing a matte cardboard box in an empty test area
Generated editorial illustration of a controlled obstacle observation test, not a recorded navigation result.

Identify the map and the layer holding the cell

Record the ROS distribution, Nav2 package versions, local or global costmap identity, configured frame, plugin list, observation sources, and effective parameters. A visualization can show several overlapping topics. Confirm that the displayed obstacle belongs to the costmap you are testing rather than a static occupancy map or an old display message.

The Nav2 Jazzy obstacle-layer documentation distinguishes source marking and clearing settings. Inspect those settings for the actual source namespace. A valid stream used only for marking can add occupied cells without furnishing that source’s clearing observations.

Do not expect every layer to respond identically. A static layer can contribute occupancy independently of the live sensor layer, and layer combination can retain a cost in the master map. If the obstacle layer changes but the final map does not, inspect the other contributors and their configuration before blaming LiDAR reception.

Verify that fresh observations reach the consumer

Watch message stamps and receipt behavior before adjusting raytrace ranges. Confirm that new messages continue after the box is removed, that their frame IDs are correct, and that transforms are available for the relevant acquisition times. A clear point cloud in a viewer does not establish that the costmap subscription received and transformed the same data.

If the costmap receives nothing while another subscriber works, check endpoint compatibility using the ROS 2 LiDAR QoS diagnostic. Resolve the subscription boundary first. An average topic rate also hides interruptions, so retain the actual interval around object removal.

Separate cloud freshness from display freshness. The publish-rate troubleshooting procedure distinguishes driver output and consumer reception. A frozen display can look like stale occupancy even when the underlying map is changing; preserve costmap messages or another independent observation to test that possibility.

Check the clearing geometry rather than only detection range

A marking return shows an occupied endpoint. Clearing requires a usable observation whose ray traverses cells that should become free. After removing the box, ask whether the sensor has a valid return beyond its former position, or whether the driver emits a supported no-return representation. Physical removal alone is not a measurement of free space.

The Nav2 Jazzy voxel-layer reference lists separate obstacle and raytracing ranges, source height filtering, and marking/clearing controls. Check the effective values against the test geometry. A point visible in the raw cloud may be excluded from the observation used by the layer.

Observed behavior Next evidence to inspect Possible boundary
No new sensor messages after removal Stamps, reception, and transforms Input freshness rather than clearing geometry
New messages but no ray beyond the old box Returns, filtering, and supported no-return handling No evidence that the old cells are free
Valid farther returns, cell remains in sensor layer Source clearing flag and raytrace limits Observation or layer configuration
Sensor layer clears, master map remains occupied Static and other contributing layers Map combination or another occupancy source
Costmap clears, displayed obstacle remains Displayed topic and update stamps Visualization or a different map

Keep the test box within a documented useful sensor region. Avoid shiny surfaces, transparent objects, and occlusion in the first baseline. Once clearing works in that simple case, add the application’s difficult materials and angles as separate tests. This preserves a clear explanation of which condition changes the outcome.

Distinguish no return from a valid clearing observation

The ROS 2 LaserScan definition specifies range units and valid range bounds. Its contract does not mean every value outside those bounds is automatically evidence of free space. Inspect both the driver’s encoding and the receiving layer’s treatment of that encoding.

For the documented LaserScan path, inf_is_valid relates specifically to handling infinite scan returns. It is not a general instruction to interpret arbitrary NaNs or missing PointCloud2 points as free space. Do not enable it merely because a cloud is empty; establish the message type and supported semantics first.

A PointCloud2 stream that contains only measured obstacle points can become sparse after removal. Whether it provides useful clearing endpoints depends on the driver and preprocessing path. Compare the actual post-removal points with the sensor origin and old cell location. Keep a note of conversions from a 3D cloud to a planar scan, because filtering can change what the consumer sees.

Empty matte-floor test area behind a supported generic LiDAR after a box has been removed
Generated illustrative removal-test scene; no clearing latency or safety performance is represented.

Inspect retained observations and inflated costs

Review observation_persistence alongside source freshness. Retained historical observations can affect what the layer processes after the scene changes. The Jazzy observation-buffer implementation provides the version-specific reference for buffering and stale-observation handling. Compare your installed version rather than guessing units from a parameter name.

The inflation-layer documentation describes costs around obstacles. Inspect the underlying occupied cell before changing the surrounding gradient. Reducing or widening that gradient can change the visual appearance while leaving the original source of occupancy unresolved.

Do not count a manual costmap reset as proof of automatic clearing. A reset is a different operation; a remaining marking source can add the cell again. Preserve a run without manual resets to observe the complete natural sequence from box detection through removal.

Run a reproducible place-and-remove experiment

Keep the sensor and platform stationary. Save the initial configuration and empty-scene messages, then place a matte box at a measured position within the intended observation region. Record when the sensor detects it and when the selected layer and master map change. Move the box away only while the platform is safely immobilized.

After removal, retain the raw stream and costmap output until the system’s predefined test interval ends. Document the farther returns or supported no-return observations, relevant stamps, transform availability, and cell behavior. Repeat without changing configuration. Then change one justified parameter and run the same sequence again.

The dynamic-obstacle test guide gives broader route-testing context. Keep that later qualification separate from this stationary layer diagnostic. Successful clearing in a box test does not establish a robot’s stopping behavior around people.

Save a handoff record containing the map identity, source settings, plugin versions, raw and map recordings, object position, removal time, and before-and-after observations. Use the reference-run and change-control approach when repeating the test after a driver or configuration update.

Frequently asked questions

Why can a visible LiDAR return mark but not clear?

Marking and clearing are separately configured, and their ranges or filtering may differ. Verify the source settings and the geometry of a post-removal ray.

Should I increase the inflation radius?

Inspect the occupied source cell first. Inflation adjusts nearby costs; it cannot replace missing clearing evidence.

Does an empty cloud prove the area is free?

No. Missing points can result from filtering, loss, or absent valid returns. Establish the driver’s meaning and the consumer’s supported clearing path.

What is the most useful first test?

A stationary, repeated matte-box place-and-remove sequence with synchronized raw-sensor and costmap evidence. It makes the failing boundary easier to identify before route testing.

Leave a Reply

Your email address will not be published. Required fields are marked *

Product Enquiry