motion-planning / rrt-algorithms

n-dimensional RRT, RRT* (RRT-Star)
MIT License
600 stars 173 forks source link

Add RRTConnect algorithm and examples. #20

Closed tahsinkose closed 5 years ago

tahsinkose commented 5 years ago

Added RRTConnect algorithm proposed in this paper. It is suboptimal with respect to RRT* family, however much faster in higher dimensionality. Generally used for manipulator motion planning and other 6+ DOF robots.

I had implemented a version of it in C++ for my senior project in the last year. With the help of current codebase of this repository, conversion was very easy and intuitive.

SZanlongo commented 5 years ago

I'm wondering if we could reuse some existing functions like swap, unswap by inheriting from RRTStarBidirectional instead of RRTBase. Would that make sense, or do you think RRTConnect should just be standalone as it is in your current PR?

tahsinkose commented 5 years ago

I have thought the same thing. But current swap and unswap methods in RRTStarBidirectional also swaps start and goal. In RRTConnect, this is not necessary. And also this is not a RRT* variant since it does not make any optimizations on the path, which yields rewire useless. One possibility is to move swap functions to some RRTBidirectional base class and derive from it. In that case RRTStarBidirectional needs to be adjusted for multiple inheritance both from RRTStar and RRTBidirectional.

SZanlongo commented 5 years ago

Alright, then we'll just keep it as-is.