init_turtles.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 #
00003 # License: BSD
00004 #   https://raw.github.com/robotics-in-concert/rocon_tutorials/turtle_concert/master/LICENSE
00005 #
00006 ##############################################################################
00007 # Imports
00008 ##############################################################################
00009 
00010 # Simple script to clear the turtlesim display on startup.
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 # Only because we can't get services publicly exposed yet.
00021 # The master sync can do it, but am not yet doing it
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")


turtle_concert
Author(s): Daniel Stonier , Jihoon Lee
autogenerated on Wed Sep 16 2015 10:45:35