Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes
rocon_remocon.interactive_client_interface.InteractiveClientInterface Class Reference

Interactive Client Interface. More...

List of all members.

Public Member Functions

def __init__
def get_role_list
def has_running_interactions
def select_role
def shutdown
def start_interaction
def stop_all_interactions
def stop_interaction

Public Attributes

 get_interactions_service_proxy
 get_roles_service_proxy
 interactions
 is_connect
 key
 name
 pairing
 pairing_status_subscriber
 platform_info
 remocon_status_pub
 request_interaction_service_proxy
 rocon_uri

Static Public Attributes

float shutdown_timeout = 0.5

Private Member Functions

def _connect
def _connect_with_ros_init_node
def _determine_interaction_type
def _prepare_command_line_parameters
def _prepare_roslaunch_args
def _prepare_webapp_url
def _process_listeners
def _publish_remocon_status
 Ros Comms.
def _set_remocon_services
 Utilities.
def _start_dummy_interaction
def _start_global_executable_interaction
def _start_roslaunch_interaction
def _start_rosrunnable_interaction
def _start_webapp_interaction
def _start_weburl_interaction
def _subscribe_pairing_status_callback

Private Attributes

 _interactions_table
 _ros_master_port
 _roslaunch_terminal
 _stop_interaction_postexec_fn

Detailed Description

Interactive Client Interface.

Definition at line 45 of file interactive_client_interface.py.


Constructor & Destructor Documentation

def rocon_remocon.interactive_client_interface.InteractiveClientInterface.__init__ (   self,
  stop_interaction_postexec_fn 
)
  @param stop_app_postexec_fn : callback to fire when a listener detects an app getting stopped.
  @type method with no args

Definition at line 54 of file interactive_client_interface.py.


Member Function Documentation

def rocon_remocon.interactive_client_interface.InteractiveClientInterface._connect (   self,
  ros_master_uri = "http://localhost:11311",
  host_name = 'localhost' 
) [private]

Definition at line 97 of file interactive_client_interface.py.

def rocon_remocon.interactive_client_interface.InteractiveClientInterface._connect_with_ros_init_node (   self,
  ros_master_uri = "http://localhost:11311",
  host_name = 'localhost' 
) [private]

Definition at line 90 of file interactive_client_interface.py.

  Classifies the interaction based on the name string and some intelligent
  (well, reasonably) parsing of that string.
   - paired dummy (by empty name)
   - ros launcher (by .launch extension)
   - ros runnable (by roslib find_resource success)
   - web app      (by web_interactions.parse)
   - web url      (by web_interactions.parse)
   - global executable (fallback option)

Definition at line 224 of file interactive_client_interface.py.

Convert the interaction specified yaml string into command line parameters that can
be passed to rosrunnable or global nodes.

:param str interaction_parameters: parameters specified as a yaml string

:returns: the parameters as command line args
:rtype: str[]

Definition at line 516 of file interactive_client_interface.py.

Convert the interaction specified yaml string into roslaunch args
to be passed to the roslaunchable. Note that we only use a constrained
subset of yaml to be compatible with roslaunch args here.
The root type has to be a dict and values themselves
may not be dicts or lists.

:param str interaction_parameters: parameters specified as a yaml string

:returns: the parameters as roslaunch args key-value pairs
:rtype: list of (name, value) pairs

Definition at line 536 of file interactive_client_interface.py.

   url synthesiser for sending remappings and parameters information.
   We convert the interaction parameter (yaml string) and remapping (rocon_std_msgs.Remapping[])
   variables into generic python list/dictionary objects and convert these into
   json strings as it makes it easier for web apps to handle them.

Definition at line 494 of file interactive_client_interface.py.

  Callback function used to catch terminating applications and cleanup appropriately.

  @param name : name of the launched process stored in the interactions index.
  @type str

  @param exit_code : could be utilised from roslaunched processes but not currently used.
  @type int

Definition at line 418 of file interactive_client_interface.py.

Ros Comms.

Definition at line 447 of file interactive_client_interface.py.

Utilities.

    setting up remocon-interaction manager apis. and check if the services are available

    :param str interactions_namespace : namespace to contact interaction manager

    :returns: remocon service apis
    :rtype: dict

Definition at line 474 of file interactive_client_interface.py.

def rocon_remocon.interactive_client_interface.InteractiveClientInterface._start_dummy_interaction (   self,
  interaction,
  unused_filename 
) [private]

Definition at line 277 of file interactive_client_interface.py.

Definition at line 326 of file interactive_client_interface.py.

def rocon_remocon.interactive_client_interface.InteractiveClientInterface._start_roslaunch_interaction (   self,
  interaction,
  roslaunch_filename 
) [private]
  Start a ros launchable application, applying parameters and remappings if specified.

Definition at line 285 of file interactive_client_interface.py.

def rocon_remocon.interactive_client_interface.InteractiveClientInterface._start_rosrunnable_interaction (   self,
  interaction,
  rosrunnable_filename 
) [private]
  Launch a rosrunnable application. This does not apply any parameters
  or remappings (yet).

Definition at line 304 of file interactive_client_interface.py.

Need to work out the extended url (with args, parameters and remappings) here and then feed that to a
detected browser.

:param base_url str: the web app url without all of the attached variables.

Definition at line 357 of file interactive_client_interface.py.

We only need the url here and then do a system check for a web browser.

Definition at line 342 of file interactive_client_interface.py.

Definition at line 460 of file interactive_client_interface.py.

Definition at line 154 of file interactive_client_interface.py.

Identify if this client has any running interactions. Used by the gui above
to enable/disable a button that will trigger stoppage of all running interactions.

Definition at line 177 of file interactive_client_interface.py.

Contact the interactions manager and retrieve all the interactions
associated to a particular role.

:param str role_name: role to request list of interactions for.

Definition at line 164 of file interactive_client_interface.py.

Definition at line 138 of file interactive_client_interface.py.

:param str interaction_hash: the key
:param str role_name: help refine the search by specifying what role this interaction is for

:returns: result of the effort to start an interaction, with a message if there was an error.
:rtype: (bool, message)

Definition at line 187 of file interactive_client_interface.py.

This is the big showstopper - stop them all!

Definition at line 376 of file interactive_client_interface.py.

This stops all launches for an interaction of a particular type.

Definition at line 387 of file interactive_client_interface.py.


Member Data Documentation

Definition at line 57 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 97 of file interactive_client_interface.py.

Definition at line 97 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 97 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 97 of file interactive_client_interface.py.

Definition at line 97 of file interactive_client_interface.py.

Definition at line 57 of file interactive_client_interface.py.

Definition at line 47 of file interactive_client_interface.py.


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


rocon_remocon
Author(s): Daniel Stonier, Donguk Lee
autogenerated on Fri Feb 12 2016 02:50:18