Endless loop issue in nonlinear_time_of_impact_support_map_support_map #369
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.
Hey guys, did anyone ever have had problems with query::nonlinear_time_of_impact hanging and never returning? I am able to reproduce it for two Cuboids with simple ConstantLinearVelocityRigidMotion. I dug into it a bit and it seems that the loop in nonlinear_time_of_impact_support_map_support_map_with_closest_points_function never gets broken out of.
In my test case this happens when two cuboids travel in the same direction with the same speed so that they will never meet. This constantly triggers this branch of if-else condition in the loop:
which was supposed to increase min_t until it reached required threshold few lines below:
Unfortunately at some point (result.toi + max_t) * _0_5 stops increasing and it converges to a a value that is lower then max_t - abs_tol