robokudo.annotators.semantic_world_connector ============================================ .. py:module:: robokudo.annotators.semantic_world_connector Classes ------- .. autoapisummary:: robokudo.annotators.semantic_world_connector.SemanticDigitalTwinConnector Module Contents --------------- .. py:class:: SemanticDigitalTwinConnector(name: str = 'SemanticDigitalTwinSynchronization', descriptor: SemanticDigitalTwinConnector | None = None) Bases: :py:obj:`robokudo.annotators.core.ThreadedAnnotator` An annotator that synchronizes the current state of the world with the semdt. .. py:class:: Descriptor Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator.Descriptor` .. py:class:: Parameters .. py:attribute:: confidence_threshold :value: 0.05 .. py:attribute:: parameters .. py:attribute:: object_comparator .. py:method:: compute() -> py_trees.common.Status Synchronise the current RoboKudo state with the current semdt state. .. py:method:: associate_hypotheses_with_beliefs(object_hypotheses: list[robokudo.types.scene.ObjectHypothesis], object_beliefs: list[robokudo.types.belief_state.ObjectBeliefState], cas: robokudo.cas.CAS) -> list[tuple[robokudo.types.scene.ObjectHypothesis, robokudo.types.belief_state.ObjectBeliefState]] Associate current object hypotheses with existing or new object beliefs. .. py:method:: add_world_pose_annotations(object_hypotheses: list[robokudo.types.scene.ObjectHypothesis], cas: robokudo.cas.CAS) -> None Add world-frame stamped poses to hypotheses when a camera pose is available. .. py:method:: get_latest_pose_annotation(object_hypothesis: robokudo.types.scene.ObjectHypothesis) -> robokudo.types.annotation.PoseAnnotation | None :staticmethod: Return the latest plain pose annotation for a hypothesis. .. py:method:: create_association_cost_matrix(object_hypotheses: list[robokudo.types.scene.ObjectHypothesis], object_beliefs: list[robokudo.types.belief_state.ObjectBeliefState]) -> numpy.ndarray Create a negative-similarity cost matrix for Hungarian assignment. .. py:method:: apply_assignment(object_hypotheses: list[robokudo.types.scene.ObjectHypothesis], object_beliefs: list[robokudo.types.belief_state.ObjectBeliefState], cost_matrix: numpy.ndarray, hypothesis_indices: numpy.ndarray, belief_indices: numpy.ndarray, cas: robokudo.cas.CAS) -> list[tuple[robokudo.types.scene.ObjectHypothesis, robokudo.types.belief_state.ObjectBeliefState]] Update matched beliefs or create new beliefs for low-confidence matches. .. py:method:: create_new_beliefs_for_hypotheses(object_hypotheses: list[robokudo.types.scene.ObjectHypothesis], cas: robokudo.cas.CAS) -> list[tuple[robokudo.types.scene.ObjectHypothesis, robokudo.types.belief_state.ObjectBeliefState]] Create object beliefs for all given hypotheses. .. py:method:: create_new_beliefs_for_unmatched_hypotheses(object_hypotheses: list[robokudo.types.scene.ObjectHypothesis], matched_hypothesis_indices: set[int], cas: robokudo.cas.CAS) -> list[tuple[robokudo.types.scene.ObjectHypothesis, robokudo.types.belief_state.ObjectBeliefState]] Create object beliefs for hypotheses not returned by Hungarian assignment. .. py:method:: log_world_state() -> None Log a compact summary of the current SemDT world contents. .. py:method:: create_association_visualization(associated_hypotheses: list[tuple[robokudo.types.scene.ObjectHypothesis, robokudo.types.belief_state.ObjectBeliefState]]) -> None Publish a 2D image showing which SemDT UUID each hypothesis maps to. .. py:method:: get_object_belief_label(object_belief: robokudo.types.belief_state.ObjectBeliefState) -> str :staticmethod: Return a compact display label for an object belief UUID.