robokudo.tree_components.task_scheduler

Classes

TaskSchedulerBase

This Behaviour enables a dynamic arrangement of known Behaviours.

IterativeTaskScheduler

A Task Scheduler that cycles iteratively through a list of given subtrees.

Module Contents

class robokudo.tree_components.task_scheduler.TaskSchedulerBase(name='TaskSchedulerBase')

Bases: 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.

logger = None
fix_parent_relationships_after_plan = True
initialise()
plan_new_job() py_trees.Sequence | None

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.

Returns:

py_trees.Sequence if it can be computed or None if no plan could be found.

update()

Called every time the behavior is ticked.

This will happen only once for the job scheduling.

class robokudo.tree_components.task_scheduler.IterativeTaskScheduler(name='IterativeTaskScheduler', tree_list=[])

Bases: 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.

tree_list = []
idx = 0
setup(timeout)
plan_new_job() py_trees.Sequence | None

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.

Returns:

py_trees.Sequence if it can be computed or None if no plan could be found.