Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
turtle_herder.TurtleHerder Class Reference

List of all members.

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__

Detailed Description

  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.


Constructor & Destructor Documentation

Definition at line 118 of file turtle_herder.py.


Member Function Documentation

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.

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.


Member Data Documentation

list turtle_herder.TurtleHerder::__slots__ [static, private]
Initial value:
[
        '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.

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.

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.


The documentation for this class was generated from the following file:


concert_service_turtlesim
Author(s): Daniel Stonier
autogenerated on Thu Jun 6 2019 21:35:22