robokudo.annotators.cluster_pose_bb

3D pose estimation using oriented bounding boxes.

This module provides an annotator for:

  • Calculating 3D poses for object hypotheses

  • Using z-axis aligned oriented bounding boxes

  • Supporting world frame alignment

  • Generating visualization markers

The module uses:

  • 2D projection for rotation estimation

  • Minimum area rectangles for orientation

  • Coordinate frame transformations

  • Open3D visualization tools

Note

By default, z-axis is aligned with world frame up direction.

Classes

ClusterPoseBBAnnotator

3D pose estimation using oriented bounding boxes.

Module Contents

class robokudo.annotators.cluster_pose_bb.ClusterPoseBBAnnotator(name: str = 'ClusterPoseBBAnnotator', descriptor: ClusterPoseBBAnnotator = Descriptor())

Bases: robokudo.annotators.core.BaseAnnotator

3D pose estimation using oriented bounding boxes.

This annotator:

  • Calculates 3D poses for object point clusters

  • Uses z-axis aligned oriented bounding boxes

  • Projects points to 2D for rotation estimation

  • Creates pose and bounding box annotations

  • Supports axis alignment by box extents

Note

Default behavior aligns z-axis with world frame up direction.

class Descriptor

Bases: robokudo.annotators.core.BaseAnnotator.Descriptor

Configuration descriptor for pose estimation.

class Parameters

Parameters for configuring pose estimation.

align_x_axis_by_max_bbox_extent: bool = False

Whether to align x-axis with longest box side.

The default behaviour of this Annotator orients the z-axis such that it always points up w.r.t the world frame. By setting this parameter to True, this behaviour will be overwritten. In that case, x will always point in the direction of the largest side (extent) of the bounding box

bounding_box_visualization_color: typing_extensions.Tuple[int, int, int] = (0, 0, 0)

RGB color for box visualization, defaults to [0,0,0]

parameters
adjust_bb_orientation_by_bb_size(pose_orientation: numpy.typing.NDArray, bounding_box_extents: typing_extensions.List) typing_extensions.Tuple[numpy.typing.NDArray, typing_extensions.List]

Align bounding box axes with extent dimensions.

Reorients the bounding box so that:

  • X-axis aligns with longest dimension

  • Y-axis aligns with second longest

  • Z-axis aligns with shortest dimension

Parameters:
  • pose_orientation – Current orientation as 3x3 rotation matrix

  • bounding_box_extents – Current box dimensions [x,y,z]

Returns:

Tuple of (aligned orientation matrix, reordered extents)

update() py_trees.common.Status

Process object hypotheses and estimate poses.

The method:

  • Loads point cloud from CAS

  • For each object hypothesis: * Transforms points to world frame * Projects to 2D for orientation estimation * Calculates minimum area rectangle * Creates oriented bounding box * Generates pose and box annotations * Creates visualization markers

Returns:

SUCCESS after processing, FAILURE if transform not found