robokudo.tree_components.task_scheduler ======================================= .. py:module:: robokudo.tree_components.task_scheduler Classes ------- .. autoapisummary:: robokudo.tree_components.task_scheduler.TaskSchedulerBase robokudo.tree_components.task_scheduler.IterativeTaskScheduler Module Contents --------------- .. py:class:: TaskSchedulerBase(name='TaskSchedulerBase') Bases: :py:obj:`py_trees.behaviour.Behaviour` This Behaviour enables a dynamic arrangement of known Behaviours. It assumes that it is placed in a certain configuration in a behaviour tree: # # JOB_SCHEDULING [SEQUENCE] # / | # JOB_SCHEDULER JOB [SEQUENCE] # | # During startup this class will save the Job Sequence which contains as a (direct) children all the Annotators that might need to get scheduled. Please note: In order to use this class, please use one of the deriving classes. .. py:attribute:: logger :value: None .. py:attribute:: fix_parent_relationships_after_plan :value: True .. py:method:: initialise() .. py:method:: plan_new_job() -> Optional[py_trees.Sequence] Get the new job that should be applied by the JobScheduler. It is the responsibility of your method to return a valid py_trees.Sequence. This means especially that you have to make sure that your parent and children relations should be intact. This is important if you have to keep Instances of your Behaviours/Annotators which might get changed when being put into different py_trees.Behaviours. :return: py_trees.Sequence if it can be computed or None if no plan could be found. .. py:method:: update() Called every time the behavior is ticked. This will happen only once for the job scheduling. .. py:class:: IterativeTaskScheduler(name='IterativeTaskScheduler', tree_list=[]) Bases: :py:obj:`TaskSchedulerBase` A Task Scheduler that cycles iteratively through a list of given subtrees. Repeats from the beginning after the end of the list is reached. .. py:attribute:: tree_list :value: [] .. py:attribute:: idx :value: 0 .. py:method:: setup(timeout) .. py:method:: plan_new_job() -> Optional[py_trees.Sequence] Get the new job that should be applied by the JobScheduler. It is the responsibility of your method to return a valid py_trees.Sequence. This means especially that you have to make sure that your parent and children relations should be intact. This is important if you have to keep Instances of your Behaviours/Annotators which might get changed when being put into different py_trees.Behaviours. :return: py_trees.Sequence if it can be computed or None if no plan could be found.