Search code examples
algorithmrandommotion-planning

RRT algorithm in c++


I want to implement RRT for motion planning of a robotic arm. I searched a lot on the internet to get some sample code of RRT for motion planning, but I didn't get any. Can someone please suggest a good source where I can find RRT implemented in C++ for any type of motion planning.


Solution

  • Basic RRT algorithm (with uniform sampling) is simple and not very usefull on its own, that is why you don't see it often implemented as a standalone algorithms in libraries.

    Generally every motion planning libraries will also include the RRT implementation as well. My random-tree based optimization library also includes RRT as its base class (which also supports decaying step length and uses KD-tree for nearest neighbor search) here.

    The other good libraries are Sertac Karaman's RRT* (also includes RRT and also supports collision detection) and Kavaraki's implementation.

    If you just want the Vanilla RRT, here is the classic RRT code from Steve Lavalle that started all of this.