Skip to main content

CropPosesInBox Class

Given a vector of poses and a box-shaped region of interest, create a new vector of poses which contains only the poses that are inside the region of interest. The dimensions and size of the region of interest are defined relative to its centroid. More...

Declaration

class moveit_pro::behaviors::CropPosesInBox { ... }

Included Headers

#include <crop_poses_in_box.hpp>

Base class

classAsyncBehaviorBase

A base class for behaviors which need to asynchronously run a function that might take a long time to complete. More...

Public Constructors Index

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

Private Member Functions Index

tl::expected< bool, std::string >doWork () override

Retrieves required input values, looks up the transform between the box reference frame and the pose reference frames, performs the crop operation, and writes the cropped poses to the output data port. More...

std::shared_future< tl::expected< bool, std::string > > &getFuture () override

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member. More...

Private Member Attributes Index

std::shared_future< tl::expected< bool, std::string > >future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member. More...

Public Static Functions Index

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

Description

Given a vector of poses and a box-shaped region of interest, create a new vector of poses which contains only the poses that are inside the region of interest. The dimensions and size of the region of interest are defined relative to its centroid.

Data Port NamePort TypeObject Type
posesinputstd::vector<geometry_msgs::msg::PoseStamped>
crop_box_centroid_poseinputgeometry_msgs::msg::PoseStamped
crop_box_sizeinputstd::vector<double>
poses_croppedoutputstd::vector<geometry_msgs::msg::PoseStamped>

Definition at line 26 of file crop_poses_in_box.hpp.

Public Constructors

CropPosesInBox()

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

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

Private Member Functions

doWork()

tl::expected< bool, std::string > moveit_pro::behaviors::CropPosesInBox::doWork ()
virtual

Retrieves required input values, looks up the transform between the box reference frame and the pose reference frames, performs the crop operation, and writes the cropped poses to the output data port.

Returns

Returns true if the poses were cropped successfully. Returns an error message otherwise.

Declaration at line 42 of file crop_poses_in_box.hpp, definition at line 66 of file crop_poses_in_box.cpp.

getFuture()

std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::CropPosesInBox::getFuture ()
inline virtual

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member.

Definition at line 45 of file crop_poses_in_box.hpp.

Private Member Attributes

future_

std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::CropPosesInBox::future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member.

Definition at line 51 of file crop_poses_in_box.hpp.

Public Static Functions

metadata()

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

Declaration at line 34 of file crop_poses_in_box.hpp, definition at line 60 of file crop_poses_in_box.cpp.

providedPorts()

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

Declaration at line 32 of file crop_poses_in_box.hpp, definition at line 45 of file crop_poses_in_box.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.