Вопрос о функции «упростить» в ompl/src/ompl/geometric/src/PathSimplifier.cpp
У меня есть вопрос о следующей части в функцииsimplify
:
// try a randomized step of connecting vertices
if (ptc == false || atLeastOnce)
tryMore = reduceVertices(path);
// try to collapse close-by vertices
if (ptc == false || atLeastOnce)
collapseCloseVertices(path);
// try to reduce verices some more, if there is any point in doing so
unsigned int times = 0;
while ((ptc == false || atLeastOnce) && tryMore && ++times <= 5)
tryMore = reduceVertices(path);
Мой вопрос в том, почему мы разделяем использование функции на две части? Не могли бы мы просто использоватьcollapseCloseVertices
сначала упростить путь, потом запуститьreduceVertices
в петле?