robokudo.annotators.semantic_world_connector

Classes

SemanticDigitalTwinConnector

An annotator that synchronizes the current state of the world with the semdt.

Module Contents

class robokudo.annotators.semantic_world_connector.SemanticDigitalTwinConnector(name: str = 'SemanticDigitalTwinSynchronization', descriptor: SemanticDigitalTwinConnector | None = None)

Bases: robokudo.annotators.core.ThreadedAnnotator

An annotator that synchronizes the current state of the world with the semdt.

class Descriptor

Bases: robokudo.annotators.core.BaseAnnotator.Descriptor

class Parameters
confidence_threshold = 0.05
parameters
object_comparator
compute() py_trees.common.Status

Synchronise the current RoboKudo state with the current semdt state.

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.

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.

static get_latest_pose_annotation(object_hypothesis: robokudo.types.scene.ObjectHypothesis) robokudo.types.annotation.PoseAnnotation | None

Return the latest plain pose annotation for a hypothesis.

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.

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.

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.

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.

log_world_state() None

Log a compact summary of the current SemDT world contents.

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.

static get_object_belief_label(object_belief: robokudo.types.belief_state.ObjectBeliefState) str

Return a compact display label for an object belief UUID.