-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: fix asymptotically infinite loop with Dichotomy #334
base: devel
Are you sure you want to change the base?
Conversation
Thank you for opening this issue. The problem is well explained in https://laas.hal.science/hal-04056297v1 Section IV.C. With your proposition, what will happen if a path is tested as valid and later on as invalid in trajectory optimization, will it be detected and reported as a failure ? |
With the current implementation, the only problem I see is when the path passed as input to optimization is invalid. The following strategy would work:
This should ensure that the path will never be considered invalid at optimization time if it has been considered valid at planning time. Going into numerical values, this could be |
I understand security margin and break distance, but can you recall what lower bound threshold stands for ? |
From an implementation point of view, should we
|
distanceLowerBound = result.distance_lower_bound; | ||
assert(distanceLowerBound > 0); | ||
} | ||
} | ||
if (distanceLowerBound < 0.001) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lower bound threshold is this 0.001 in this draft PR. It would be made modifiable if the principle is accepted.
d2979ac
to
91311af
Compare
32a6347
to
331d123
Compare
for more information, see https://pre-commit.ci
@florent-lamiraux could you have another look at this? For dichotomy, I redirected the constructor parameter to the new distance threshold. The parameter has to be negative as it is the opposite of the tolerance. I'm thinking to rename the distance lower bound threshold in distance threshold since it is expected that the threshold is lower than the break distance and so that the distance lower bound equals the actual distance. Apart from this, the current method does not change the current behavior by default. I think this is sufficient for a first version since it is not clear how to automatically integrate it into the overall pipeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call the threshold distance_uncertainty
since it corresponds to the range of distance in which the result is uncertain.
Can you also update the documentation of the function contructors (and more if relevant) ?
For a reason that does not seem related to this PR, I got some compilations errors that I fixed with the following patch
|
In this draft PR, I add a test case that reproduce the asymptotically infinite loop in continuous path validation by dichotomy. The test simple most a sphere next to a box along a straight line. The min distance below is the true minimal distance between the two objects during the path.
In the table below, I report the number of iterations of the validation algo. The 0.00101 and 0.00099 are values close to the hard-coded 0.001 in the code. I can make the number of iteration increase (arbitrarily?) by reducing 1e-6.
I'm opening this as a draft PR as I'm not 100% sure we want this. For Dichotomy, we could use the parameter passed to the constructor as a distance lower bound threshold (making sure the break distance is larger). This means that a valid path with a minimal distance smaller than this threshold may or may not be considered invalid (depending on whether the path is evaluated at a given time).
In the context of gradient based optimization, it is problematic if the input path, assumed to be valid turns out not to be. However,