Comments (9)
Q&A page is here: http://answers.ros.org/question/61720/move_base-cannot-cancel-while-executing-recovery-behavior/
from navigation.
Definitely a bug. The API will have to change to support this though. Currently the runBehavior call does its whole thing in one thread in the one function call, so there's no way to interrupt it.
I could give that function a return value ( boolean) which says whether it is done or not. Then the recovery behavior will need to have its loop opened up so it returns false after each cycle until it's done.
from navigation.
Is there some way to hack it by setting a global boolean variable for the behavior to check periodically, returning if it's set?
from navigation.
Well, we could always hack it, but I would love to avoid that.
Options I'm seeing so far:
- change RecoveryBehavior API so each RecoveryBehavior gets a pointer to a MoveBase object or a NodeHandle or even just a boolean that lets it query whether it has been cancelled.
- change RecoveryBehavior API so runBehavior() returns a boolean indicating "done" or "not done" and the docs are updated to indicated that every call to runBehavior() should take only a short (sub-second) amount of time. This may mean opening loops and implementing state machines to break up long-running recovery behavior functions.
- Leave the API the same, but run the RecoveryBehavior in a separate thread. When a pre-empt or cancel arrives and the behavior is still running, the thread gets killed. This "option" looks pretty dangerous and non-portable, based on my readings. On Windows you can get situations where the child thread is in the middle of allocating memory and it has a lock on that and then just dies, leaving the memory-allocation lock locked (!). Under Posix threads the situation is a bit better, but still pretty awkward.
- It is true that we could make a global variable which move_base would write to and which recovery behaviors could read from if they wanted. This is just a backwards-compatible way to change the API.
- API for RecoveryBehavior could have an added pair of functions:
bool isCancelled()
andsetIsCancelledCallback( boost::function<...> )
. Then MoveBase can call setIsCancelledCallback() on every recovery behavior at initialization, and recovery behavior implementers can add calls to isCancelled() at their leisure (when they run into this problem, most likely). This is another backwards-compatible way to change the API which does not involve a global variable. :)
So after typing all that out, my favorite is the last one.
from navigation.
My naive opinion: your last option looks good.
from navigation.
Sorry, I'm not familiar with RecoveryBehavior API, so I cannot have an informed opinion.
When do you plan to attack this issue?
from navigation.
Hello from 2017, Is there any solution implemented or available to fix this issue?
from navigation.
@Tutorgaming Hello from 2018! Did you ever find a way to work around this?
from navigation.
It seems that I disabled the original RecoveryBehavior and try to recover the robot outside the move_base. Everything works fine .
in the recovery behavior need to somehow connected to the move_base server
from navigation.
Related Issues (20)
- Global map HOT 1
- Global and local costmaps HOT 1
- DWA, TEB and DWB can not control with low acceleration HOT 1
- Trouble installing navigation / map-server HOT 4
- Problem installation from source, error: ros/package.h: No such file or directory HOT 2
- ryxen 9 5900hx or jetson orin for navigation stack? any recommendation which one would have better result? HOT 1
- MultiThreadedSpinner move base HOT 3
- Navnf capability on planning affected by the dimensions of the occupancy grid HOT 3
- discarded by cost function 1 with cost: -6.0 HOT 2
- local costmap with two inflation layers or inflation_radius HOT 1
- In A* algorithm, There seems to be a problem when putting neighboring nodes into heap
- [map server] Changing frame id HOT 1
- navigation/costmap_2d/plugins /static_layer.cpp StaticLayer::onInitialize can't return
- Amcl not working properly . HOT 3
- The robot stops suddenly at certain intervals
- Using Own Localization Method with Navigation HOT 1
- navfn (getPlanFromPotential or makePlan) is not using the last updated map form costmap_2d HOT 1
- Possibility of remapping tf publication of AMCL HOT 2
- The "global_planner/GlobalPlanner" plans paths through obstacles and unknown areas occasionally HOT 1
- #include error doesnt seem to be fixable 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 navigation.