00001
00002
00003 """Clear a region specified by a global axis-aligned bounding box in stored
00004 OctoMap.
00005
00006 """
00007
00008 import sys
00009 from time import sleep
00010
00011 import roslib
00012 roslib.load_manifest('geometry_msgs')
00013 roslib.load_manifest('octomap_ros')
00014 from geometry_msgs.msg import Point
00015 import octomap_ros.srv
00016 import rospy
00017
00018
00019 SRV_NAME = '/octomap_server_combined/clear_bbx'
00020 SRV_INTERFACE = octomap_ros.srv.ClearBBXRegion
00021
00022
00023 if __name__ == '__main__':
00024 min = Point(*[float(x) for x in sys.argv[1:4]])
00025 max = Point(*[float(x) for x in sys.argv[4:7]])
00026
00027 rospy.init_node('octomap_eraser_cli', anonymous=True)
00028 sleep(1)
00029 service = rospy.ServiceProxy(SRV_NAME, SRV_INTERFACE)
00030 rospy.loginfo("Connected to %s service." % SRV_NAME)
00031
00032 service(min, max)