Show EOL distros: 

cob_command_tools: cob_command_gui | cob_dashboard | cob_interactive_teleop | cob_script_server | cob_teleop

Package Summary

The cob_script_server package provides a simple interface to operate Care-O-bot. It can be used via the python API or the actionlib interface.

  • Maintainer status: developed
  • Maintainer: Florian Weisshardt <fmw AT ipa.fhg DOT de>
  • Author: Florian Weisshardt <fmw AT ipa.fhg DOT de>
  • License: LGPL
  • Source: git https://github.com/ipa320/cob_command_tools.git (branch: hydro_release_candidate)
cob_command_tools: cob_command_gui | cob_dashboard | cob_helper_tools | cob_interactive_teleop | cob_monitoring | cob_script_server | cob_teleop

Package Summary

The cob_script_server package provides a simple interface to operate Care-O-bot. It can be used via the python API or the actionlib interface.

  • Maintainer status: maintained
  • Maintainer: Felix Messmer <felixmessmer AT gmail DOT com>, Florian Weisshardt <fmw AT ipa.fhg DOT de>
  • Author: Florian Weisshardt <fmw AT ipa.fhg DOT de>
  • License: Apache 2.0
  • Source: git https://github.com/ipa320/cob_command_tools.git (branch: indigo_release_candidate)
cob_command_tools: cob_command_gui | cob_dashboard | cob_helper_tools | cob_interactive_teleop | cob_monitoring | cob_script_server | cob_teleop

Package Summary

The cob_script_server package provides a simple interface to operate Care-O-bot. It can be used via the python API or the actionlib interface.

  • Maintainer status: developed
  • Maintainer: Felix Messmer <felixmessmer AT gmail DOT com>, Florian Weisshardt <fmw AT ipa.fhg DOT de>
  • Author: Florian Weisshardt <fmw AT ipa.fhg DOT de>
  • License: Apache 2.0
  • Source: git https://github.com/ipa320/cob_command_tools.git (branch: indigo_release_candidate)

Hardware Requirements

This package was created to be used with Care-O-bot but is not limited to one specific robot. It can be used for a real robot as well as for a simulated one (see cob_bringup).

Python API

This package provides all methods as a python API (see Tutorials). The table below shows a summary of the most important commands and their parameters.

command

component name

parameter name

example

explanation

init()

base|torso| tray|arm|sdh

--

sss.init("base")

initializes component

recover

base|torso| tray|arm|sdh

--

sss.recover("base")

recovers component after emergency stop

stop

base|torso| tray|arm|sdh

--

sss.stop("base")

stops current goal of component

move

torso|tray| arm|sdh

string of parameter

sss.move("torso","front")

move component to predefined joint configuration

move

torso|tray| arm|sdh

list of points with joint values

sss.move("torso",   [[0, 0, 0, 0],   [0.1, 0, 0.2, 0],   [...], ...])

move component to joint configuration

move

base

string of parameter

sss.move("base","home")

move component to predefined pose

move

base

[x,y,th] in map coordinates

sss.move("base",[0, 0, 0])

move component to pose |

move_base_rel

base

[x,y,th] in base_link relative coordinates

sss.move_base_rel("base",[0, 0, 1.57])

move relative pose base |

sleep

--

time in seconds

sss.sleep(2.0)

sleeps

wait_for_input

--

--

ret = sss.wait_for_input()

wait for a keyboard input

say

--

string of parameter

sss.say("sentence1")

says a predefined string

say

--

list of strings

sss.say(["Hello."])

says a string

set_light

--

string

sss.set_light("red")

sets LEDs to a predefined color

set_light

--

[r,b,g]

sss.set_light([0.5,0.5,0.5])

sets LEDs to a rgb color

Each of the above function (except wait_for_input, which returns the keyboard input) returns a handle which offers the following commands.

command

example

explanation

wait()

handle.wait()

waits forever until the command is finished

wait(timeout)

handle.wait(2.0)

waits until the command is finished, but max. for timeout seconds

get_state()

handle.get_state()

gets the state of the current execution (see actionlib_msgs/GoalStatus)

Terminal API

By running

rosrun cob_script_server cob_console

you can access all script_server commands in an ipython terminal with the prefix sss, e.g.

sss.move("head","front")

Actionlib API

All functions from the python API are also available as actionlib calls.

script_server

The script server node takes in cob_script_server/ScriptAction messages and send this to the robot to be executed.

Action Goal

script_server/goal (cob_script_server/ScriptActionGoal)
  • The goal describes the script action command the robot has to execute

Action Result

script_server/result (cobscript_server/ScriptActionResult)
  • Returns an error code

Action Feedback

script_server/feedback (cob_script_server/ScriptActionFeedback)
  • empty

Usage/Examples

For starting the script server and upload parameters

roslaunch cob_script_server script_server.launch

For running a test script

rosrun cob_script_server test_script.py

For running the script viewer

rosrun cob_script_server script_viewer.py

All the parameters that are loaded in the name space /script_server are defined in .yaml files in the package cob_default_robot_config.

Tutorials

Tutorials can be found on the Tutorials page.

Wiki: cob_script_server (last edited 2016-12-15 13:42:13 by NadiaHammoudeh)