All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Public Member Functions | Public Attributes
simple_script_server.simple_script_server Class Reference

Simple script server class. More...

List of all members.

Public Member Functions

def __init__
 Initializes simple_script_server class.
def init
 Initializes different components.
def move
 Deals with all kind of movements for different components.
def move_base
 Deals with movements of the base.
def move_base_rel
 Relative movement of the base.
def move_constrained_planned
def move_joint_goal_planned
def move_planned
def move_traj
 Deals with all kind of trajectory movements for different components.
def play
 Play a sound file.
def recover
 Recovers different components.
def say
 Say some text.
def set_light
 Set the color of the cob_light component.
def set_operation_mode
 Set the operation mode for different components.
def set_wav_path
def sleep
 Sleep for a certain time.
def stop
 Stops different components.
def trigger
 Deals with all kind of trigger services for different components.
def wait_for_input
 Waits for user input.

Public Attributes

 ns_global_prefix
 parse
 pub_light
 wav_path

Detailed Description

Simple script server class.

Implements the python interface for the script server.

Definition at line 162 of file simple_script_server.py.


Constructor & Destructor Documentation

Initializes simple_script_server class.

Parameters:
parseDefines wether to run script in simulation for graph generation or not

Definition at line 166 of file simple_script_server.py.


Member Function Documentation

def simple_script_server.simple_script_server.init (   self,
  component_name,
  blocking = True 
)

Initializes different components.

Based on the component, the corresponding init service will be called.

Parameters:
component_nameName of the component.

Definition at line 183 of file simple_script_server.py.

def simple_script_server.simple_script_server.move (   self,
  component_name,
  parameter_name,
  blocking = True,
  mode = None 
)

Deals with all kind of movements for different components.

Based on the component, the corresponding move functions will be called.

Parameters:
component_nameName of the component.
parameter_nameName of the parameter on the ROS parameter server.
blockingBool value to specify blocking behaviour.

Definition at line 310 of file simple_script_server.py.

def simple_script_server.simple_script_server.move_base (   self,
  component_name,
  parameter_name,
  blocking,
  mode 
)

Deals with movements of the base.

A target will be sent to the actionlib interface of the move_base node.

Parameters:
component_nameName of the component.
parameter_nameName of the parameter on the ROS parameter server.
blockingBool value to specify blocking behaviour.

Definition at line 325 of file simple_script_server.py.

def simple_script_server.simple_script_server.move_base_rel (   self,
  component_name,
  parameter_name = [0,
  blocking = True 
)

Relative movement of the base.

Parameters:
component_nameName of component; here always "base".
parameter_nameList of length 3: (item 1 & 2) relative x and y translation [m]; (item 3) relative rotation about z axis [rad].
blockingBool value to specify blocking behaviour.

# throws error code 3 in case of invalid parameter_name vector

Definition at line 743 of file simple_script_server.py.

def simple_script_server.simple_script_server.move_constrained_planned (   self,
  component_name,
  parameter_name,
  blocking = True,
  ah = None 
)

Definition at line 686 of file simple_script_server.py.

def simple_script_server.simple_script_server.move_joint_goal_planned (   self,
  component_name,
  parameter_name,
  blocking = True 
)

Definition at line 569 of file simple_script_server.py.

def simple_script_server.simple_script_server.move_planned (   self,
  component_name,
  parameter_name,
  blocking = True 
)

Definition at line 566 of file simple_script_server.py.

def simple_script_server.simple_script_server.move_traj (   self,
  component_name,
  parameter_name,
  blocking 
)

Deals with all kind of trajectory movements for different components.

A trajectory will be sent to the actionlib interface of the corresponding component.

Parameters:
component_nameName of the component.
parameter_nameName of the parameter on the ROS parameter server.
blockingBool value to specify blocking behaviour.

Definition at line 431 of file simple_script_server.py.

def simple_script_server.simple_script_server.play (   self,
  parameter_name,
  blocking = True 
)

Play a sound file.

Parameters:
parameter_nameName of the parameter
languageLanguage to use

Definition at line 957 of file simple_script_server.py.

def simple_script_server.simple_script_server.recover (   self,
  component_name,
  blocking = True 
)

Recovers different components.

Based on the component, the corresponding recover service will be called.

Parameters:
component_nameName of the component.

Definition at line 244 of file simple_script_server.py.

def simple_script_server.simple_script_server.say (   self,
  parameter_name,
  blocking = True 
)

Say some text.

The text to say may be given by a list of strings or a single string which points to a parameter on the ROS parameter server.

Parameters:
parameter_nameName of the parameter
languageLanguage to use for the TTS system

Definition at line 888 of file simple_script_server.py.

def simple_script_server.simple_script_server.set_light (   self,
  parameter_name,
  blocking = False 
)

Set the color of the cob_light component.

The color is given by a parameter on the parameter server.

Parameters:
parameter_nameName of the parameter on the parameter server which holds the rgb values.

Definition at line 825 of file simple_script_server.py.

def simple_script_server.simple_script_server.set_operation_mode (   self,
  component_name,
  mode,
  blocking = True,
  planning = False 
)

Set the operation mode for different components.

Based on the component, the corresponding set_operation_mode service will be called.

Parameters:
component_nameName of the component.
modeName of the operation mode to set.
blockingService calls are always blocking. The parameter is only provided for compatibility with other functions.

Definition at line 805 of file simple_script_server.py.

def simple_script_server.simple_script_server.set_wav_path (   self,
  parameter_name,
  blocking = True 
)

Definition at line 992 of file simple_script_server.py.

def simple_script_server.simple_script_server.sleep (   self,
  duration 
)

Sleep for a certain time.

Parameters:
durationDuration in seconds to sleep.

Definition at line 1006 of file simple_script_server.py.

def simple_script_server.simple_script_server.stop (   self,
  component_name,
  mode = "omni",
  blocking = True 
)

Stops different components.

Based on the component, the corresponding stop service will be called.

Parameters:
component_nameName of the component.

Definition at line 191 of file simple_script_server.py.

def simple_script_server.simple_script_server.trigger (   self,
  component_name,
  service_name,
  blocking = True,
  planning = False 
)

Deals with all kind of trigger services for different components.

Based on the component and service name, the corresponding trigger service will be called.

Parameters:
component_nameName of the component.
service_nameName of the trigger service.
blockingService calls are always blocking. The parameter is only provided for compatibility with other functions.

Definition at line 254 of file simple_script_server.py.

Waits for user input.

Waits either for a user input or until timeout is reached.

Parameters:
durationDuration in seconds for timeout.
Todo:
TODO: implement waiting for timeout

Definition at line 1025 of file simple_script_server.py.


Member Data Documentation

Definition at line 166 of file simple_script_server.py.

Definition at line 166 of file simple_script_server.py.

Definition at line 166 of file simple_script_server.py.

Definition at line 166 of file simple_script_server.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


cob_script_server
Author(s): Florian Weisshardt
autogenerated on Fri Mar 1 2013 17:45:42