Exemplo n.º 1
0
 def findAllCollisionPairs(self, consider_only_active_collision_pairs=True):
     res = [];
     for i in range(len(self.collision_model.collisionPairs)):
         if(not consider_only_active_collision_pairs or self.collision_data.activeCollisionPairs[i]):
             if(se3.computeCollision(self.collision_model, self.collision_data, i)):
                 res += [(i, self.collision_model.collisionPairs[i])];
     return res;
Exemplo n.º 2
0
 def findFirstCollisionPair(self,
                            consider_only_active_collision_pairs=True):
     for i in range(len(self.collision_model.collisionPairs)):
         if (not consider_only_active_collision_pairs
                 or self.collision_data.activeCollisionPairs[i]):
             if (se3.computeCollision(self.collision_model,
                                      self.collision_data, i)):
                 return (i, self.collision_model.collisionPairs[i])
     return None