humanoid-path-planner / hpp-rbprm

"Implementation of RB-PRM planner using hpp."
5 stars 7 forks source link

Contact Generation: only sort the sample DB once #65

Closed pFernbach closed 4 years ago

pFernbach commented 4 years ago

Instead of sorting the limb->sampleContainer_ at each call to setCollisionFree, sort it when the Limb is first created.

The sorting comparator used here only care about the staticValue_ of each sample, which is constant once the database have been created so there is no need to sort it at each iteration.

pFernbach commented 4 years ago

Actually the sampleContainer is already sorted at creation and everytime where the StaticValue is changed, so I removed this sorting entirely.

I did not find any way to enter setCollisionFree() with a sampleContainer not already sorted, if I'm wrong you can close this PR.

stonneau commented 4 years ago

In such case should not we remove entirely the sort parameter ?

pFernbach commented 4 years ago

Yes probably I just kept it for potential future cases, but I do not really see when it could be used