Skip to main content

FilterMasks2DByArea Class

Filter 2D masks based on mask area only. More...

Declaration​

class moveit_pro::behaviors::FilterMasks2DByArea { ... }

Included Headers​

#include <filter_masks2d_by_area.hpp>

Base class​

classSharedResourcesNode<BehaviorTreeNodeT>

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

Public Constructors Index​

FilterMasks2DByArea (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 mask area only.

This behavior filters a vector of Mask2D messages by computing the area of each mask and checking if it falls within the specified range. Only masks that satisfy the area constraint are included in the output.

For each Mask2D in the input vector:

  • Compute area by counting all non-zero pixels
  • Check if min_area <= area <= max_area
  • If condition passes, add to output vector
Data Port NamePort TypeObject Type
masksInputstd::vector<moveit_studio_vision_msgs::msg::Mask2D>
min_areaInputint
max_areaInputint
filtered_masksOutputstd::vector<moveit_studio_vision_msgs::msg::Mask2D>

Definition at line 36 of file filter_masks2d_by_area.hpp.

Public Constructors​

FilterMasks2DByArea()​

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

Declaration at line 39 of file filter_masks2d_by_area.hpp, definition at line 29 of file filter_masks2d_by_area.cpp.

Public Member Functions​

tick()​

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

Declaration at line 46 of file filter_masks2d_by_area.hpp, definition at line 46 of file filter_masks2d_by_area.cpp.

Public Static Functions​

metadata()​

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

Declaration at line 44 of file filter_masks2d_by_area.hpp, definition at line 102 of file filter_masks2d_by_area.cpp.

providedPorts()​

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

Declaration at line 42 of file filter_masks2d_by_area.hpp, definition at line 35 of file filter_masks2d_by_area.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.