diff --git a/src/graph/helper.cc b/src/graph/helper.cc index bf40b21acaeb7b03cb0790eca4f1b2024785162e..5a97b8d112c83212e51e61ad03fcee2abbc96eb8 100644 --- a/src/graph/helper.cc +++ b/src/graph/helper.cc @@ -116,8 +116,15 @@ namespace hpp { template <int gCase> struct CaseTraits { static const bool pregrasp = (gCase & WithPreGrasp); - static const bool intersec = !((gCase & NoGrasp) || (gCase & NoPlace)); static const bool preplace = (gCase & WithPrePlace); + /// FIXME + // It should be + // static const bool intersec = !((gCase & NoGrasp) || (gCase & NoPlace)); + // but when NoPlace | WithPreGrasp, we need a LevelSetEdge after + // the pregrasp waypoint node. Sadly the current implementation of + // WaypointEdge does not allow the last edge of type other than Edge. + static const bool intersec = pregrasp || preplace || ((gCase & GraspOnly) && (gCase & PlaceOnly)); + static const bool valid = ( (gCase & WithPreGrasp) || (gCase & GraspOnly) || (gCase & NoGrasp) ) && ( (gCase & WithPrePlace) || (gCase & PlaceOnly) || (gCase & NoPlace) )