Comments (3)
Thanks for quick response and the feedback! I will do this once I am back from my trip on Monday.
from navigation2.
I have been investigating this now for a bit. According to StackOverflow comment dereferencing the iterator returned by std::max_element when the input array is empty, can lead into segmentation fault. Running std::max_element(EmptyArray) returns EmptyArray.end(). I believe that is what happens in this case.
The C++ docs that I usually reference have some remark if that would be a problem that I see aren't listed there. But just being a sane person knowing STL, yeah your expectation there would align with mine. I think the documentation just had that case missing.
Can you adjust that to:
auto max_cost_it = std::max_element(node_costs.begin(), node_costs.end());
if (max_cost_it != node_costs.end() && *node_costs > max_cost) {
Does it go away? If so, submit a PR to main
and I'll merge + backport it to all the distributions. Thanks for the note, I agree with your analysis that this is the culprit - but as you point out - we shouldn't have been able to get here with that empty if all's well above.
For myself I fixed this by returning early in similar fashion as on line 186. Simple if (d < sqrt_2) return AnalyticExpansionNodes(); and that seems to be working fine for me.
You can add that too! Why not both, I practice defensive programming.
from navigation2.
Merging imminent
from navigation2.
Related Issues (20)
- Local costmap for robot with obstacles HOT 5
- Stop planner if the goal is cancelled HOT 2
- Jazzy Release TODO List
- how to change QoS of cost map easily? HOT 1
- No way of decreasing costmap costs over time? HOT 1
- SmacPlannerHybrid segfault HOT 2
- Robot drives near keepout zones, and stops when "incidentally" enters the keepout zone HOT 4
- resetObstacleHeuristic segfaults on goal not in costmap HOT 5
- Can MPPI follow the path with time stamps? HOT 7
- Bug in findPathFurthestReachedPoint() HOT 1
- user-misconfiguration may cause a heap-buffer-overflow bug in nav2_amcl HOT 8
- Problem with bt_navigator turning off when 2d goal pose in ros2 foxy version HOT 1
- Issue with Chinese paths while loading map configuration files HOT 1
- Incomplete closed subscriber `initial_pose_sub_` in `nav2_amcl` may cause use-after-free bug HOT 7
- Obstacle Avoidance Responsibility in Nav2 HOT 1
- Dynamic footprint support in collision monitor (humble) HOT 5
- Source build failing due to missing packages HOT 4
- MPPI generates undesirable paths HOT 3
- Mppi plugin running HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from navigation2.