Fix premature mission termination in mapless coverage navigation#1
Draft
Fix premature mission termination in mapless coverage navigation#1
Conversation
The coverage planner was treating all unknown costmap cells as unsafe, causing most targets to be rejected in mapless rolling-window navigation. This made the planner give up after exhausting its retry limit (8 attempts), prematurely ending the mission. Changes: - is_target_safe(): skip out-of-bounds neighbor cells instead of failing immediately; remove has_known_cells requirement so unknown space is treated as potentially free (correct for mapless navigation) - Enable move_base recovery behaviors for stuck situations - Increase costmap settling time from 1s to 3s before target generation - Refresh targets after clearing costmaps during retry - Add diagnostic logging for initial target census - Add unit tests for is_target_safe() covering unknown space, edge-of- costmap, and obstacle detection scenarios Co-authored-by: mtaruno <44710581+mtaruno@users.noreply.github.com>
…used args in test stubs Co-authored-by: mtaruno <44710581+mtaruno@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review navigation stack for waypoint issues
Fix premature mission termination in mapless coverage navigation
Mar 13, 2026
Owner
|
give me all the paramrters i can try tuning and an explanation of what the parameter is when testing. Do u think i shd just try to tune parameters and eventually it would run well? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
is_target_safe()treats unknown costmap cells as unsafe, which is wrong for mapless rolling-window navigation. Since most of the costmap starts unobserved (cost=-1), nearly all targets get rejected → retry limit exhausted → mission ends immediately without visiting any waypoints.is_target_safe()— core fixThe old logic had two problems:
Falseif any neighbor cell is out of the costmap grid (cost is None → return False)return has_known_cells), so targets in unobserved space always failThis is consistent with
NavfnROS/allow_unknown=truealready set in the launch config.Other changes
costmap_settle_timeparam (default 3s, was hardcoded 1s) — gives the lidar time to populate the rolling window before target generationrecovery_behavior_enabled=truein move_base so it can recover from stuck statesTests
14 unit tests for
is_target_safe(), target generation, and sweep ordering — runs without ROS via lightweight stubs.Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.