Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 import rospy
00013 import turtlesim.srv as turtlesim_srvs
00014
00015 rospy.init_node('clear_turtles')
00016 rospy.wait_for_service('kill')
00017 kill_turtle = rospy.ServiceProxy('kill', turtlesim_srvs.Kill)
00018 response = kill_turtle("turtle1")
00019
00020
00021
00022 rospy.wait_for_service('spawn')
00023 spawn_turtle = rospy.ServiceProxy('spawn', turtlesim_srvs.Spawn)
00024 response = spawn_turtle(5.4,6.4,0.0,"turtle_one")
00025 response = spawn_turtle(5.4,4.4,0.3,"turtle_two")