Fix AIT*/EIT* not respecting termination condition when there are no valid samples #1195
+7
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, both the AIT* and EIT* are initializing their Informed State Samplers' maxNumberCalls with
std::numeric_limits<unsigned int>::max(). The maxNumberCalls will determine the maximum number of tries the sampler will do to find a valid sample. So currently, if for some reason the sampler cannot find a valid sample (maybe because a PHS is way smaller than the full sampling space), it will try at moststd::numeric_limits<unsigned int>::max()(~4.3 billion) times before returning to the planner. (In my experiments, I had a moveit plan taking 1000s when the maximum planning time was set to 50s)As this value was already hard coded, I simply changed the value to 100, mainly because this is the default value used by RRT*. (Should this be exposed with a getter and a setter like RRT*?)
It would be better if the samplers also respected the termination conditions, but this change would require changing the ABI in a lot of places.