Skip to main content

FilterMasks2DByBoundingBox Class

Filter 2D masks based on bounding box dimensions only. More...

Declaration​

class moveit_pro::behaviors::FilterMasks2DByBoundingBox { ... }

Included Headers​

#include <filter_masks2d_by_bounding_box.hpp>

Base class​

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Public Constructors Index​

FilterMasks2DByBoundingBox (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > &shared_resources)

Public Member Functions Index​

BT::NodeStatustick () override

Public Static Functions Index​

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Description​

Filter 2D masks based on bounding box dimensions only.

This behavior filters a vector of Mask2D messages by computing the bounding box of each mask and checking if the dimensions fall within the specified ranges. Only masks that satisfy all bounding box constraints are included in the output.

For each Mask2D in the input vector:

  • Compute bounding box using cv::boundingRect
  • Check if min_width <= bbox.width <= max_width
  • Check if min_height <= bbox.height <= max_height
  • If all conditions pass, add to output vector
Data Port NamePort TypeObject Type
masksInputstd::vector<moveit_studio_vision_msgs::msg::Mask2D>
min_widthInputint
max_widthInputint
min_heightInputint
max_heightInputint
filtered_masksOutputstd::vector<moveit_studio_vision_msgs::msg::Mask2D>

Definition at line 39 of file filter_masks2d_by_bounding_box.hpp.

Public Constructors​

FilterMasks2DByBoundingBox()​

moveit_pro::behaviors::FilterMasks2DByBoundingBox::FilterMasks2DByBoundingBox (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > & shared_resources)

Declaration at line 42 of file filter_masks2d_by_bounding_box.hpp, definition at line 148 of file filter_masks2d_by_bounding_box.cpp.

Public Member Functions​

tick()​

BT::NodeStatus moveit_pro::behaviors::FilterMasks2DByBoundingBox::tick ()

Declaration at line 49 of file filter_masks2d_by_bounding_box.hpp, definition at line 169 of file filter_masks2d_by_bounding_box.cpp.

Public Static Functions​

metadata()​

BT::KeyValueVector moveit_pro::behaviors::FilterMasks2DByBoundingBox::metadata ()
static

Declaration at line 47 of file filter_masks2d_by_bounding_box.hpp, definition at line 215 of file filter_masks2d_by_bounding_box.cpp.

providedPorts()​

BT::PortsList moveit_pro::behaviors::FilterMasks2DByBoundingBox::providedPorts ()
static

Declaration at line 45 of file filter_masks2d_by_bounding_box.hpp, definition at line 155 of file filter_masks2d_by_bounding_box.cpp.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.