fix: NavFn worldToMap and plan through cell centers for Navfn, Smac2D #6695
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 370 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.354
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6695"
general
weight: 0.35
mini-1235
---
Basic Info
| Info | Please fill out this column |
| ------ | ----------- |
| Ticket(s) this addresses | (add tickets here #1) |
| Primary OS tested on | (Ubuntu, MacOS, Windows) |
| Robotic platform tested on | (Steve's Robot, gazebo simulation of Tally, hardware turtlebot) |
| Does this PR contain AI generated software? | (testcase was written by ai, it fails without the fix and passes with the fix) |
| Was this PR description generated by AI software? | No |
---
Description of contribution in a few bullet points
NavfnPlanner::worldToMap rounds while Costmap2D::worldToMap truncates, so the NavFn start cell can be the diagonal neighbour of the actual robot's costmap cell. When robot is going close to inscribbed cells it gets stuck sometimes because planner cannot find path because for the planner, the start is surrounded by 4 inscribed cells.
<img width="965" height="696" alt="image" src="https://github.com/user-attachments/assets/a908dfea-a932-42b7-8ff3-af4c92f9eb40" />
Moreover, the path was going through cell corners instead of cell center.
<!-- Please fill out the following pull request template for non-trivial changes to help us process your PR faster and more efficiently.-->
<!--
I added this neat new feature
Also fixed a typo in a parameter name in nav2_costmap_2d
-->
Description of documentation updates required from your changes
<!--
Added new parameter, so need to add that to default configs and documentation page
I added some capabilities, need to document them
-->
Description of how this change was tested
<!--
I wrote unit tests that cover 90%+ of changes and extensively tested on my physical robot platform in production for 1 week
I wrote unit tests and tested in simulation for 10 minutes
Performed linting validation using pre-commit run --all or colcon test
-->
---
Future work that may be required in bullet points
<!--
I think there might be some optimizations to be made from STL vector
I see a lot of redundancy in this package, we might want to add a function
bool XYZ()to reduce clutterI tested on a differential drive robot, but there might be issues turning near corners on an omnidirectional platform
-->
For Maintainers: <!-- DO NOT EDIT OR REMOVE -->
backport-*.