Public Member Functions | |
def | __init__ |
def | shutdown |
def | spawn_turtles |
Public Attributes | |
is_disabled | |
turtles | |
Private Member Functions | |
def | _establish_unique_names |
def | _launch_turtle_clients |
def | _ros_service_manager_disable_callback |
def | _send_flip_rules |
def | _spawn_simulated_turtles |
Private Attributes | |
_gateway_flip_service | |
_kill_turtle_service_client | |
_processes | |
_shutdown_subscriber | |
_spawn_turtle_service_client | |
_temporary_files | |
_terminal | |
Static Private Attributes | |
list | __slots__ |
Shepherds the turtles! @todo get alised names from the concert client list if the topic is available @todo watchdog for killing turtles that are no longer connected.
Definition at line 98 of file turtle_herder.py.
def turtle_herder.TurtleHerder.__init__ | ( | self | ) |
Definition at line 118 of file turtle_herder.py.
def turtle_herder.TurtleHerder._establish_unique_names | ( | self, | |
turtles | |||
) | [private] |
Make sure the turtle names don't clash with currently spawned turtles. If they do, postfix them with an incrementing counter. :param Turtle[] turtles: list of new turtle names to uniquify. :returns: uniquified names for the turtles. :rtype Turtle[]: updated turtles
Definition at line 194 of file turtle_herder.py.
def turtle_herder.TurtleHerder._launch_turtle_clients | ( | self, | |
turtles | |||
) | [private] |
:param Turtle[] turtles:
Definition at line 171 of file turtle_herder.py.
def turtle_herder.TurtleHerder._ros_service_manager_disable_callback | ( | self, | |
msg | |||
) | [private] |
Definition at line 244 of file turtle_herder.py.
def turtle_herder.TurtleHerder._send_flip_rules | ( | self, | |
turtles, | |||
cancel | |||
) | [private] |
:param Turtle[] turtles:
Definition at line 212 of file turtle_herder.py.
def turtle_herder.TurtleHerder._spawn_simulated_turtles | ( | self, | |
turtles | |||
) | [private] |
Very important to have checked that the turtle names are unique before calling this method. :param Turtle[] turtles:
Definition at line 148 of file turtle_herder.py.
def turtle_herder.TurtleHerder.shutdown | ( | self, | |
msg = None |
|||
) |
- Send unflip requests - Cleanup turtles on the turtlesim canvas. - Shutdown spawned terminals :todo: this should go in a service manager callable ros callback where we can call disable on this service and bring it down without having to SIGINT it.
Definition at line 247 of file turtle_herder.py.
def turtle_herder.TurtleHerder.spawn_turtles | ( | self, | |
turtles | |||
) |
:param Turtle[] turtles:
Definition at line 185 of file turtle_herder.py.
list turtle_herder.TurtleHerder::__slots__ [static, private] |
[ 'turtles', # list of turtle name strings '_kill_turtle_service_client', '_spawn_turtle_service_client', '_gateway_flip_service', '_processes', '_temporary_files', # temporary files that have to be unlinked later 'is_disabled', # flag set when service manager tells it to shut down. '_terminal', # terminal to use to spawn concert clients '_shutdown_subscriber' ]
Definition at line 106 of file turtle_herder.py.
Definition at line 118 of file turtle_herder.py.
Definition at line 118 of file turtle_herder.py.
turtle_herder.TurtleHerder::_processes [private] |
Definition at line 118 of file turtle_herder.py.
Definition at line 118 of file turtle_herder.py.
Definition at line 118 of file turtle_herder.py.
Definition at line 118 of file turtle_herder.py.
turtle_herder.TurtleHerder::_terminal [private] |
Definition at line 118 of file turtle_herder.py.
Definition at line 118 of file turtle_herder.py.
Definition at line 118 of file turtle_herder.py.