arm_navigation_msgs_utils.py
Go to the documentation of this file.
00001 #! /usr/bin/env python
00002 
00003 PKG = 'planning_environment'
00004 
00005 import roslib; roslib.load_manifest(PKG)
00006 from arm_navigation_msgs.msg import CollisionOperation
00007 
00008 # This function returns a bunch of ordered collision operations
00009 # to disable collisions with all the links not in exclude
00010 def make_disable_allowed_collisions_with_exclusions(all, exclude):
00011     
00012     ret = []
00013 
00014     for i in all:
00015         if i not in exclude:
00016             coll = CollisionOperation()
00017             coll.object1 = i
00018             coll.object2 = coll.COLLISION_SET_OBJECTS
00019             coll.operation = coll.DISABLE
00020             ret.append(coll)
00021             coll2 = CollisionOperation()
00022             coll2.object1 = i
00023             coll2.object2 = coll.COLLISION_SET_ATTACHED_OBJECTS
00024             coll2.operation = coll.DISABLE
00025             ret.append(coll2)
00026             for j in all:
00027                 if j != i and j not in exclude:
00028                     coll3 = CollisionOperation()
00029                     coll3.object1 = i
00030                     coll3.object2 = j
00031                     coll3.operation = coll.DISABLE
00032                     ret.append(coll3)
00033     return ret


arm_navigation_msgs
Author(s): Gil Jones
autogenerated on Mon Dec 2 2013 12:31:50