Simple script server class. More...
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 |
Simple script server class.
Implements the python interface for the script server.
Definition at line 162 of file simple_script_server.py.
def simple_script_server.simple_script_server.__init__ | ( | self, | |
parse = False |
|||
) |
Initializes simple_script_server class.
parse | Defines wether to run script in simulation for graph generation or not |
Definition at line 166 of file simple_script_server.py.
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.
component_name | Name 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.
component_name | Name of the component. |
parameter_name | Name of the parameter on the ROS parameter server. |
blocking | Bool 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.
component_name | Name of the component. |
parameter_name | Name of the parameter on the ROS parameter server. |
blocking | Bool 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.
component_name | Name of component; here always "base". |
parameter_name | List of length 3: (item 1 & 2) relative x and y translation [m]; (item 3) relative rotation about z axis [rad]. |
blocking | Bool 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.
component_name | Name of the component. |
parameter_name | Name of the parameter on the ROS parameter server. |
blocking | Bool 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.
parameter_name | Name of the parameter |
language | Language 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.
component_name | Name 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.
parameter_name | Name of the parameter |
language | Language 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.
parameter_name | Name 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.
component_name | Name of the component. |
mode | Name of the operation mode to set. |
blocking | Service 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.
duration | Duration 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.
component_name | Name 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.
component_name | Name of the component. |
service_name | Name of the trigger service. |
blocking | Service calls are always blocking. The parameter is only provided for compatibility with other functions. |
Definition at line 254 of file simple_script_server.py.
def simple_script_server.simple_script_server.wait_for_input | ( | self, | |
duration = 0 |
|||
) |
Waits for user input.
Waits either for a user input or until timeout is reached.
duration | Duration in seconds for timeout. |
Definition at line 1025 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.
Definition at line 166 of file simple_script_server.py.