Fix seg fault in smac planner smoother when checking expansion #6645
if (!costmap->worldToMap(x, y, mx, my) ||
static_cast<float>(costmap->getCost(mx, my)) >= INSCRIBED_COST)
{
expansion.in_collision = true;
}
Could you also check if the CI test failure is related to this PR? https://app.circleci.com/pipelines/github/ros-navigation/navigation2/20481/workflows/e80722eb-029a-447e-967e-6f7b43a76d05/jobs/65556
Could you also check if the CI test failure is related to this PR? https://app.circleci.com/pipelines/github/ros-navigation/navigation2/20481/workflows/e80722eb-029a-447e-967e-6f7b43a76d05/jobs/65556
Looks like it's using navfn planner when it fails. I did a brief trace through the test code and it looks like it's failing based on an interpolation mismatch. navfn allows returns from calcPath that are fractional (e.g 8.9, 88.1). The test_planner_random_node rounds to nearest discrete cell so it seems like a mismatch of what the test expects vs what navfn planner is capable of. That's my interpretation at least. I don't think it's related to this PR.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| nav2\_smac\_planner/src/smoother.cpp | 96.98% <100.00%> (ø) | |
... and 10 files with indirect coverage changes
<details><summary> :rocket: New features to boost your workflow: </summary>
</details>
Please sign off with DCO and I can merge :-)
Sorry, I'm not sure why your update didnt' hit my notifications tray to re-review. Approved!
SteveMacenski
bkrodinger
---
Basic Info
| Info | Please fill out this column |
| ------ | ----------- |
| Ticket(s) this addresses | |
| Primary OS tested on | Ubuntu Container |
| Robotic platform tested on | on-machine |
| Does this PR contain AI generated software? | No |
| Was this PR description generated by AI software? | No |
---
Description of contribution in a few bullet points
Fix out of bounds read from collision checking when x and y values are not valid and the worldToMap function returns false. New functionality: expansion will say it's in collision when the world ToMap function returns false
Description of documentation updates required from your changes
Description of how this change was tested
10 hours on robot
---
Future work that may be required in bullet points
For Maintainers: <!-- DO NOT EDIT OR REMOVE -->
backport-*.