octomap_eraser_cli.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 """Clear a region specified by a global axis-aligned bounding box in stored
4 OctoMap.
5 
6 """
7 
8 import sys
9 from time import sleep
10 
11 import roslib
12 roslib.load_manifest('octomap_server')
13 from geometry_msgs.msg import Point
14 import octomap_msgs.srv
15 import rospy
16 
17 
18 SRV_NAME = '/octomap_server/clear_bbx'
19 SRV_INTERFACE = octomap_msgs.srv.BoundingBoxQuery
20 
21 
22 if __name__ == '__main__':
23  min = Point(*[float(x) for x in sys.argv[1:4]])
24  max = Point(*[float(x) for x in sys.argv[4:7]])
25 
26  rospy.init_node('octomap_eraser_cli', anonymous=True)
27  sleep(1)
28  service = rospy.ServiceProxy(SRV_NAME, SRV_INTERFACE)
29  rospy.loginfo("Connected to %s service." % SRV_NAME)
30 
31  service(min, max)


octomap_server
Author(s): Armin Hornung
autogenerated on Tue Jan 26 2021 03:27:07