lucys0 / awe

Waypoint-Based Imitation Learning for Robotic Manipulation
https://lucys0.github.io/awe/
73 stars 7 forks source link

What will happen when calling min_waypoints(1)? #1

Closed StarCycle closed 9 months ago

StarCycle commented 9 months ago

https://github.com/lucys0/awe/blob/794ccd4deaf5f7c5a4c5b7b6a187e9f0da81be15/waypoint_extraction/extract_waypoints.py#L325-L327

Hello, I am wondering what will happen when calling min_waypoints(i) when i == 1. It seems that the function will return nothing...

That means, if the error threshold is too small, the algorithm will fail to return a trajectory (we observe it in our experiment).

lucys0 commented 9 months ago

Hi,

Thanks for pointing this out! We have fixed the issue in the latest commit by adding an additional check on the error threshold. Now, it should return all points as waypoints if the threshold is excessively low.

We apologize for the inconvenience. We tested on very low error thresholds to ensure that the algorithm would return more than half of the points as waypoints, but we probably didn't stress test it enough... Again, thanks for catching this!

P.S. In practice, you would not want to choose a threshold so low that every point gets selected. A rule of thumb for us is to pick a threshold that selects about 1:8 points as waypoints; however, this is task- and environment- dependent of course.

StarCycle commented 9 months ago

Hello Lucy,

Thank you for the update!

btw, you delete the recursive version of dynamic programming in the code, which seems to be the algorithm in your paper. Is the non-recursive version better?

Kind regards, Zhuoheng

lucys0 commented 9 months ago

Hi Zhuoheng,

The version I removed is a legacy implementation of DP (you may have noticed a comment "backlog" in its header). We actually call the iterative implementation of DP, which is conceptually the same but faster than the recursive version (by pre-computing the result of all recursive calls). I removed it since this legacy version seemed to cause confusion.

Best, Lucy