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)
- Hi, I am building the package of nav2_waypoint_follower and facing that errors, HOT 2
- New "Configure" transition for the LifecycleManager HOT 2
- Accessing waypoints inside a controller plugin HOT 3
- Fix flaky spin test
- Nav2 Stalling on Multiple Robots? HOT 9
- Robot using nav2 begins pathfollowing but never finishes HOT 3
- MPPI cannot follow global path accurately HOT 1
- [Collision_monitor] Approach polygon time=0 step is not processed HOT 7
- The lidar point cloud of NAV2 shifted significantly after being stationary for 5 minutes. HOT 5
- Errors with controller_server using GPS for Navigation HOT 4
- Obstacle Position Shift in Map after Loading HOT 2
- Full footprint collsion distance in MPPI obstacle critic and use of collision_margin_distance. HOT 12
- local_costmap does not respect the use_sim_time parameter HOT 12
- Vector polygon - Collision Monitor is not available for ROS2 humble HOT 5
- [collision_monitor] Add temporal axis to min_points behavior HOT 2
- [ERROR] [1716697697.080277840] [rviz2]: Lookup would require extrapolation into the future. Requested time 1716697697.040514 but the latest data is at time 1716697697.039929, when looking up transform from frame [laser_frame] to frame [odom]
- Laser Scan rotates with robot ------- [ERROR] [1716697697.080277840] [rviz2]: Lookup would require extrapolation into the future. Requested time 1716697697.040514 but the latest data is at time 1716697697.039929, when looking up transform from frame [laser_frame] to frame [odom] HOT 1
- [for help] action `follow_path` doesn't work (humble) HOT 7
- Changing the params file HOT 1
- Understand MPPI Critics and parameters 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.