robokudo.annotators.testing =========================== .. py:module:: robokudo.annotators.testing Classes ------- .. autoapisummary:: robokudo.annotators.testing.SlowAnnotator robokudo.annotators.testing.EmptyAnnotator robokudo.annotators.testing.FailingAnnotator robokudo.annotators.testing.FakeCollectionReaderAnnotator robokudo.annotators.testing.ScopedAnnotator Module Contents --------------- .. py:class:: SlowAnnotator(name='SlowAnnotator', sleep_in_s=1) Bases: :py:obj:`robokudo.annotators.core.ThreadedAnnotator` .. py:attribute:: sleep_in_s :value: 1 .. py:method:: compute() This method is doing the heavy lifting of the annotator, if it takes to long to run. .. py:class:: EmptyAnnotator(name='EmptyAnnotator', sleep_in_s=1) Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator` .. py:method:: update() This method is doing the heavy lifting of the annotator, if it takes to long to run. .. py:class:: FailingAnnotator(name='FailingAnnotator') Bases: :py:obj:`robokudo.annotators.core.ThreadedAnnotator` A 'caffe' Annotator which is just an example of a long-running annotator utilizing the ThreadedAnnotator class. .. py:attribute:: counter :value: 0 .. py:method:: initialise() Called when first tick is received and anytime status is not running after. .. py:method:: compute() This method is doing the heavy lifting of the annotator, if it takes to long to run. .. py:class:: FakeCollectionReaderAnnotator(name='FakeCollectionReader') Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator` A collection reader that just waits for a couple of iterations until it lets go and the rest of the pipeline can continue. .. py:attribute:: collection_readers .. py:method:: setup(timeout) Delayed initialisation. For example ROS pub/sub, drivers, .. py:method:: initialise() Called when first tick is received and anytime status is not running after. .. py:method:: update() Called every time the behavior is ticked. .. py:method:: terminate(new_status) Called whenever behavior switches to !RUNNING state. new_status can be SUCCESS, FAILURE or INVALID .. py:class:: ScopedAnnotator(name='ScopedAnnotator', descriptor=Descriptor()) Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator` Show how analysis scopes are used .. py:class:: Descriptor Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator.Descriptor` .. py:class:: Parameters .. py:attribute:: analysis_scope .. py:attribute:: parameters .. py:method:: update() Called every time the behavior is ticked.