#!/usr/bin/python

    #
    #
    #                                    Wall 1
    #                    ____1______________2______________3________
    #          Wall 7    ||  |              |              |    ||
    #                    ||__| Wall 8       | Wall 5       |_11_||
    #                                 A           B        |    || Wall 2
    #                      __                      wall 10 |_12_|| 
    #                    ||  | Wall 9       | Wall 4       |    ||
    #          Wall 6    ||__|______________|______________|____||
    #                        4            Wall 3           6
    #  
import sys
import roslib
roslib.load_manifest('kee_use_cases')

import rospy
import os
import random 
from gazebo_msgs.srv import DeleteModel 

def delete_objects(event):
        
    rospy.wait_for_service("/gazebo/delete_model", 300)
    try:
        deleted = rospy.ServiceProxy("/gazebo/delete_model", DeleteModel)
        deleted('adapter_sleeve_r20_1')
    except rospy.ServiceException, e:
        print "Service call failed: %s"%e

        
def main():
    rospy.init_node('remove_object')
    
    random_add_secs=random.uniform(0, 1)
    rospy.Timer(rospy.Duration(random_add_secs), delete_objects, oneshot=True)
    
    rospy.spin()

if __name__ == '__main__':
    main()
