Public Member Functions | Public Attributes
simple_script_server.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 calculate_point_time
def compose_color
 Set the color of the cob_light component.
def compose_trajectory
 Parse and compose trajectory message.
def halt
 Halts different components.
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_traj
 Deals with all kind of trajectory movements for different components.
def play
 Play a sound file.
def publish_twist
def recover
 Recovers different components.
def say
 Say some text.
def set_light
def set_mimic
 Set the mimic of the cob_mimic component.
def set_wav_path
def sleep
 Sleep for a certain time.
def stop
 Stops different components.
def string_action
 Allows to trigger actions of the type cob_actions/SetString.
def trigger
 Deals with all kind of trigger services for different components.
def trigger_action
 Allows to trigger actions of the type actionlib/TestAction.
def wait_for_input
 Waits for user input.

Public Attributes

 ns_global_prefix
 parse
 wav_path

Detailed Description

Simple script server class.

Implements the python interface for the script server.

Definition at line 118 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 122 of file simple_script_server.py.


Member Function Documentation

def simple_script_server.simple_script_server.simple_script_server.calculate_point_time (   self,
  component_name,
  start_pos,
  end_pos,
  default_vel,
  default_acc 
)

Definition at line 629 of file simple_script_server.py.

def simple_script_server.simple_script_server.simple_script_server.compose_color (   self,
  component_name,
  parameter_name 
)

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 792 of file simple_script_server.py.

def simple_script_server.simple_script_server.simple_script_server.compose_trajectory (   self,
  component_name,
  parameter_name 
)

Parse and compose trajectory message.

Definition at line 498 of file simple_script_server.py.

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

Halts different components.

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

Parameters:
component_nameName of the component.

Definition at line 209 of file simple_script_server.py.

def simple_script_server.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 135 of file simple_script_server.py.

def simple_script_server.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 381 of file simple_script_server.py.

def simple_script_server.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 394 of file simple_script_server.py.

def simple_script_server.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 713 of file simple_script_server.py.

def simple_script_server.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 662 of file simple_script_server.py.

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

Play a sound file.

Parameters:
parameter_nameName of the parameter
languageLanguage to use

Definition at line 1019 of file simple_script_server.py.

def simple_script_server.simple_script_server.simple_script_server.publish_twist (   self,
  pub,
  twist,
  end_time 
)

Definition at line 779 of file simple_script_server.py.

def simple_script_server.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 201 of file simple_script_server.py.

def simple_script_server.simple_script_server.simple_script_server.say (   self,
  component_name,
  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 949 of file simple_script_server.py.

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

Definition at line 832 of file simple_script_server.py.

def simple_script_server.simple_script_server.simple_script_server.set_mimic (   self,
  component_name,
  parameter_name,
  blocking = False 
)

Set the mimic of the cob_mimic component.

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

Parameters:
parameter_nameName of the parameter on the parameter server which holds the mimic mode (string).

Definition at line 881 of file simple_script_server.py.

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

Definition at line 1085 of file simple_script_server.py.

Sleep for a certain time.

Parameters:
durationDuration in seconds to sleep.

Definition at line 1100 of file simple_script_server.py.

def simple_script_server.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 143 of file simple_script_server.py.

def simple_script_server.simple_script_server.simple_script_server.string_action (   self,
  component_name,
  data,
  blocking 
)

Allows to trigger actions of the type cob_actions/SetString.

Based on the component and action name, the corresponding ActionServer will be called.

Parameters:
component_nameName of the component (namespace of the action).
dataThe data to be send in the ActionGoal.
blockingWhether to wait for the Action to return.

Definition at line 333 of file simple_script_server.py.

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

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 219 of file simple_script_server.py.

def simple_script_server.simple_script_server.simple_script_server.trigger_action (   self,
  component_name,
  action_name,
  blocking = True 
)

Allows to trigger actions of the type actionlib/TestAction.

Based on the component and action name, the corresponding ActionServer will be called.

Parameters:
component_nameName of the component.
action_nameName of the action.
blockingWhether to wait for the Action to return.

Definition at line 282 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 1118 of file simple_script_server.py.


Member Data Documentation

Definition at line 122 of file simple_script_server.py.

Definition at line 122 of file simple_script_server.py.

Definition at line 122 of file simple_script_server.py.


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


cob_script_server
Author(s): Florian Weisshardt
autogenerated on Sun Jun 9 2019 20:20:12