rdiankov / openrave

Open Robotics Automation Virtual Environment: An environment for testing, developing, and deploying robotics motion planning algorithms.
http://www.openrave.org
Other
693 stars 343 forks source link

Improve smooother2 time sampling #1266

Closed snozawa closed 1 year ago

snozawa commented 1 year ago

Summary

Detail

Puttichai commented 1 year ago

If the main motivation is to prevent unnecessary accumulation of failure counts due to the sampled t0 and t1 being too close to each other, I wonder what differences will be if we just continue to the next iteration without incrementing the iteration count (iters in Shortcut function).

snozawa commented 1 year ago

Thanks for your comment!

I think your comment is equivalent as follows:

git diff
diff --git a/plugins/rplanners/parabolicsmoother2.cpp b/plugins/rplanners/parabolicsmoother2.cpp
index 9c6eaaaf9..d275d9415 100644
--- a/plugins/rplanners/parabolicsmoother2.cpp
+++ b/plugins/rplanners/parabolicsmoother2.cpp
@@ -2565,6 +2565,8 @@ protected:
                 ++vShortcutStats[SS_TimeInstantsTooClose];
                 shortcutprogress << SS_TimeInstantsTooClose << "\n";
 #endif
+                iters--;
+                nItersFromPrevSuccessful--;
                 continue;
             }

I originally tried this, and yes, it's reasonable. But, in this PR, I try to compute the times directly, since:

rdiankov commented 1 year ago

worth a try, thanks~