====== Skills ====== A skill is a subtask of a robot program application. In its simplest version a skill consists only of one of pitasc's basic skill types, e.g. a **skill_lin**: move linearly from point A to point B. But a skill can also be composed out of multiple skills to create a more complex compound skill. Skills are also able to inherit from other skills. Defined at file ``models/coordination.xml`` in package **pitasc_library**. **General structure** --------------------- Chain of prototype based inheritance .. code-block:: text any_skills --> (skill_single_robot) --> skill --> object --> dictionary --> base --> descriptive All skills are inheriting from 'skill', but most skills are inheriting from 'skill_single_robot'. Skills contain the following attributes inside the ```` tag. .. list-table:: Attributes inside ```` tag :widths: auto :header-rows: 1 * - Attribute - Description * - id - Needs to be locally unique to allow identification. If not unique, a incrementing element e.g., "_no0", "_no1", "_no2", ... will be added * - data_type - Already set by inheritance (dict) * - prototype - The base type the skill "inherits" from, e.g. "skill_cartesian". | Skills contain the following parameters inside the ```` tag. .. list-table:: Members inside ```` tag :widths: auto :header-rows: 1 * - Member - Description * - description - Describes the function of the skill. * - implementation - Implementation details already set by inheritance. * - categories - Categories the skill is part of (e.g. single_robot, dual_robot, position_controlled, force_controlled, velocity_controlled). * - visibility - Visibility of the skill (enum: required, basic, expert, hidden). | Skills contain the following parameters inside the ```` tag. .. list-table:: Members inside ```` tag :widths: auto :header-rows: 1 * - Member - Description * - skill_name - Name of this skill. It must be locally unique. * - monitors - Contains the monitors of the skill that determine when the skill should terminate. * - transitions - Contains additional transitions to other states (skills), given an event name. * - scripts - Contains scripts that should be executed while the skill is active. * - collections - Contains the kinematic chains of the skill (feature, robot, object chains). * - loops - Contains the kinematic loop(s) that define the task to be solved. * - tasks - Contains the task description(s). * - bounds - Contains the bounds description(s). For more information on the expert parameters, see `A Prototype-Based Skill Model for Specifying Robotic Assembly Tasks `_. The xml definition of a skill basically looks like the following: .. code-block:: xml {Choose meaningful description} {Add category(s) separated by comma} {Choose enum} {Choose name} {Add collection element(s)} {Add loop element(s)} {Add task element(s)} {Add bound element(s)} {Add monitor element(s)} {Add transition element(s)} {Add script element(s)} For example, a skill which moves the tool frame along three waypoints to form a triangle could look like this: .. code-block:: xml Moves along the given three frames to form a triangle single_robot, position_controlled basic Name of the tool frame required Name of the first frame required Name of the second frame required Name of the third frame required .. note:: See also :doc:`../how-to/advanced/How_to_create_a_custom_skill`