documentation:skiros:compound_skills

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:skiros:compound_skills [2023/03/23 19:04] pontusrdocumentation:skiros:compound_skills [2023/06/26 12:44] (current) pontusr
Line 3: Line 3:
 This page will refer to example skills from [[https://git.cs.lth.se/robotlab/skill_examples/-/tree/master/|this]] repository written by Pontus Rosqvist. This page will refer to example skills from [[https://git.cs.lth.se/robotlab/skill_examples/-/tree/master/|this]] repository written by Pontus Rosqvist.
  
-When it comes to SkiROS a compound skill can be implemented by extending [[https://github.com/RVMI/skiros2/blob/master/skiros2_skill/src/skiros2_skill/core/skill.py|SkillBase]]. This class can run arbitrary python code but it is mostly intended for calling other skills, it has the following stages of execution:+When it comes to SkiROS a compound skill can be implemented by extending [[https://github.com/RVMI/skiros2/blob/master/skiros2_skill/src/skiros2_skill/core/skill.py|SkillBase]]. This class can run arbitrary python code but it is mostly intended for calling other skills. If primitive skills are intepreted then compound skills are compiled, anything written in expand only specifies the behaviour tree, it isn't run when expand is called. A compound skill has the following stages of execution:
  
 ^ Name      ^ When it runs                                          ^ Note                                                            ^ ^ Name      ^ When it runs                                          ^ Note                                                            ^
Line 18: Line 18:
  
 ^ Processor Name ^ Purpose ^ Note ^ ^ Processor Name ^ Purpose ^ Note ^
-| Serial | Executes each skill sequentially until every skill has succeeded. Restarts finished skills. +| Serial | Executes each skill sequentially until every skill has succeeded. Restarts finished skills. | | 
-| SerialStar | Executes each skill sequentially until every skill has succeded. Does not restart skills that have succeeded. +| SerialStar | Executes each skill sequentially until every skill has succeeded. Does not restart skills that have succeeded. | | 
-| Sequential | Alias of SerialStar. Deprecated +| Sequential | Alias of SerialStar. Deprecated. | | 
-| Selector | Executes each skill sequentially until one succeeds. +| Selector | Executes each skill sequentially until one succeeds. | | 
-| SelectorStar | Executes each skill sequentially until one succeeds, additionally it keeps track of which skills have succeded and refrains from running them again. +| SelectorStar | Executes each skill sequentially until one succeeds, additionally it keeps track of which skills have succeded and refrains from running them again. | | 
-| ParallelFf | Parallel First Fail - Execute skills in parallel until all succeed. Stop all processes if a child fails. +| ParallelFf | Parallel First Fail - Executes skills in parallel until all succeed. Stop all processes if a skill fails. | | 
-| ParallelFs | Parallel First Success - Execute skills in parallel until one succeed. Stop all processes if a child succeed/fails. +| ParallelFs | Parallel First Success - Executes skills in parallel until one succeeds. Stop all processes if a skill succeeds/fails. | | 
-| Loop | Executes the skills sequentially N times. +| Loop | Executes the skills sequentially N times. | Optionally takes amount times to loop as parameter, otherwise loops forever. | 
-| RetryOnFail | Executes the skills sequentially N times and restarts from the beginning if a skill fails. +| RetryOnFail | Executes the skills sequentially restarts from the beginning if a skill fails. | Optionally takes the maximal amount restarts as parameter, otherwise retires until all skills have succeded. | 
-| NoFail | Wrapper for a skill processor to stop if from returning fail.+| NoFail | Wrapper for a skill processor to stop if from returning fail. | Takes a skillprocessor as a parameter. | 
 +| InferInvalid  | Infers parameters which exist in the blackboard which might happen to be invalid | | 
 + 
 +These are all the skill processors one can use but they can also be found [[https://git.cs.lth.se/robotlab/rvmi/skiros2/-/blob/master/skiros2_skill/src/skiros2_skill/core/processors.py|here]]. An example of how to use these skill processors can be seen in [[https://git.cs.lth.se/robotlab/skill_examples/-/blob/master/src/skill_examples/basic_compound_skill.py|basic_compound]] and an example of how to use these processors to perform conditional checks which determine how the skill runs can be seen in [[https://git.cs.lth.se/robotlab/skill_examples/-/blob/master/src/skill_examples/compound_if_statement.py|compound_if_statement]].
  
  • documentation/skiros/compound_skills.1679598281.txt.gz
  • Last modified: 2023/03/23 19:04
  • by pontusr