Go to the documentation of this file.00001
00002
00003 PKG = 'pr2_arm_navigation_actions'
00004
00005 import roslib; roslib.load_manifest(PKG)
00006 import rospy
00007 import sys
00008
00009 from arm_navigation_msgs.msg import CollisionObject
00010 from arm_navigation_msgs.msg import AttachedCollisionObject
00011 from arm_navigation_msgs.msg import CollisionObjectOperation
00012
00013 if __name__ == '__main__':
00014
00015 obj_pub = rospy.Publisher('collision_object',CollisionObject)
00016 att_pub = rospy.Publisher('attached_collision_object', AttachedCollisionObject)
00017
00018 rospy.init_node('clear_all_objects')
00019
00020 rospy.sleep(2.)
00021
00022 co = CollisionObject()
00023 co.header.frame_id = "base_link"
00024 co.header.stamp = rospy.Time.now()
00025
00026 co.id = "all"
00027 co.operation.operation = CollisionObjectOperation.REMOVE
00028 obj_pub.publish(co)
00029
00030 ca = AttachedCollisionObject()
00031 ca.link_name = "all"
00032 ca.object = co
00033 att_pub.publish(ca)
00034
00035 rospy.sleep(2.)
00036