Comments (2)
Sounds good, I will create a PR soon for it.
from navigation2.
The planners generally shouldn't be all that long running of processes (Smac Hybrid-A* might be ~400ms in semi-normal large scale use-cases, but I suppose depending on parameterization it could increase more) where we felt that this might be an issue. But its true that especially if you're BOY-planner, then that planner could be, 5-10-20-N seconds long and we might want to kill that.
We do that right now in the Smac Planner and others with planning timeouts. The planner action API contains a timeout that if we exceed, the planner exits. Its different than a cancelation for sure, but helps a portion of this issue to make sure we don't plan indefinitely.
I'd be very open to an architectural update that would allow for the in-run preemption of planning algorithms based on cancellations.
Potential implementations could be either running planner in an async way and keep checking for isCancelRequested
That makes sense, basically pass in a function to the planning plugin's main request function who is a lambda that returns the bool value of the action server's is cancel requested API. We can check this on looping over the search or to other internal libraries that can take an external exit condition. I took a quick glance at a couple of the planners and I see where that could be used:
- https://github.com/ros-planning/navigation2/blob/main/nav2_smac_planner/src/a_star.cpp#L287-L295 either in the while condition or the if statement below it. Worth benchmarking performance changes in both locations to gauge it since perhaps running it every iteration in the
while
would be overkill. This would cover all Smac Planners all at once - Similarly in Theta* https://github.com/ros-planning/navigation2/blob/main/nav2_theta_star_planner/src/theta_star.cpp#L60
NavFn is a little trickier, but should also be possible in the same concept. This is something you'd be willing to take the lead on implementing and opening a PR? This seems like a good contribution for sure!
from navigation2.
Related Issues (20)
- SmacHybrid planner can crash to segmentation fault HOT 3
- 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
- the mechanism defect of `bt_action_server ->on_cleanup()` may lead to UAF HOT 8
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.