Go to the documentation of this file.00001
00002
00003 PKG = 'planning_environment'
00004
00005 import roslib; roslib.load_manifest(PKG)
00006 from arm_navigation_msgs.msg import CollisionOperation
00007
00008
00009
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