path_planner icon indicating copy to clipboard operation
path_planner copied to clipboard

A minor error in smoother.cpp isCusp function?

Open JaimeParker opened this issue 2 years ago • 0 comments

inline bool isCusp(const std::vector<Node3D>& path, int i) {
    // the author 
    bool revim2 = path[i - 2].getPrim() > 3 ;
    bool revim1 = path[i - 1].getPrim() > 3 ;
    bool revi   = path[i].getPrim() > 3 ;
    bool revip1 = path[i + 1].getPrim() > 3 ;
    //  bool revip2 = path[i + 2].getPrim() > 3 ;

    return (revim2 != revim1 || revim1 != revi || revi != revip1);
}

considering change >3 to >=3 to refer a reverse motion, which is called a cusp point?

JaimeParker avatar Apr 26 '23 03:04 JaimeParker