This is an old revision of the document!
Skill Description
This page will refer to example skills from this repository written by Pontus Rosqvist.
A skill description extends SkillDescription and is an object which keeps track of which parameters a skill has, what type the parameters are and if they are required, can be inferred or optional. In the skill description one also specifies any conditions which need to be met, these can be pre-conditions (before the skill is executed), hold-conditions (while the skill is executing) and post-conditions (after the skill has been executed). These conditions only need to be specified, SkiROS then takes care of checking that they hold. An example of a skill description can be seen in basic_primitive, skill_phases and infer_parameters among others.
Parameters
The parameters a skill has is specified in the skill description. A parameter can be a python object or an object from the world model. A float could be specified as a parameter in the following way:
class DescriptionName(SkillDescription): def createDescription(self): self.addParam('NameOfParameter', 0.0, ParamTypes.Required)
Here the value “0.0” becomes the default value for that parameter, one can also specify that the parameter has to be a float without specifying a default parameters:
class DescriptionName(SkillDescription): def createDescription(self): self.addParam('NameOfParameter', Float, ParamTypes.Required)
Pre-conditions
TODO
Hold-conditions
TODO
Post-conditions
TODO