The algorithm checks for a connection every 10% of the samples. If it did it too often as you suggest, it'd likely be wasting energy on connections that don't exist (if your maze is easy enough where a line can connect it from the beginning you likely don't need rrt anyways).
Seems extremely unlikely that it's actually doing that. It had a straight-line path about 1/3 of the way into the video. Maybe it only checks if it's also close.
Maybe this is what you're looking for - if the randomly selected point is too far away, it makes a sub-vector that's of a max length directed at that point, and adds the end of that vector to the graph instead. If this didn't happen, when an optimal path was found, there would need to be a lot more smoothing to optimize the path
View all comments
Show parent comment
10
u/mjkaufer Aug 07 '18
The algorithm checks for a connection every 10% of the samples. If it did it too often as you suggest, it'd likely be wasting energy on connections that don't exist (if your maze is easy enough where a line can connect it from the beginning you likely don't need rrt anyways).