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='ClusterPoseBBAnnotator', descriptor=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.

Alignment parameters:

Variables:

align_x_axis_by_max_bbox_extent – Whether to align x-axis with longest box side, defaults to False

Visualization:

Variables:

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

align_x_axis_by_max_bbox_extent = False
bounding_box_visualization_color = [0, 0, 0]
parameters
adjust_bb_orientation_by_bb_size(pose_orientation: numpy.typing.NDArray, bounding_box_extents: 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 (numpy.ndarray) – Current orientation as 3x3 rotation matrix

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

Returns:

Tuple of (aligned orientation matrix, reordered extents)

Return type:

tuple(numpy.ndarray, list)

update()

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

Return type:

py_trees.Status